linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] platform/chrome: cros_ec_lpc: Use platform_get_irq_optional() for optional IRQs
@ 2019-11-29 10:22 Enric Balletbo i Serra
  2019-11-29 15:56 ` Guenter Roeck
  0 siblings, 1 reply; 3+ messages in thread
From: Enric Balletbo i Serra @ 2019-11-29 10:22 UTC (permalink / raw)
  To: linux-kernel; +Cc: Collabora Kernel ML, groeck, bleung, dtor

As platform_get_irq() now prints an error when the interrupt does not
exist, use platform_get_irq_optional() to get the IRQ which is optional
to avoid below error message during probe:

  [    5.113502] cros_ec_lpcs GOOG0004:00: IRQ index 0 not found

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
---

 drivers/platform/chrome/cros_ec_lpc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/chrome/cros_ec_lpc.c b/drivers/platform/chrome/cros_ec_lpc.c
index dccf479c6625..ffdea7c347f2 100644
--- a/drivers/platform/chrome/cros_ec_lpc.c
+++ b/drivers/platform/chrome/cros_ec_lpc.c
@@ -396,7 +396,7 @@ static int cros_ec_lpc_probe(struct platform_device *pdev)
 	 * Some boards do not have an IRQ allotted for cros_ec_lpc,
 	 * which makes ENXIO an expected (and safe) scenario.
 	 */
-	irq = platform_get_irq(pdev, 0);
+	irq = platform_get_irq_optional(pdev, 0);
 	if (irq > 0)
 		ec_dev->irq = irq;
 	else if (irq != -ENXIO) {
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] platform/chrome: cros_ec_lpc: Use platform_get_irq_optional() for optional IRQs
  2019-11-29 10:22 [PATCH] platform/chrome: cros_ec_lpc: Use platform_get_irq_optional() for optional IRQs Enric Balletbo i Serra
@ 2019-11-29 15:56 ` Guenter Roeck
  2019-12-14 11:53   ` Enric Balletbo i Serra
  0 siblings, 1 reply; 3+ messages in thread
From: Guenter Roeck @ 2019-11-29 15:56 UTC (permalink / raw)
  To: Enric Balletbo i Serra
  Cc: linux-kernel, Collabora Kernel ML, Guenter Roeck, Benson Leung,
	Dmitry Torokhov

On Fri, Nov 29, 2019 at 2:23 AM Enric Balletbo i Serra
<enric.balletbo@collabora.com> wrote:
>
> As platform_get_irq() now prints an error when the interrupt does not
> exist, use platform_get_irq_optional() to get the IRQ which is optional
> to avoid below error message during probe:
>
>   [    5.113502] cros_ec_lpcs GOOG0004:00: IRQ index 0 not found
>
> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>

Reviewed-by: Guenter Roeck <groeck@chromium.org>

> ---
>
>  drivers/platform/chrome/cros_ec_lpc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/platform/chrome/cros_ec_lpc.c b/drivers/platform/chrome/cros_ec_lpc.c
> index dccf479c6625..ffdea7c347f2 100644
> --- a/drivers/platform/chrome/cros_ec_lpc.c
> +++ b/drivers/platform/chrome/cros_ec_lpc.c
> @@ -396,7 +396,7 @@ static int cros_ec_lpc_probe(struct platform_device *pdev)
>          * Some boards do not have an IRQ allotted for cros_ec_lpc,
>          * which makes ENXIO an expected (and safe) scenario.
>          */
> -       irq = platform_get_irq(pdev, 0);
> +       irq = platform_get_irq_optional(pdev, 0);
>         if (irq > 0)
>                 ec_dev->irq = irq;
>         else if (irq != -ENXIO) {
> --
> 2.20.1
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] platform/chrome: cros_ec_lpc: Use platform_get_irq_optional() for optional IRQs
  2019-11-29 15:56 ` Guenter Roeck
@ 2019-12-14 11:53   ` Enric Balletbo i Serra
  0 siblings, 0 replies; 3+ messages in thread
From: Enric Balletbo i Serra @ 2019-12-14 11:53 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: linux-kernel, Collabora Kernel ML, Guenter Roeck, Benson Leung,
	Dmitry Torokhov

Hi,

On 29/11/19 16:56, Guenter Roeck wrote:
> On Fri, Nov 29, 2019 at 2:23 AM Enric Balletbo i Serra
> <enric.balletbo@collabora.com> wrote:
>>
>> As platform_get_irq() now prints an error when the interrupt does not
>> exist, use platform_get_irq_optional() to get the IRQ which is optional
>> to avoid below error message during probe:
>>
>>   [    5.113502] cros_ec_lpcs GOOG0004:00: IRQ index 0 not found
>>
>> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> 
> Reviewed-by: Guenter Roeck <groeck@chromium.org>
> 

Queued for 5.6.

>> ---
>>
>>  drivers/platform/chrome/cros_ec_lpc.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/platform/chrome/cros_ec_lpc.c b/drivers/platform/chrome/cros_ec_lpc.c
>> index dccf479c6625..ffdea7c347f2 100644
>> --- a/drivers/platform/chrome/cros_ec_lpc.c
>> +++ b/drivers/platform/chrome/cros_ec_lpc.c
>> @@ -396,7 +396,7 @@ static int cros_ec_lpc_probe(struct platform_device *pdev)
>>          * Some boards do not have an IRQ allotted for cros_ec_lpc,
>>          * which makes ENXIO an expected (and safe) scenario.
>>          */
>> -       irq = platform_get_irq(pdev, 0);
>> +       irq = platform_get_irq_optional(pdev, 0);
>>         if (irq > 0)
>>                 ec_dev->irq = irq;
>>         else if (irq != -ENXIO) {
>> --
>> 2.20.1
>>
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-12-14 11:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-29 10:22 [PATCH] platform/chrome: cros_ec_lpc: Use platform_get_irq_optional() for optional IRQs Enric Balletbo i Serra
2019-11-29 15:56 ` Guenter Roeck
2019-12-14 11:53   ` Enric Balletbo i Serra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).