PCI: mvebu: Remove unneeded gpiod NULL check
PATCH 1/1 PCI: mvebu: Remove unneeded gpiod NULL check
From: Fabio Estevam <[email protected]>
The gpiod API checks for NULL descriptors, so there is no need to duplicate the check in the driver.
Signed-off-by Fabio Estevam <[email protected]>
--- drivers/pci/host/pci-mvebu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/pci/host/pci-mvebu.c +1 -2
@@ -1186,8 +1186,7 @@ static int mvebu_pcie_powerup(struct mvebu_pcie_port *port)*/ static void mvebu_pcie_powerdown (struct mvebu_pcie_port *port) { -if (port->reset_gpio) -gpiod_set_value_cansleep (port->reset_gpio,1 ); +gpiod_set_value_cansleep (port->reset_gpio,1 );clk_disable_unprepare (port->clk); }
Signature · 1 line
2.7.4
Hello,
Quoted 9 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
The gpiod API checks for NULL descriptors, so there is no need to duplicate the check in the driver.
Signed-off-by Fabio Estevam <[email protected]>--- drivers/pci/host/pci-mvebu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Acked-by Thomas Petazzoni <[email protected]>
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
Quoted 6 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
The gpiod API checks for NULL descriptors, so there is no need to duplicate the check in the driver.
Signed-off-by Fabio Estevam <[email protected]>
Applied with Thomas' ack to pci/host-mvebu for v4.14, thanks!
Quoted 21 lines
--- drivers/pci/host/pci-mvebu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/pci/host/pci-mvebu.c +1
-2@@ -1186,8 +1186,7 @@ static int mvebu_pcie_powerup(struct mvebu_pcie_port *port)*/ static void mvebu_pcie_powerdown (struct mvebu_pcie_port *port) { -if (port->reset_gpio) -gpiod_set_value_cansleep (port->reset_gpio,1 ); +gpiod_set_value_cansleep (port->reset_gpio,1 );clk_disable_unprepare (port->clk); }Signature · 1 line
2.7.4