diff options
Diffstat (limited to 'drivers/leds/leds-da9052.c')
| -rw-r--r-- | drivers/leds/leds-da9052.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/leds/leds-da9052.c b/drivers/leds/leds-da9052.c index 58a5244c437..e4da1f460ac 100644 --- a/drivers/leds/leds-da9052.c +++ b/drivers/leds/leds-da9052.c @@ -14,7 +14,6 @@ #include <linux/module.h> #include <linux/kernel.h> -#include <linux/init.h> #include <linux/platform_device.h> #include <linux/leds.h> #include <linux/workqueue.h> @@ -102,7 +101,7 @@ static int da9052_configure_leds(struct da9052 *da9052) return error; } -static int __devinit da9052_led_probe(struct platform_device *pdev) +static int da9052_led_probe(struct platform_device *pdev) { struct da9052_pdata *pdata; struct da9052 *da9052; @@ -112,7 +111,7 @@ static int __devinit da9052_led_probe(struct platform_device *pdev) int i; da9052 = dev_get_drvdata(pdev->dev.parent); - pdata = da9052->dev->platform_data; + pdata = dev_get_platdata(da9052->dev); if (pdata == NULL) { dev_err(&pdev->dev, "No platform data\n"); goto err; @@ -127,8 +126,7 @@ static int __devinit da9052_led_probe(struct platform_device *pdev) led = devm_kzalloc(&pdev->dev, sizeof(struct da9052_led) * pled->num_leds, GFP_KERNEL); - if (led == NULL) { - dev_err(&pdev->dev, "Failed to alloc memory\n"); + if (!led) { error = -ENOMEM; goto err; } @@ -176,7 +174,7 @@ err: return error; } -static int __devexit da9052_led_remove(struct platform_device *pdev) +static int da9052_led_remove(struct platform_device *pdev) { struct da9052_led *led = platform_get_drvdata(pdev); struct da9052_pdata *pdata; @@ -185,7 +183,7 @@ static int __devexit da9052_led_remove(struct platform_device *pdev) int i; da9052 = dev_get_drvdata(pdev->dev.parent); - pdata = da9052->dev->platform_data; + pdata = dev_get_platdata(da9052->dev); pled = pdata->pled; for (i = 0; i < pled->num_leds; i++) { @@ -204,7 +202,7 @@ static struct platform_driver da9052_led_driver = { .owner = THIS_MODULE, }, .probe = da9052_led_probe, - .remove = __devexit_p(da9052_led_remove), + .remove = da9052_led_remove, }; module_platform_driver(da9052_led_driver); |
