--- zzzz-none-000/linux-3.10.107/drivers/mfd/tps65912-core.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/mfd/tps65912-core.c 2021-02-04 17:41:59.000000000 +0000 @@ -15,13 +15,12 @@ #include #include -#include #include #include #include #include -static struct mfd_cell tps65912s[] = { +static const struct mfd_cell tps65912s[] = { { .name = "tps65912-pmic", }, @@ -123,7 +122,7 @@ int tps65912_device_init(struct tps65912 *tps65912) { - struct tps65912_board *pmic_plat_data = tps65912->dev->platform_data; + struct tps65912_board *pmic_plat_data = dev_get_platdata(tps65912->dev); struct tps65912_platform_data *init_data; int ret, dcdc_avs, value; @@ -162,7 +161,6 @@ err: kfree(init_data); mfd_remove_devices(tps65912->dev); - kfree(tps65912); return ret; } @@ -170,7 +168,6 @@ { mfd_remove_devices(tps65912->dev); tps65912_irq_exit(tps65912); - kfree(tps65912); } MODULE_AUTHOR("Margarita Olaya ");