diff options
-rw-r--r-- | drivers/gpio/gpio-langwell.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/gpio/gpio-langwell.c b/drivers/gpio/gpio-langwell.c index a0190de14371..fff661126dc7 100644 --- a/drivers/gpio/gpio-langwell.c +++ b/drivers/gpio/gpio-langwell.c | |||
@@ -65,7 +65,7 @@ enum GPIO_REG { | |||
65 | 65 | ||
66 | struct lnw_gpio { | 66 | struct lnw_gpio { |
67 | struct gpio_chip chip; | 67 | struct gpio_chip chip; |
68 | void *reg_base; | 68 | void __iomem *reg_base; |
69 | spinlock_t lock; | 69 | spinlock_t lock; |
70 | struct pci_dev *pdev; | 70 | struct pci_dev *pdev; |
71 | struct irq_domain *domain; | 71 | struct irq_domain *domain; |
@@ -318,9 +318,9 @@ static const struct dev_pm_ops lnw_gpio_pm_ops = { | |||
318 | }; | 318 | }; |
319 | 319 | ||
320 | static int lnw_gpio_probe(struct pci_dev *pdev, | 320 | static int lnw_gpio_probe(struct pci_dev *pdev, |
321 | const struct pci_device_id *id) | 321 | const struct pci_device_id *id) |
322 | { | 322 | { |
323 | void *base; | 323 | void __iomem *base; |
324 | resource_size_t start, len; | 324 | resource_size_t start, len; |
325 | struct lnw_gpio *lnw; | 325 | struct lnw_gpio *lnw; |
326 | u32 gpio_base; | 326 | u32 gpio_base; |
@@ -346,8 +346,10 @@ static int lnw_gpio_probe(struct pci_dev *pdev, | |||
346 | retval = -EFAULT; | 346 | retval = -EFAULT; |
347 | goto err_ioremap; | 347 | goto err_ioremap; |
348 | } | 348 | } |
349 | irq_base = *(u32 *)base; | 349 | |
350 | gpio_base = *((u32 *)base + 1); | 350 | irq_base = readl(base); |
351 | gpio_base = readl(sizeof(u32) + base); | ||
352 | |||
351 | /* release the IO mapping, since we already get the info from bar1 */ | 353 | /* release the IO mapping, since we already get the info from bar1 */ |
352 | iounmap(base); | 354 | iounmap(base); |
353 | /* get the register base from bar0 */ | 355 | /* get the register base from bar0 */ |