From 59c4dce13018b04275478e95b3929eca55afcdfb Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Thu, 16 Aug 2012 18:36:13 +0800 Subject: leds: leds-gpio: Use platform_{get,set}_drvdata Use the wrapper functions, so we can directly pass a struct platfrom_device. Signed-off-by: Tobias Klauser Signed-off-by: Bryan Wu --- drivers/leds/leds-gpio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/leds/leds-gpio.c') diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c index 4043f7732e57..c392c1e95531 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; } -- cgit v1.2.3