lkml.org 
[lkml]   [2020]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1] i2c: busses: convert to devm_platform_get_and_ioremap_resource
On Tue, Apr 14, 2020 at 09:48:27PM +0800, Dejin Zheng wrote:
> use devm_platform_get_and_ioremap_resource() to simplify code, which
> contains platform_get_resource() and devm_ioremap_resource(), it also
> get the resource for use by the following code.
>
> Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>

Applied to for-next, because it seems 'the new way' but...

> - r_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - id->membase = devm_ioremap_resource(&pdev->dev, r_mem);
> + id->membase = devm_platform_get_and_ioremap_resource(pdev, 0, &r_mem);

... guys, do you really think this one line reduction improves
readability? Oh well...

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2020-04-15 12:28    [W:0.081 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site