lkml.org 
[lkml]   [2019]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2] drivers: gpio: sprd: use devm_platform_ioremap_resource()
From
Date
On 12.03.19 09:49, Baolin Wang wrote:

> I still do not think the new API is suitable for this case. Since we
> can have optional multiple IO resources, so the original code will not
> return errors if we did not get the IO resources, but we must cast
> errors if we failed to do ioremap. But you ignore the errors of
> ioremap, which is not good.

hmm, maybe we can differenciate on the error code ?

patch up devm_platform_ioremap_resource() so it returns -ENOENT if
there's no such resource defined. I suppose, ioremap() doesn't have
a valid case for -ENOENT (but haven't checked yet).


--mtx

--
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info@metux.net -- +49-151-27565287

\
 
 \ /
  Last update: 2019-03-12 10:31    [W:0.038 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site