lkml.org 
[lkml]   [2022]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v2 3/3] i2c: smbus: Use device_*() functions instead of of_*()
Date
> On Wed, Jan 12, 2022 at 4:15 PM Akhil R <akhilrajeev@nvidia.com> wrote:
> >
> > Change of_*() functions to device_*() for firmware agnostic usage.
> > This allows to have smbus_alert interrupt without any changes
>
> the smbus_alert
>
> > in the controller drivers using ACPI table.
>
> the ACPI
>
> ...
>
> This change reveals potential issue:
>
> > - irq = of_irq_get_byname(adapter->dev.of_node, "smbus_alert");
> > + irq = device_irq_get_byname(adapter->dev.parent, "smbus_alert");
>
> > if (irq <= 0)
>
> I guess this '= 0' part should be fixed first.

'0' is a failure as per the documentation of of_irq_get_byname() as well as
of_irq_get(). The case is different for acpi_irq_get(), but it is handled in
fwnode_irq_get(). If I understood it right, a return value of '0' should be
considered a failure here.

Thanks,
Akhil
\
 
 \ /
  Last update: 2022-01-20 10:49    [W:0.094 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site