[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20210604064551.140608-1-dingsenjie@163.com>
Date: Fri, 4 Jun 2021 14:45:51 +0800
From: dingsenjie@....com
To: davem@...emloft.net, kuba@...nel.org
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
dingsenjie <dingsenjie@...ong.com>
Subject: [PATCH] net: fjes: Use DEFINE_RES_MEM() and DEFINE_RES_IRQ() to simplify code
From: dingsenjie <dingsenjie@...ong.com>
Use macro to simplify the code.
Signed-off-by: dingsenjie <dingsenjie@...ong.com>
---
drivers/net/fjes/fjes_main.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/net/fjes/fjes_main.c b/drivers/net/fjes/fjes_main.c
index 4666226..d098b1f 100644
--- a/drivers/net/fjes/fjes_main.c
+++ b/drivers/net/fjes/fjes_main.c
@@ -90,16 +90,8 @@
};
static struct resource fjes_resource[] = {
- {
- .flags = IORESOURCE_MEM,
- .start = 0,
- .end = 0,
- },
- {
- .flags = IORESOURCE_IRQ,
- .start = 0,
- .end = 0,
- },
+ DEFINE_RES_MEM(0, 1),
+ DEFINE_RES_IRQ(0)
};
static bool is_extended_socket_device(struct acpi_device *device)
--
1.9.1
Powered by blists - more mailing lists