leds: leds-gpio: Use platform_{get,set}_drvdata
authorTobias Klauser <tklauser@distanz.ch>
Thu, 16 Aug 2012 10:36:13 +0000 (18:36 +0800)
committerBryan Wu <bryan.wu@canonical.com>
Tue, 11 Sep 2012 10:32:40 +0000 (18:32 +0800)
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>
drivers/leds/leds-gpio.c

index 4043f7732e57707306701d99bb90cf7da4ff3ec2..c392c1e955311d199a00eb1bfa558b2def9a45f1 100644 (file)
@@ -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;
 }