Skip to content

Commit 8a7d1c7

Browse files
dlechjic23
authored andcommitted
iio: adc: at91_adc: make at91_adc_caps const
Add const qualifier to struct at91_adc_caps at91sam*_caps. This is read-only data so it can be made const. Signed-off-by: David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/20250628-iio-const-data-6-v1-1-fbb1ca5edc8d@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
1 parent 3e8d53d commit 8a7d1c7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/iio/adc/at91_adc.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1226,7 +1226,7 @@ static const struct at91_adc_trigger at91sam9260_triggers[] = {
12261226
{ .name = "external", .value = 0xd, .is_external = true },
12271227
};
12281228

1229-
static struct at91_adc_caps at91sam9260_caps = {
1229+
static const struct at91_adc_caps at91sam9260_caps = {
12301230
.calc_startup_ticks = calc_startup_ticks_9260,
12311231
.num_channels = 4,
12321232
.low_res_bits = 8,
@@ -1250,7 +1250,7 @@ static const struct at91_adc_trigger at91sam9x5_triggers[] = {
12501250
{ .name = "continuous", .value = 0x6 },
12511251
};
12521252

1253-
static struct at91_adc_caps at91sam9rl_caps = {
1253+
static const struct at91_adc_caps at91sam9rl_caps = {
12541254
.has_ts = true,
12551255
.calc_startup_ticks = calc_startup_ticks_9260, /* same as 9260 */
12561256
.num_channels = 6,
@@ -1268,7 +1268,7 @@ static struct at91_adc_caps at91sam9rl_caps = {
12681268
.trigger_number = ARRAY_SIZE(at91sam9x5_triggers),
12691269
};
12701270

1271-
static struct at91_adc_caps at91sam9g45_caps = {
1271+
static const struct at91_adc_caps at91sam9g45_caps = {
12721272
.has_ts = true,
12731273
.calc_startup_ticks = calc_startup_ticks_9260, /* same as 9260 */
12741274
.num_channels = 8,
@@ -1286,7 +1286,7 @@ static struct at91_adc_caps at91sam9g45_caps = {
12861286
.trigger_number = ARRAY_SIZE(at91sam9x5_triggers),
12871287
};
12881288

1289-
static struct at91_adc_caps at91sam9x5_caps = {
1289+
static const struct at91_adc_caps at91sam9x5_caps = {
12901290
.has_ts = true,
12911291
.has_tsmr = true,
12921292
.ts_filter_average = 3,
@@ -1308,7 +1308,7 @@ static struct at91_adc_caps at91sam9x5_caps = {
13081308
.trigger_number = ARRAY_SIZE(at91sam9x5_triggers),
13091309
};
13101310

1311-
static struct at91_adc_caps sama5d3_caps = {
1311+
static const struct at91_adc_caps sama5d3_caps = {
13121312
.has_ts = true,
13131313
.has_tsmr = true,
13141314
.ts_filter_average = 3,

0 commit comments

Comments
 (0)