forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-09 244b2c5ca8b14627e4a17755e5922221e121c771
kernel/drivers/iio/adc/max11100.c
....@@ -1,16 +1,14 @@
1
+// SPDX-License-Identifier: GPL-2.0
12 /*
23 * iio/adc/max11100.c
34 * Maxim max11100 ADC Driver with IIO interface
45 *
56 * Copyright (C) 2016-17 Renesas Electronics Corporation
67 * 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.
118 */
129 #include <linux/delay.h>
1310 #include <linux/kernel.h>
11
+#include <linux/mod_devicetable.h>
1412 #include <linux/module.h>
1513 #include <linux/regulator/consumer.h>
1614 #include <linux/spi/spi.h>
....@@ -40,7 +38,7 @@
4038 u8 buffer[3] ____cacheline_aligned;
4139 };
4240
43
-static struct iio_chan_spec max11100_channels[] = {
41
+static const struct iio_chan_spec max11100_channels[] = {
4442 { /* [0] */
4543 .type = IIO_VOLTAGE,
4644 .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) |
....@@ -118,8 +116,6 @@
118116 state = iio_priv(indio_dev);
119117 state->spi = spi;
120118
121
- indio_dev->dev.parent = &spi->dev;
122
- indio_dev->dev.of_node = spi->dev.of_node;
123119 indio_dev->name = "max11100";
124120 indio_dev->info = &max11100_info;
125121 indio_dev->modes = INDIO_DIRECT_MODE;
....@@ -166,7 +162,7 @@
166162 static struct spi_driver max11100_driver = {
167163 .driver = {
168164 .name = "max11100",
169
- .of_match_table = of_match_ptr(max11100_ids),
165
+ .of_match_table = max11100_ids,
170166 },
171167 .probe = max11100_probe,
172168 .remove = max11100_remove,