--- zzzz-none-000/linux-3.10.107/drivers/leds/leds-sunfire.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/leds/leds-sunfire.c 2021-02-04 17:41:59.000000000 +0000 @@ -135,10 +135,8 @@ } p = devm_kzalloc(&pdev->dev, sizeof(*p), GFP_KERNEL); - if (!p) { - dev_err(&pdev->dev, "Could not allocate struct sunfire_drvdata\n"); + if (!p) return -ENOMEM; - } for (i = 0; i < NUM_LEDS_PER_BOARD; i++) { struct led_classdev *lp = &p->leds[i].led_cdev; @@ -159,14 +157,14 @@ } } - dev_set_drvdata(&pdev->dev, p); + platform_set_drvdata(pdev, p); return 0; } static int sunfire_led_generic_remove(struct platform_device *pdev) { - struct sunfire_drvdata *p = dev_get_drvdata(&pdev->dev); + struct sunfire_drvdata *p = platform_get_drvdata(pdev); int i; for (i = 0; i < NUM_LEDS_PER_BOARD; i++) @@ -225,7 +223,6 @@ .remove = sunfire_led_generic_remove, .driver = { .name = "sunfire-clockboard-leds", - .owner = THIS_MODULE, }, }; @@ -234,7 +231,6 @@ .remove = sunfire_led_generic_remove, .driver = { .name = "sunfire-fhc-leds", - .owner = THIS_MODULE, }, };