]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: wlcore: sdio: Use helper to define resources
authorVasileios Amoiridis <vassilisamir@gmail.com>
Wed, 4 Sep 2024 15:49:19 +0000 (17:49 +0200)
committerKalle Valo <kvalo@kernel.org>
Wed, 18 Sep 2024 13:53:16 +0000 (16:53 +0300)
Resources definition can become simpler and more organised by
using the dedicated helpers.

Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com>
Tested-by: Sabeeh Khan <sabeeh-khan@ti.com>
Reviewed-by: Sabeeh Khan <sabeeh-khan@ti.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/20240904154919.118513-4-vassilisamir@gmail.com
drivers/net/wireless/ti/wlcore/sdio.c

index 9e1b644beba9d0fd8a40327e9d55042d555c4abb..a73207bbe5d7a3c13628d62933e36a6ea30def5b 100644 (file)
@@ -323,15 +323,12 @@ static int wl1271_probe(struct sdio_func *func,
 
        memset(res, 0x00, sizeof(res));
 
-       res[0].start = irq;
-       res[0].flags = IORESOURCE_IRQ | irq_get_trigger_type(irq);
-       res[0].name = "irq";
-
+       res[0] = DEFINE_RES_IRQ_NAMED(irq, "irq");
+       res[0].flags |= irq_get_trigger_type(irq);
 
        if (wakeirq > 0) {
-               res[1].start = wakeirq;
-               res[1].flags = IORESOURCE_IRQ | irq_get_trigger_type(wakeirq);
-               res[1].name = "wakeirq";
+               res[1] = DEFINE_RES_IRQ_NAMED(wakeirq, "wakeirq");
+               res[1].flags |= irq_get_trigger_type(wakeirq);
                num_irqs = 2;
        } else {
                num_irqs = 1;