Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mfd: intel_msic: Use DEFINE_RES_IRQ() macro

Instead of open coding each data structure with IRQ resources,
use dedicated macro.

In one case use DEFINE_RES_IRQ_NAMED() and DEFINE_RES_MEM_NAMED().

No functional change intended.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

authored by

Andy Shevchenko and committed by
Lee Jones
95d617b4 86f955d2

+10 -34
+10 -34
drivers/mfd/intel_msic.c
··· 54 54 }; 55 55 56 56 static struct resource msic_touch_resources[] = { 57 - { 58 - .flags = IORESOURCE_IRQ, 59 - }, 57 + DEFINE_RES_IRQ(0), 60 58 }; 61 59 62 60 static struct resource msic_adc_resources[] = { 63 - { 64 - .flags = IORESOURCE_IRQ, 65 - }, 61 + DEFINE_RES_IRQ(0), 66 62 }; 67 63 68 64 static struct resource msic_battery_resources[] = { 69 - { 70 - .flags = IORESOURCE_IRQ, 71 - }, 65 + DEFINE_RES_IRQ(0), 72 66 }; 73 67 74 68 static struct resource msic_gpio_resources[] = { 75 - { 76 - .flags = IORESOURCE_IRQ, 77 - }, 69 + DEFINE_RES_IRQ(0), 78 70 }; 79 71 80 72 static struct resource msic_audio_resources[] = { 81 - { 82 - .name = "IRQ", 83 - .flags = IORESOURCE_IRQ, 84 - }, 73 + DEFINE_RES_IRQ_NAMED(0, "IRQ"), 85 74 /* 86 75 * We will pass IRQ_BASE to the driver now but this can be removed 87 76 * when/if the driver starts to use intel_msic_irq_read(). 88 77 */ 89 - { 90 - .name = "IRQ_BASE", 91 - .flags = IORESOURCE_MEM, 92 - .start = MSIC_IRQ_STATUS_ACCDET, 93 - .end = MSIC_IRQ_STATUS_ACCDET, 94 - }, 78 + DEFINE_RES_MEM_NAMED(MSIC_IRQ_STATUS_ACCDET, 1, "IRQ_BASE"), 95 79 }; 96 80 97 81 static struct resource msic_hdmi_resources[] = { 98 - { 99 - .flags = IORESOURCE_IRQ, 100 - }, 82 + DEFINE_RES_IRQ(0), 101 83 }; 102 84 103 85 static struct resource msic_thermal_resources[] = { 104 - { 105 - .flags = IORESOURCE_IRQ, 106 - }, 86 + DEFINE_RES_IRQ(0), 107 87 }; 108 88 109 89 static struct resource msic_power_btn_resources[] = { 110 - { 111 - .flags = IORESOURCE_IRQ, 112 - }, 90 + DEFINE_RES_IRQ(0), 113 91 }; 114 92 115 93 static struct resource msic_ocd_resources[] = { 116 - { 117 - .flags = IORESOURCE_IRQ, 118 - }, 94 + DEFINE_RES_IRQ(0), 119 95 }; 120 96 121 97 /*