--- zzzz-none-000/linux-3.10.107/drivers/rtc/rtc-m48t86.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/rtc/rtc-m48t86.c 2021-02-04 17:41:59.000000000 +0000 @@ -46,7 +46,7 @@ { unsigned char reg; struct platform_device *pdev = to_platform_device(dev); - struct m48t86_ops *ops = pdev->dev.platform_data; + struct m48t86_ops *ops = dev_get_platdata(&pdev->dev); reg = ops->readbyte(M48T86_REG_B); @@ -84,7 +84,7 @@ { unsigned char reg; struct platform_device *pdev = to_platform_device(dev); - struct m48t86_ops *ops = pdev->dev.platform_data; + struct m48t86_ops *ops = dev_get_platdata(&pdev->dev); reg = ops->readbyte(M48T86_REG_B); @@ -123,7 +123,7 @@ { unsigned char reg; struct platform_device *pdev = to_platform_device(dev); - struct m48t86_ops *ops = pdev->dev.platform_data; + struct m48t86_ops *ops = dev_get_platdata(&pdev->dev); reg = ops->readbyte(M48T86_REG_B); @@ -147,7 +147,7 @@ static int m48t86_rtc_probe(struct platform_device *dev) { unsigned char reg; - struct m48t86_ops *ops = dev->dev.platform_data; + struct m48t86_ops *ops = dev_get_platdata(&dev->dev); struct rtc_device *rtc; rtc = devm_rtc_device_register(&dev->dev, "m48t86", @@ -166,20 +166,11 @@ return 0; } -static int m48t86_rtc_remove(struct platform_device *dev) -{ - platform_set_drvdata(dev, NULL); - - return 0; -} - static struct platform_driver m48t86_rtc_platform_driver = { .driver = { .name = "rtc-m48t86", - .owner = THIS_MODULE, }, .probe = m48t86_rtc_probe, - .remove = m48t86_rtc_remove, }; module_platform_driver(m48t86_rtc_platform_driver);