forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/iio/humidity/si7020.c
....@@ -1,16 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * si7020.c - Silicon Labs Si7013/20/21 Relative Humidity and Temp Sensors
34 * Copyright (c) 2013,2014 Uplogix, Inc.
45 * David Barksdale <dbarksdale@uplogix.com>
5
- *
6
- * This program is free software; you can redistribute it and/or modify it
7
- * under the terms and conditions of the GNU General Public License,
8
- * version 2, as published by the Free Software Foundation.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
146 */
157
168 /*
....@@ -28,6 +20,7 @@
2820 #include <linux/delay.h>
2921 #include <linux/i2c.h>
3022 #include <linux/module.h>
23
+#include <linux/mod_devicetable.h>
3124 #include <linux/slab.h>
3225 #include <linux/sysfs.h>
3326
....@@ -136,7 +129,6 @@
136129 data = iio_priv(indio_dev);
137130 *data = client;
138131
139
- indio_dev->dev.parent = &client->dev;
140132 indio_dev->name = dev_name(&client->dev);
141133 indio_dev->modes = INDIO_DIRECT_MODE;
142134 indio_dev->info = &si7020_info;
....@@ -162,7 +154,7 @@
162154 static struct i2c_driver si7020_driver = {
163155 .driver = {
164156 .name = "si7020",
165
- .of_match_table = of_match_ptr(si7020_dt_ids),
157
+ .of_match_table = si7020_dt_ids,
166158 },
167159 .probe = si7020_probe,
168160 .id_table = si7020_id,