--- zzzz-none-000/linux-3.10.107/drivers/ide/ide_platform.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/ide/ide_platform.c 2021-02-04 17:41:59.000000000 +0000 @@ -56,7 +56,7 @@ struct ide_hw hw, *hws[] = { &hw }; struct ide_port_info d = platform_ide_port_info; - pdata = pdev->dev.platform_data; + pdata = dev_get_platdata(&pdev->dev); /* get a pointer to the register memory */ res_base = platform_get_resource(pdev, IORESOURCE_IO, 0); @@ -125,25 +125,13 @@ static struct platform_driver platform_ide_driver = { .driver = { .name = "pata_platform", - .owner = THIS_MODULE, }, .probe = plat_ide_probe, .remove = plat_ide_remove, }; -static int __init platform_ide_init(void) -{ - return platform_driver_register(&platform_ide_driver); -} - -static void __exit platform_ide_exit(void) -{ - platform_driver_unregister(&platform_ide_driver); -} +module_platform_driver(platform_ide_driver); MODULE_DESCRIPTION("Platform IDE driver"); MODULE_LICENSE("GPL"); MODULE_ALIAS("platform:pata_platform"); - -module_init(platform_ide_init); -module_exit(platform_ide_exit);