Skip to content

Commit 2b48182

Browse files
andy-shevlag-linaro
authored andcommitted
mfd: lpc_ich: Mark *_gpio_offsets data with const
There is no reason why the GPIO resource offsets should not be const. Mark them accordingly and update a qualifier in struct lpc_ich_gpio_info definition. Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent 272f99e commit 2b48182

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/mfd/lpc_ich.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ struct lpc_ich_gpio_info {
139139
size_t nr_devices;
140140
struct resource **resources;
141141
size_t nr_resources;
142-
resource_size_t *offsets;
142+
const resource_size_t *offsets;
143143
};
144144

145145
#define APL_GPIO_NORTH 0
@@ -151,7 +151,7 @@ struct lpc_ich_gpio_info {
151151
#define APL_GPIO_NR_RESOURCES 4
152152

153153
/* Offset data for Apollo Lake GPIO controllers */
154-
static resource_size_t apl_gpio_offsets[APL_GPIO_NR_RESOURCES] = {
154+
static const resource_size_t apl_gpio_offsets[APL_GPIO_NR_RESOURCES] = {
155155
[APL_GPIO_NORTH] = 0xc50000,
156156
[APL_GPIO_NORTHWEST] = 0xc40000,
157157
[APL_GPIO_WEST] = 0xc70000,
@@ -233,7 +233,7 @@ static const struct lpc_ich_gpio_info apl_gpio_info = {
233233
#define DNV_GPIO_NR_RESOURCES 2
234234

235235
/* Offset data for Denverton GPIO controllers */
236-
static resource_size_t dnv_gpio_offsets[DNV_GPIO_NR_RESOURCES] = {
236+
static const resource_size_t dnv_gpio_offsets[DNV_GPIO_NR_RESOURCES] = {
237237
[DNV_GPIO_NORTH] = 0xc20000,
238238
[DNV_GPIO_SOUTH] = 0xc50000,
239239
};

0 commit comments

Comments
 (0)