diff options
author | Tejun Heo <tj@kernel.org> | 2016-03-11 17:30:17 (GMT) |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2016-03-11 17:30:17 (GMT) |
commit | fe6c58146d42785386ca69bb1e35d53ac5940cb7 (patch) | |
tree | be4006ac033d638071f65851403c42b382b23427 /drivers/ata/pata_rb532_cf.c | |
parent | 51b1b2867b81450bd198b691c70dccb582e961ff (diff) | |
parent | dc8b4afc4a04fac8ee55a19b59f2356a25e7e778 (diff) | |
download | linux-fe6c58146d42785386ca69bb1e35d53ac5940cb7.tar.xz |
Merge branch 'for-4.5-fixes' into for-4.6
Diffstat (limited to 'drivers/ata/pata_rb532_cf.c')
-rw-r--r-- | drivers/ata/pata_rb532_cf.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/ata/pata_rb532_cf.c b/drivers/ata/pata_rb532_cf.c index 12fe0f3..c8b6a78 100644 --- a/drivers/ata/pata_rb532_cf.c +++ b/drivers/ata/pata_rb532_cf.c @@ -32,6 +32,8 @@ #include <linux/libata.h> #include <scsi/scsi_host.h> +#include <asm/mach-rc32434/rb.h> + #define DRV_NAME "pata-rb532-cf" #define DRV_VERSION "0.1.0" #define DRV_DESC "PATA driver for RouterBOARD 532 Compact Flash" @@ -107,6 +109,7 @@ static int rb532_pata_driver_probe(struct platform_device *pdev) int gpio; struct resource *res; struct ata_host *ah; + struct cf_device *pdata; struct rb532_cf_info *info; int ret; @@ -122,7 +125,13 @@ static int rb532_pata_driver_probe(struct platform_device *pdev) 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; |