--- zzzz-none-000/linux-3.10.107/drivers/leds/leds-da903x.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/leds/leds-da903x.c 2021-02-04 17:41:59.000000000 +0000 @@ -14,7 +14,6 @@ #include #include -#include #include #include #include @@ -93,7 +92,7 @@ static int da903x_led_probe(struct platform_device *pdev) { - struct led_info *pdata = pdev->dev.platform_data; + struct led_info *pdata = dev_get_platdata(&pdev->dev); struct da903x_led *led; int id, ret; @@ -109,10 +108,8 @@ } led = devm_kzalloc(&pdev->dev, sizeof(struct da903x_led), GFP_KERNEL); - if (led == NULL) { - dev_err(&pdev->dev, "failed to alloc memory for LED%d\n", id); + if (!led) return -ENOMEM; - } led->cdev.name = pdata->name; led->cdev.default_trigger = pdata->default_trigger; @@ -147,7 +144,6 @@ static struct platform_driver da903x_led_driver = { .driver = { .name = "da903x-led", - .owner = THIS_MODULE, }, .probe = da903x_led_probe, .remove = da903x_led_remove,