| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0 |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * iio/adc/max11100.c |
|---|
| 3 | 4 | * Maxim max11100 ADC Driver with IIO interface |
|---|
| 4 | 5 | * |
|---|
| 5 | 6 | * Copyright (C) 2016-17 Renesas Electronics Corporation |
|---|
| 6 | 7 | * Copyright (C) 2016-17 Jacopo Mondi |
|---|
| 7 | | - * |
|---|
| 8 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 9 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 10 | | - * published by the Free Software Foundation. |
|---|
| 11 | 8 | */ |
|---|
| 12 | 9 | #include <linux/delay.h> |
|---|
| 13 | 10 | #include <linux/kernel.h> |
|---|
| 11 | +#include <linux/mod_devicetable.h> |
|---|
| 14 | 12 | #include <linux/module.h> |
|---|
| 15 | 13 | #include <linux/regulator/consumer.h> |
|---|
| 16 | 14 | #include <linux/spi/spi.h> |
|---|
| .. | .. |
|---|
| 40 | 38 | u8 buffer[3] ____cacheline_aligned; |
|---|
| 41 | 39 | }; |
|---|
| 42 | 40 | |
|---|
| 43 | | -static struct iio_chan_spec max11100_channels[] = { |
|---|
| 41 | +static const struct iio_chan_spec max11100_channels[] = { |
|---|
| 44 | 42 | { /* [0] */ |
|---|
| 45 | 43 | .type = IIO_VOLTAGE, |
|---|
| 46 | 44 | .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | |
|---|
| .. | .. |
|---|
| 118 | 116 | state = iio_priv(indio_dev); |
|---|
| 119 | 117 | state->spi = spi; |
|---|
| 120 | 118 | |
|---|
| 121 | | - indio_dev->dev.parent = &spi->dev; |
|---|
| 122 | | - indio_dev->dev.of_node = spi->dev.of_node; |
|---|
| 123 | 119 | indio_dev->name = "max11100"; |
|---|
| 124 | 120 | indio_dev->info = &max11100_info; |
|---|
| 125 | 121 | indio_dev->modes = INDIO_DIRECT_MODE; |
|---|
| .. | .. |
|---|
| 166 | 162 | static struct spi_driver max11100_driver = { |
|---|
| 167 | 163 | .driver = { |
|---|
| 168 | 164 | .name = "max11100", |
|---|
| 169 | | - .of_match_table = of_match_ptr(max11100_ids), |
|---|
| 165 | + .of_match_table = max11100_ids, |
|---|
| 170 | 166 | }, |
|---|
| 171 | 167 | .probe = max11100_probe, |
|---|
| 172 | 168 | .remove = max11100_remove, |
|---|