--- zzzz-none-000/linux-3.10.107/drivers/leds/leds-s3c24xx.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/leds/leds-s3c24xx.c 2021-02-04 17:41:59.000000000 +0000 @@ -12,16 +12,15 @@ */ #include -#include #include #include #include #include #include +#include -#include #include -#include +#include /* our context */ @@ -71,16 +70,14 @@ static int s3c24xx_led_probe(struct platform_device *dev) { - struct s3c24xx_led_platdata *pdata = dev->dev.platform_data; + struct s3c24xx_led_platdata *pdata = dev_get_platdata(&dev->dev); struct s3c24xx_gpio_led *led; int ret; led = devm_kzalloc(&dev->dev, sizeof(struct s3c24xx_gpio_led), GFP_KERNEL); - if (led == NULL) { - dev_err(&dev->dev, "No memory for device\n"); + if (!led) return -ENOMEM; - } platform_set_drvdata(dev, led); @@ -119,7 +116,6 @@ .remove = s3c24xx_led_remove, .driver = { .name = "s3c24xx_led", - .owner = THIS_MODULE, }, };