--- zzzz-none-000/linux-3.10.107/drivers/uio/uio_dmem_genirq.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/uio/uio_dmem_genirq.c 2021-02-04 17:41:59.000000000 +0000 @@ -146,7 +146,7 @@ static int uio_dmem_genirq_probe(struct platform_device *pdev) { - struct uio_dmem_genirq_pdata *pdata = pdev->dev.platform_data; + struct uio_dmem_genirq_pdata *pdata = dev_get_platdata(&pdev->dev); struct uio_info *uioinfo = &pdata->uioinfo; struct uio_dmem_genirq_platdata *priv; struct uio_mem *uiomem; @@ -204,7 +204,7 @@ ret = platform_get_irq(pdev, 0); if (ret < 0) { dev_err(&pdev->dev, "failed to get IRQ\n"); - goto bad0; + goto bad1; } uioinfo->irq = ret; } @@ -275,6 +275,7 @@ ret = uio_register_device(&pdev->dev, priv->uioinfo); if (ret) { dev_err(&pdev->dev, "unable to register uio device\n"); + pm_runtime_disable(&pdev->dev); goto bad1; } @@ -282,7 +283,6 @@ return 0; bad1: kfree(priv); - pm_runtime_disable(&pdev->dev); bad0: /* kfree uioinfo for OF */ if (pdev->dev.of_node) @@ -336,8 +336,6 @@ { /* empty for now */ }, }; MODULE_DEVICE_TABLE(of, uio_of_genirq_match); -#else -# define uio_of_genirq_match NULL #endif static struct platform_driver uio_dmem_genirq = { @@ -345,9 +343,8 @@ .remove = uio_dmem_genirq_remove, .driver = { .name = DRIVER_NAME, - .owner = THIS_MODULE, .pm = &uio_dmem_genirq_dev_pm_ops, - .of_match_table = uio_of_genirq_match, + .of_match_table = of_match_ptr(uio_of_genirq_match), }, };