hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/iio/light/cm3232.c
....@@ -1,18 +1,16 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * CM3232 Ambient Light Sensor
34 *
45 * Copyright (C) 2014-2015 Capella Microsystems Inc.
56 * Author: Kevin Tsai <ktsai@capellamicro.com>
67 *
7
- * This program is free software; you can redistribute it and/or modify it
8
- * under the terms of the GNU General Public License version 2, as published
9
- * by the Free Software Foundation.
10
- *
118 * IIO driver for CM3232 (7-bit I2C slave address 0x10).
129 */
1310
1411 #include <linux/i2c.h>
1512 #include <linux/module.h>
13
+#include <linux/mod_devicetable.h>
1614 #include <linux/iio/iio.h>
1715 #include <linux/iio/sysfs.h>
1816 #include <linux/init.h>
....@@ -342,7 +340,6 @@
342340 i2c_set_clientdata(client, indio_dev);
343341 chip->client = client;
344342
345
- indio_dev->dev.parent = &client->dev;
346343 indio_dev->channels = cm3232_channels;
347344 indio_dev->num_channels = ARRAY_SIZE(cm3232_channels);
348345 indio_dev->info = &cm3232_info;
....@@ -421,7 +418,7 @@
421418 static struct i2c_driver cm3232_driver = {
422419 .driver = {
423420 .name = "cm3232",
424
- .of_match_table = of_match_ptr(cm3232_of_match),
421
+ .of_match_table = cm3232_of_match,
425422 #ifdef CONFIG_PM_SLEEP
426423 .pm = &cm3232_pm_ops,
427424 #endif