Re: [PATCH 2/2] leds: leds-gpio: Use platform_{get,set}_drvdata

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 16, 2012 at 6:36 PM, Tobias Klauser <tklauser@xxxxxxxxxx> wrote:
> Use the wrapper functions, so we can directly pass a struct
> platfrom_device.
>

Thanks, applied to my for-next branch.

-Bryan

> Signed-off-by: Tobias Klauser <tklauser@xxxxxxxxxx>
> ---
>  drivers/leds/leds-gpio.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c
> index 4043f77..c392c1e 100644
> --- a/drivers/leds/leds-gpio.c
> +++ b/drivers/leds/leds-gpio.c
> @@ -269,13 +269,13 @@ static int __devinit gpio_led_probe(struct platform_device *pdev)
>
>  static int __devexit gpio_led_remove(struct platform_device *pdev)
>  {
> -       struct gpio_leds_priv *priv = dev_get_drvdata(&pdev->dev);
> +       struct gpio_leds_priv *priv = platform_get_drvdata(pdev);
>         int i;
>
>         for (i = 0; i < priv->num_leds; i++)
>                 delete_gpio_led(&priv->leds[i]);
>
> -       dev_set_drvdata(&pdev->dev, NULL);
> +       platform_set_drvdata(pdev, NULL);
>
>         return 0;
>  }
> --
> 1.7.5.4
>



-- 
Bryan Wu <bryan.wu@xxxxxxxxxxxxx>
Kernel Developer    +86.186-168-78255 Mobile
Canonical Ltd.      www.canonical.com
Ubuntu - Linux for human beings | www.ubuntu.com
--
To unsubscribe from this list: send the line "unsubscribe linux-leds" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux