* [PATCH] staging: board: use appropriate macro to initialize struct
@ 2019-09-19 11:39 Aurabindo Jayamohanan
0 siblings, 0 replies; only message in thread
From: Aurabindo Jayamohanan @ 2019-09-19 11:39 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel
Make code more readable by using macros defined for initializing
struct resource
Signed-off-by: Aurabindo Jayamohanan <mail@aurabindo.in>
---
drivers/staging/board/armadillo800eva.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/board/armadillo800eva.c b/drivers/staging/board/armadillo800eva.c
index 962cc0c79988..0225234dd7aa 100644
--- a/drivers/staging/board/armadillo800eva.c
+++ b/drivers/staging/board/armadillo800eva.c
@@ -50,16 +50,8 @@ static struct sh_mobile_lcdc_info lcdc0_info = {
};
static struct resource lcdc0_resources[] = {
- [0] = {
- .name = "LCD0",
- .start = 0xfe940000,
- .end = 0xfe943fff,
- .flags = IORESOURCE_MEM,
- },
- [1] = {
- .start = 177 + 32,
- .flags = IORESOURCE_IRQ,
- },
+ DEFINE_RES_MEM_NAMED(0xfe940000, 0x4000, "LCD0"),
+ DEFINE_RES_IRQ(177 + 32),
};
static struct platform_device lcdc0_device = {
--
2.23.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-09-19 11:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-19 11:39 [PATCH] staging: board: use appropriate macro to initialize struct Aurabindo Jayamohanan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).