--- zzzz-none-000/linux-3.10.107/drivers/mfd/sta2x11-mfd.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/mfd/sta2x11-mfd.c 2021-02-04 17:41:59.000000000 +0000 @@ -133,7 +133,7 @@ void __iomem **regs, spinlock_t **lock) { - struct pci_dev *pdev = *(struct pci_dev **)(dev->dev.platform_data); + struct pci_dev *pdev = *(struct pci_dev **)dev_get_platdata(&dev->dev); struct sta2x11_mfd *mfd; if (!pdev) @@ -312,7 +312,7 @@ const char *name = sta2x11_mfd_names[index]; struct regmap_config *regmap_config = sta2x11_mfd_regmap_configs[index]; - pdev = dev->dev.platform_data; + pdev = dev_get_platdata(&dev->dev); mfd = sta2x11_mfd_find(*pdev); if (!mfd) return -ENODEV; @@ -339,7 +339,7 @@ regmap_config->cache_type = REGCACHE_NONE; mfd->regmap[index] = devm_regmap_init_mmio(&dev->dev, mfd->regs[index], regmap_config); - WARN_ON(!mfd->regmap[index]); + WARN_ON(IS_ERR(mfd->regmap[index])); return 0; } @@ -368,7 +368,6 @@ static struct platform_driver sta2x11_sctl_platform_driver = { .driver = { .name = STA2X11_MFD_SCTL_NAME, - .owner = THIS_MODULE, }, .probe = sta2x11_sctl_probe, }; @@ -382,7 +381,6 @@ static struct platform_driver sta2x11_platform_driver = { .driver = { .name = STA2X11_MFD_APBREG_NAME, - .owner = THIS_MODULE, }, .probe = sta2x11_apbreg_probe, }; @@ -396,7 +394,6 @@ static struct platform_driver sta2x11_apb_soc_regs_platform_driver = { .driver = { .name = STA2X11_MFD_APB_SOC_REGS_NAME, - .owner = THIS_MODULE, }, .probe = sta2x11_apb_soc_regs_probe, }; @@ -410,7 +407,6 @@ static struct platform_driver sta2x11_scr_platform_driver = { .driver = { .name = STA2X11_MFD_SCR_NAME, - .owner = THIS_MODULE, }, .probe = sta2x11_scr_probe, }; @@ -529,7 +525,7 @@ { int err; - pci_set_power_state(pdev, 0); + pci_set_power_state(pdev, PCI_D0); err = pci_enable_device(pdev); if (err) return err; @@ -642,7 +638,7 @@ return err; } -static DEFINE_PCI_DEVICE_TABLE(sta2x11_mfd_tbl) = { +static const struct pci_device_id sta2x11_mfd_tbl[] = { {PCI_DEVICE(PCI_VENDOR_ID_STMICRO, PCI_DEVICE_ID_STMICRO_GPIO)}, {PCI_DEVICE(PCI_VENDOR_ID_STMICRO, PCI_DEVICE_ID_STMICRO_VIC)}, {0,},