Hello.

On 11/25/2014 12:31 PM, Rojhalat Ibrahim wrote:

Convert mdio-mux-gpio to the GPIO descriptor interface and use the new
gpiod_set_array function to set all output signals simultaneously.

Signed-off-by: Rojhalat Ibrahim <[email protected]>
Acked-by: David S. Miller <[email protected]>
--
This patch depends on the gpiod_set_array function, which is available in
the linux-gpio devel tree.

v2: fix gpiod_get_index usage

  drivers/net/phy/mdio-mux-gpio.c |   38 ++++++++++++++------------------------
  1 file changed, 14 insertions(+), 24 deletions(-)

diff --git a/drivers/net/phy/mdio-mux-gpio.c b/drivers/net/phy/mdio-mux-gpio.c
index 0966951..1167c5b 100644
--- a/drivers/net/phy/mdio-mux-gpio.c
+++ b/drivers/net/phy/mdio-mux-gpio.c
[...]
@@ -98,15 +84,19 @@ static int mdio_mux_gpio_probe(struct platform_device *pdev)
[...]
  static int mdio_mux_gpio_remove(struct platform_device *pdev)
  {
+       unsigned int n;
        struct mdio_mux_gpio_state *s = dev_get_platdata(&pdev->dev);
        mdio_mux_uninit(s->mux_handle);
+       for (n = 0; n < s->num_gpios; n++) {
+               gpiod_put(s->gpio[n]);
+       }

   {} not needed; scripts/checkpatch.pl should have complained...

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to