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/20250317181412.1560630-3-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
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)