Skip to content

Commit d2eb85c

Browse files
dlechjic23
authored andcommitted
iio: amplifiers: ad8366: make ad8366_info const
Add const qualifier to struct ad8366_info ad8366_infos[]. 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-12-v1-1-88029e48a26b@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
1 parent 7b7fac9 commit d2eb85c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/iio/amplifiers/ad8366.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ struct ad8366_state {
4545
struct gpio_desc *reset_gpio;
4646
unsigned char ch[2];
4747
enum ad8366_type type;
48-
struct ad8366_info *info;
48+
const struct ad8366_info *info;
4949
/*
5050
* DMA (thus cache coherency maintenance) may require the
5151
* transfer buffers to live in their own cache lines.
5252
*/
5353
unsigned char data[2] __aligned(IIO_DMA_MINALIGN);
5454
};
5555

56-
static struct ad8366_info ad8366_infos[] = {
56+
static const struct ad8366_info ad8366_infos[] = {
5757
[ID_AD8366] = {
5858
.gain_min = 4500,
5959
.gain_max = 20500,
@@ -163,7 +163,7 @@ static int ad8366_write_raw(struct iio_dev *indio_dev,
163163
long mask)
164164
{
165165
struct ad8366_state *st = iio_priv(indio_dev);
166-
struct ad8366_info *inf = st->info;
166+
const struct ad8366_info *inf = st->info;
167167
int code = 0, gain;
168168
int ret;
169169

0 commit comments

Comments
 (0)