提交 95b80bf3 编写于 作者: F Fabio Estevam 提交者: David S. Miller

mdio_bus: Remove unneeded gpiod NULL check

The gpiod API checks for NULL descriptors, so there is no need to
duplicate the check in the driver.
Signed-off-by: NFabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 24251c26
...@@ -399,8 +399,7 @@ int __mdiobus_register(struct mii_bus *bus, struct module *owner) ...@@ -399,8 +399,7 @@ int __mdiobus_register(struct mii_bus *bus, struct module *owner)
} }
/* Put PHYs in RESET to save power */ /* Put PHYs in RESET to save power */
if (bus->reset_gpiod) gpiod_set_value_cansleep(bus->reset_gpiod, 1);
gpiod_set_value_cansleep(bus->reset_gpiod, 1);
device_del(&bus->dev); device_del(&bus->dev);
return err; return err;
...@@ -425,8 +424,7 @@ void mdiobus_unregister(struct mii_bus *bus) ...@@ -425,8 +424,7 @@ void mdiobus_unregister(struct mii_bus *bus)
} }
/* Put PHYs in RESET to save power */ /* Put PHYs in RESET to save power */
if (bus->reset_gpiod) gpiod_set_value_cansleep(bus->reset_gpiod, 1);
gpiod_set_value_cansleep(bus->reset_gpiod, 1);
device_del(&bus->dev); device_del(&bus->dev);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册