Skip to contentSkip to conversation

staging: board: use appropriate macro to initialize struct

PATCH New Aurabindo Jayamohanan 1 participant 1 message Sep 19, 2019 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: board: use appropriate macro to initialize struct

Make code more readable by using macros defined for initializing struct resource

---
 drivers/staging/board/armadillo800eva.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)
drivers/staging/board/armadillo800eva.c +2 -10
index 962cc0c79988..0225234dd7aa 100644
@@ -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 = {
Signature · 1 line
2.23.0