pinctrl: baytrail: Use platform_get_irq_optional() explicitly
Subsystems (3)
PATCH 1/2 pinctrl: baytrail: 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.
--- drivers/pinctrl/intel/pinctrl-baytrail.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/pinctrl/intel/pinctrl-baytrail.c +4 -5
@@ -1506,8 +1506,7 @@ static int byt_gpio_probe(struct intel_pinctrl *vg) {struct platform_device *pdev =to_platform_device (vg->dev);struct gpio_chip *gc; -struct resource *irq_rc; -int ret; +int irq, ret;/* Set up gpio chip */ vg->chip = byt_gpio_chip;
@@ -1527,8 +1526,8 @@ static int byt_gpio_probe(struct intel_pinctrl *vg)#endif /* set up interrupts */ - irq_rc =platform_get_resource (pdev,IORESOURCE_IRQ ,0 ); -if (irq_rc && irq_rc->start) { + irq =platform_get_irq_optional (pdev,0 ); +if (irq >0 ) {struct gpio_irq_chip *girq; vg->irqchip.name = "BYT-GPIO",
@@ -1548,7 +1547,7 @@ static int byt_gpio_probe(struct intel_pinctrl *vg) sizeof(*girq->parents), GFP_KERNEL);if (!girq->parents)return -ENOMEM ; - girq->parents[0 ] = (unsigned int )irq_rc->start; + girq->parents[0 ] = irq; girq->default_type =IRQ_TYPE_NONE ; girq->handler = handle_bad_irq; }
Signature · 1 line
2.25.1
PATCH 2/2 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.
--- drivers/pinctrl/intel/pinctrl-lynxpoint.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/pinctrl/intel/pinctrl-lynxpoint.c +5 -5
@@ -794,11 +794,11 @@ static int lp_gpio_probe(struct platform_device *pdev)const struct intel_pinctrl_soc_data *soc;struct intel_pinctrl *lg;struct gpio_chip *gc; -struct resource *io_rc, *irq_rc;struct device *dev = &pdev->dev; +struct resource *io_rc;void __iomem *regs;unsigned int i; -int ret; +int irq, ret; soc = (const struct intel_pinctrl_soc_data *)device_get_match_data (dev);if (!soc)
@@ -870,8 +870,8 @@ static int lp_gpio_probe(struct platform_device *pdev) gc->parent = dev;/* set up interrupts */ - irq_rc =platform_get_resource (pdev,IORESOURCE_IRQ ,0 ); -if (irq_rc && irq_rc->start) { + irq =platform_get_irq_optional (pdev,0 ); +if (irq >0 ) {struct gpio_irq_chip *girq; girq = &gc->irq;
@@ -884,7 +884,7 @@ static int lp_gpio_probe(struct platform_device *pdev) GFP_KERNEL);if (!girq->parents)return -ENOMEM ; - girq->parents[0 ] = (unsigned int )irq_rc->start; + girq->parents[0 ] = irq; girq->default_type =IRQ_TYPE_NONE ; girq->handler = handle_bad_irq; }
Signature · 1 line
2.25.1
Re: [PATCH v1 2/2] pinctrl: lynxpoint: Use platform_get_irq_optional() explicitly
Quoted 4 lines · Andy Shevchenko
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 Andy Shevchenko <[email protected]>
Re: [PATCH v1 2/2] pinctrl: lynxpoint: Use platform_get_irq_optional() explicitly
In reply to Andy ShevchenkoQuoted 4 lines · Andy Shevchenko
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 Andy Shevchenko <[email protected]>
For all Intel pinctrl patches I will occasionally review and othewise just wait for your pull requests.
Yours,
Linus Walleij
Quoted 4 lines · Andy Shevchenko
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 Andy Shevchenko <[email protected]>
Quoted 7 lines · Mika Westerberg
Quoted 4 lines · Andy Shevchenko
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 Andy Shevchenko <[email protected]>Acked-by Mika Westerberg <[email protected]>
Both applied to my review and testing queue, thanks!
Signature · 2 lines
With Best Regards, Andy Shevchenko