fjes: Use DEFINE_RES_MEM() and DEFINE_RES_IRQ() to simplify code
authorZhen Lei <thunder.leizhen@huawei.com>
Tue, 1 Jun 2021 06:27:36 +0000 (14:27 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 1 Jun 2021 22:20:47 +0000 (15:20 -0700)
No functional change.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/fjes/fjes_main.c

index 466622664424dcd14085257b76c32790f8eff6e6..d098b1fcf0067b1c9b09b88fe8671cc6b042b043 100644 (file)
@@ -90,16 +90,8 @@ static struct platform_driver fjes_driver = {
 };
 
 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)