hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/mfd/intel_msic.c
....@@ -1,12 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0
12 /*
23 * Driver for Intel MSIC
34 *
45 * Copyright (C) 2011, Intel Corporation
56 * Author: Mika Westerberg <mika.westerberg@linux.intel.com>
6
- *
7
- * This program is free software; you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License version 2 as
9
- * published by the Free Software Foundation.
107 */
118
129 #include <linux/err.h>
....@@ -54,68 +51,44 @@
5451 };
5552
5653 static struct resource msic_touch_resources[] = {
57
- {
58
- .flags = IORESOURCE_IRQ,
59
- },
54
+ DEFINE_RES_IRQ(0),
6055 };
6156
6257 static struct resource msic_adc_resources[] = {
63
- {
64
- .flags = IORESOURCE_IRQ,
65
- },
58
+ DEFINE_RES_IRQ(0),
6659 };
6760
6861 static struct resource msic_battery_resources[] = {
69
- {
70
- .flags = IORESOURCE_IRQ,
71
- },
62
+ DEFINE_RES_IRQ(0),
7263 };
7364
7465 static struct resource msic_gpio_resources[] = {
75
- {
76
- .flags = IORESOURCE_IRQ,
77
- },
66
+ DEFINE_RES_IRQ(0),
7867 };
7968
8069 static struct resource msic_audio_resources[] = {
81
- {
82
- .name = "IRQ",
83
- .flags = IORESOURCE_IRQ,
84
- },
70
+ DEFINE_RES_IRQ_NAMED(0, "IRQ"),
8571 /*
8672 * We will pass IRQ_BASE to the driver now but this can be removed
8773 * when/if the driver starts to use intel_msic_irq_read().
8874 */
89
- {
90
- .name = "IRQ_BASE",
91
- .flags = IORESOURCE_MEM,
92
- .start = MSIC_IRQ_STATUS_ACCDET,
93
- .end = MSIC_IRQ_STATUS_ACCDET,
94
- },
75
+ DEFINE_RES_MEM_NAMED(MSIC_IRQ_STATUS_ACCDET, 1, "IRQ_BASE"),
9576 };
9677
9778 static struct resource msic_hdmi_resources[] = {
98
- {
99
- .flags = IORESOURCE_IRQ,
100
- },
79
+ DEFINE_RES_IRQ(0),
10180 };
10281
10382 static struct resource msic_thermal_resources[] = {
104
- {
105
- .flags = IORESOURCE_IRQ,
106
- },
83
+ DEFINE_RES_IRQ(0),
10784 };
10885
10986 static struct resource msic_power_btn_resources[] = {
110
- {
111
- .flags = IORESOURCE_IRQ,
112
- },
87
+ DEFINE_RES_IRQ(0),
11388 };
11489
11590 static struct resource msic_ocd_resources[] = {
116
- {
117
- .flags = IORESOURCE_IRQ,
118
- },
91
+ DEFINE_RES_IRQ(0),
11992 };
12093
12194 /*