diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2018-08-30 12:52:49 -0400 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2018-10-23 03:58:34 -0400 |
commit | 95d617b4d66cd783f643cb763c096c2ce5f6b490 (patch) | |
tree | 1dffb5b6dd887ed625fcea37d0218d41889b57f1 | |
parent | 86f955d29ff83e15da62ad5de53a5480309da078 (diff) |
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>
-rw-r--r-- | drivers/mfd/intel_msic.c | 44 |
1 files changed, 10 insertions, 34 deletions
diff --git a/drivers/mfd/intel_msic.c b/drivers/mfd/intel_msic.c index 2017446c5b4b..441de7b3d231 100644 --- a/drivers/mfd/intel_msic.c +++ b/drivers/mfd/intel_msic.c | |||
@@ -54,68 +54,44 @@ struct intel_msic { | |||
54 | }; | 54 | }; |
55 | 55 | ||
56 | static struct resource msic_touch_resources[] = { | 56 | static struct resource msic_touch_resources[] = { |
57 | { | 57 | DEFINE_RES_IRQ(0), |
58 | .flags = IORESOURCE_IRQ, | ||
59 | }, | ||
60 | }; | 58 | }; |
61 | 59 | ||
62 | static struct resource msic_adc_resources[] = { | 60 | static struct resource msic_adc_resources[] = { |
63 | { | 61 | DEFINE_RES_IRQ(0), |
64 | .flags = IORESOURCE_IRQ, | ||
65 | }, | ||
66 | }; | 62 | }; |
67 | 63 | ||
68 | static struct resource msic_battery_resources[] = { | 64 | static struct resource msic_battery_resources[] = { |
69 | { | 65 | DEFINE_RES_IRQ(0), |
70 | .flags = IORESOURCE_IRQ, | ||
71 | }, | ||
72 | }; | 66 | }; |
73 | 67 | ||
74 | static struct resource msic_gpio_resources[] = { | 68 | static struct resource msic_gpio_resources[] = { |
75 | { | 69 | DEFINE_RES_IRQ(0), |
76 | .flags = IORESOURCE_IRQ, | ||
77 | }, | ||
78 | }; | 70 | }; |
79 | 71 | ||
80 | static struct resource msic_audio_resources[] = { | 72 | static struct resource msic_audio_resources[] = { |
81 | { | 73 | DEFINE_RES_IRQ_NAMED(0, "IRQ"), |
82 | .name = "IRQ", | ||
83 | .flags = IORESOURCE_IRQ, | ||
84 | }, | ||
85 | /* | 74 | /* |
86 | * We will pass IRQ_BASE to the driver now but this can be removed | 75 | * We will pass IRQ_BASE to the driver now but this can be removed |
87 | * when/if the driver starts to use intel_msic_irq_read(). | 76 | * when/if the driver starts to use intel_msic_irq_read(). |
88 | */ | 77 | */ |
89 | { | 78 | DEFINE_RES_MEM_NAMED(MSIC_IRQ_STATUS_ACCDET, 1, "IRQ_BASE"), |
90 | .name = "IRQ_BASE", | ||
91 | .flags = IORESOURCE_MEM, | ||
92 | .start = MSIC_IRQ_STATUS_ACCDET, | ||
93 | .end = MSIC_IRQ_STATUS_ACCDET, | ||
94 | }, | ||
95 | }; | 79 | }; |
96 | 80 | ||
97 | static struct resource msic_hdmi_resources[] = { | 81 | static struct resource msic_hdmi_resources[] = { |
98 | { | 82 | DEFINE_RES_IRQ(0), |
99 | .flags = IORESOURCE_IRQ, | ||
100 | }, | ||
101 | }; | 83 | }; |
102 | 84 | ||
103 | static struct resource msic_thermal_resources[] = { | 85 | static struct resource msic_thermal_resources[] = { |
104 | { | 86 | DEFINE_RES_IRQ(0), |
105 | .flags = IORESOURCE_IRQ, | ||
106 | }, | ||
107 | }; | 87 | }; |
108 | 88 | ||
109 | static struct resource msic_power_btn_resources[] = { | 89 | static struct resource msic_power_btn_resources[] = { |
110 | { | 90 | DEFINE_RES_IRQ(0), |
111 | .flags = IORESOURCE_IRQ, | ||
112 | }, | ||
113 | }; | 91 | }; |
114 | 92 | ||
115 | static struct resource msic_ocd_resources[] = { | 93 | static struct resource msic_ocd_resources[] = { |
116 | { | 94 | DEFINE_RES_IRQ(0), |
117 | .flags = IORESOURCE_IRQ, | ||
118 | }, | ||
119 | }; | 95 | }; |
120 | 96 | ||
121 | /* | 97 | /* |