--- zzzz-none-000/linux-3.10.107/drivers/i2c/busses/i2c-ibm_iic.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/i2c/busses/i2c-ibm_iic.c 2021-02-04 17:41:59.000000000 +0000 @@ -36,13 +36,13 @@ #include #include #include -#include #include #include #include #include +#include +#include #include -#include #include "i2c-ibm_iic.h" @@ -705,7 +705,7 @@ return -ENOMEM; } - dev_set_drvdata(&ofdev->dev, dev); + platform_set_drvdata(ofdev, dev); dev->vaddr = of_iomap(np, 0); if (dev->vaddr == NULL) { @@ -759,9 +759,6 @@ dev_info(&ofdev->dev, "using %s mode\n", dev->fast_mode ? "fast (400 kHz)" : "standard (100 kHz)"); - /* Now register all the child nodes */ - of_i2c_register_devices(adap); - return 0; error_cleanup: @@ -782,7 +779,7 @@ */ static int iic_remove(struct platform_device *ofdev) { - struct ibm_iic_private *dev = dev_get_drvdata(&ofdev->dev); + struct ibm_iic_private *dev = platform_get_drvdata(ofdev); i2c_del_adapter(&dev->adap); @@ -801,11 +798,11 @@ { .compatible = "ibm,iic", }, {} }; +MODULE_DEVICE_TABLE(of, ibm_iic_match); static struct platform_driver ibm_iic_driver = { .driver = { .name = "ibm-iic", - .owner = THIS_MODULE, .of_match_table = ibm_iic_match, }, .probe = iic_probe,