Skip to content

Commit

Permalink
leds: leds-gpio: Use platform_{get,set}_drvdata
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tobias Klauser authored and Bryan Wu committed Sep 11, 2012
1 parent 6ebcebd commit 59c4dce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/leds/leds-gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 59c4dce

Please sign in to comment.