--- zzzz-none-000/linux-3.10.107/drivers/mtd/maps/rbtx4939-flash.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/mtd/maps/rbtx4939-flash.c 2021-02-04 17:41:59.000000000 +0000 @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include @@ -34,11 +33,8 @@ info = platform_get_drvdata(dev); if (!info) return 0; - platform_set_drvdata(dev, NULL); if (info->mtd) { - struct rbtx4939_flash_data *pdata = dev->dev.platform_data; - mtd_device_unregister(info->mtd); map_destroy(info->mtd); } @@ -57,7 +53,7 @@ int err = 0; unsigned long size; - pdata = dev->dev.platform_data; + pdata = dev_get_platdata(&dev->dev); if (!pdata) return -ENODEV; @@ -100,7 +96,7 @@ err = -ENXIO; goto err_out; } - info->mtd->owner = THIS_MODULE; + info->mtd->dev.parent = &dev->dev; err = mtd_device_parse_register(info->mtd, NULL, NULL, pdata->parts, pdata->nr_parts); @@ -131,7 +127,6 @@ .shutdown = rbtx4939_flash_shutdown, .driver = { .name = "rbtx4939-flash", - .owner = THIS_MODULE, }, };