lkml.org 
[lkml]   [2020]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2] i2c: cadence: Add an error handling for platform_get_irq()
From
Date
On 22. 05. 20 17:14, Wolfram Sang wrote:
>
>> The change is valid but the question is if make sense to do it in this
>> way. Some drivers are using devm_request_irq to do do job.
>>
>> For example:
>> id->irq = platform_get_irq(pdev, 0);
>> ret = devm_request_irq(&pdev->dev, id->irq, cdns_i2c_isr, 0,
>> DRIVER_NAME, id);
>> if (ret)
>> return ret;
>
> I like this version better. Maybe we should simply move the
> platform_get_irq() line to the devm_request_irq() call?

You know about
devm_platform_get_and_ioremap_resource()
usage.
Maybe that's the way to go. Because as of today there is no way to pass
position of irq resource.

But I expect it will come in near future.

Thanks,
Michal

\
 
 \ /
  Last update: 2020-05-22 17:27    [W:0.073 / U:13.828 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site