--- zzzz-none-000/linux-3.10.107/drivers/mtd/maps/latch-addr-flash.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/mtd/maps/latch-addr-flash.c 2021-02-04 17:41:59.000000000 +0000 @@ -10,7 +10,6 @@ * kind, whether express or implied. */ -#include #include #include #include @@ -102,9 +101,8 @@ info = platform_get_drvdata(dev); if (info == NULL) return 0; - platform_set_drvdata(dev, NULL); - latch_addr_data = dev->dev.platform_data; + latch_addr_data = dev_get_platdata(&dev->dev); if (info->mtd != NULL) { mtd_device_unregister(info->mtd); @@ -135,7 +133,7 @@ int chipsel; int err; - latch_addr_data = dev->dev.platform_data; + latch_addr_data = dev_get_platdata(&dev->dev); if (latch_addr_data == NULL) return -ENODEV; @@ -197,7 +195,7 @@ err = -ENODEV; goto iounmap; } - info->mtd->owner = THIS_MODULE; + info->mtd->dev.parent = &dev->dev; mtd_device_parse_register(info->mtd, NULL, NULL, latch_addr_data->parts,