--- zzzz-none-000/linux-3.10.107/drivers/ata/pata_rb532_cf.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/ata/pata_rb532_cf.c 2021-02-04 17:41:59.000000000 +0000 @@ -27,11 +27,12 @@ #include #include #include +#include #include #include -#include +#include #define DRV_NAME "pata-rb532-cf" #define DRV_VERSION "0.1.0" @@ -108,6 +109,7 @@ int gpio; struct resource *res; struct ata_host *ah; + struct cf_device *pdata; struct rb532_cf_info *info; int ret; @@ -123,7 +125,13 @@ return -ENOENT; } - gpio = irq_to_gpio(irq); + pdata = dev_get_platdata(&pdev->dev); + if (!pdata) { + dev_err(&pdev->dev, "no platform data specified\n"); + return -EINVAL; + } + + gpio = pdata->gpio_pin; if (gpio < 0) { dev_err(&pdev->dev, "no GPIO found for irq%d\n", irq); return -ENOENT; @@ -193,7 +201,6 @@ .remove = rb532_pata_driver_remove, .driver = { .name = DRV_NAME, - .owner = THIS_MODULE, }, };