forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/iio/light/opt3001.c
....@@ -1,19 +1,11 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /**
23 * opt3001.c - Texas Instruments OPT3001 Light Sensor
34 *
4
- * Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com
5
+ * Copyright (C) 2014 Texas Instruments Incorporated - https://www.ti.com
56 *
67 * Author: Andreas Dannenberg <dannenberg@ti.com>
78 * Based on previous work from: Felipe Balbi <balbi@ti.com>
8
- *
9
- * This program is free software: you can redistribute it and/or modify it
10
- * under the terms of the GNU General Public License version 2 of the License
11
- * as published by the Free Software Foundation.
12
- *
13
- * This program is distributed in the hope that it will be useful, but WITHOUT
14
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16
- * more details.
179 */
1810
1911 #include <linux/bitops.h>
....@@ -24,6 +16,7 @@
2416 #include <linux/irq.h>
2517 #include <linux/kernel.h>
2618 #include <linux/module.h>
19
+#include <linux/mod_devicetable.h>
2720 #include <linux/mutex.h>
2821 #include <linux/slab.h>
2922 #include <linux/types.h>
....@@ -775,7 +768,6 @@
775768 iio->name = client->name;
776769 iio->channels = opt3001_channels;
777770 iio->num_channels = ARRAY_SIZE(opt3001_channels);
778
- iio->dev.parent = dev;
779771 iio->modes = INDIO_DIRECT_MODE;
780772 iio->info = &opt3001_info;
781773
....@@ -852,7 +844,7 @@
852844
853845 .driver = {
854846 .name = "opt3001",
855
- .of_match_table = of_match_ptr(opt3001_of_match),
847
+ .of_match_table = opt3001_of_match,
856848 },
857849 };
858850