Commit 5f3b82a1 authored by Andy Shevchenko's avatar Andy Shevchenko

pinctrl: lynxpoint: Use platform_get_irq_optional() explicitly

There is no need to repeat functionality of platform_get_irq_optional()
in the driver. Replace it with explicit call to the helper.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent f86a1bb5
...@@ -794,11 +794,11 @@ static int lp_gpio_probe(struct platform_device *pdev) ...@@ -794,11 +794,11 @@ static int lp_gpio_probe(struct platform_device *pdev)
const struct intel_pinctrl_soc_data *soc; const struct intel_pinctrl_soc_data *soc;
struct intel_pinctrl *lg; struct intel_pinctrl *lg;
struct gpio_chip *gc; struct gpio_chip *gc;
struct resource *io_rc, *irq_rc;
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct resource *io_rc;
void __iomem *regs; void __iomem *regs;
unsigned int i; unsigned int i;
int ret; int irq, ret;
soc = (const struct intel_pinctrl_soc_data *)device_get_match_data(dev); soc = (const struct intel_pinctrl_soc_data *)device_get_match_data(dev);
if (!soc) if (!soc)
...@@ -870,8 +870,8 @@ static int lp_gpio_probe(struct platform_device *pdev) ...@@ -870,8 +870,8 @@ static int lp_gpio_probe(struct platform_device *pdev)
gc->parent = dev; gc->parent = dev;
/* set up interrupts */ /* set up interrupts */
irq_rc = platform_get_resource(pdev, IORESOURCE_IRQ, 0); irq = platform_get_irq_optional(pdev, 0);
if (irq_rc && irq_rc->start) { if (irq > 0) {
struct gpio_irq_chip *girq; struct gpio_irq_chip *girq;
girq = &gc->irq; girq = &gc->irq;
...@@ -884,7 +884,7 @@ static int lp_gpio_probe(struct platform_device *pdev) ...@@ -884,7 +884,7 @@ static int lp_gpio_probe(struct platform_device *pdev)
GFP_KERNEL); GFP_KERNEL);
if (!girq->parents) if (!girq->parents)
return -ENOMEM; return -ENOMEM;
girq->parents[0] = (unsigned int)irq_rc->start; girq->parents[0] = irq;
girq->default_type = IRQ_TYPE_NONE; girq->default_type = IRQ_TYPE_NONE;
girq->handler = handle_bad_irq; girq->handler = handle_bad_irq;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment