Skip to content

Commit 76709e0

Browse files
andy-shevakpm00
authored andcommitted
resource: replace open coded variant of DEFINE_RES_NAMED_DESC()
Replace open coded variant of DEFINE_RES_NAMED_DESC(). Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Andy Shevchenko <[email protected]> Cc: Ilpo Järvinen <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 8ee065a commit 76709e0

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

kernel/resource.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1975,11 +1975,7 @@ get_free_mem_region(struct device *dev, struct resource *base,
19751975
*/
19761976
revoke_iomem(res);
19771977
} else {
1978-
res->start = addr;
1979-
res->end = addr + size - 1;
1980-
res->name = name;
1981-
res->desc = desc;
1982-
res->flags = IORESOURCE_MEM;
1978+
*res = DEFINE_RES_NAMED_DESC(addr, size, name, IORESOURCE_MEM, desc);
19831979

19841980
/*
19851981
* Only succeed if the resource hosts an exclusive

0 commit comments

Comments
 (0)