diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2012-08-16 06:36:13 -0400 |
---|---|---|
committer | Bryan Wu <bryan.wu@canonical.com> | 2012-09-11 06:32:40 -0400 |
commit | 59c4dce13018b04275478e95b3929eca55afcdfb (patch) | |
tree | 62965b86699a771cdb41ef06cfc63b8413b58c64 | |
parent | 6ebcebddffbf5c074e467c725aafbd21dfd46ed5 (diff) |
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 <tklauser@distanz.ch>
Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
-rw-r--r-- | 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 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) | |||
269 | 269 | ||
270 | static int __devexit gpio_led_remove(struct platform_device *pdev) | 270 | static int __devexit gpio_led_remove(struct platform_device *pdev) |
271 | { | 271 | { |
272 | struct gpio_leds_priv *priv = dev_get_drvdata(&pdev->dev); | 272 | struct gpio_leds_priv *priv = platform_get_drvdata(pdev); |
273 | int i; | 273 | int i; |
274 | 274 | ||
275 | for (i = 0; i < priv->num_leds; i++) | 275 | for (i = 0; i < priv->num_leds; i++) |
276 | delete_gpio_led(&priv->leds[i]); | 276 | delete_gpio_led(&priv->leds[i]); |
277 | 277 | ||
278 | dev_set_drvdata(&pdev->dev, NULL); | 278 | platform_set_drvdata(pdev, NULL); |
279 | 279 | ||
280 | return 0; | 280 | return 0; |
281 | } | 281 | } |