forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/iio/light/tsl2583.c
....@@ -1,19 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Device driver for monitoring ambient light intensity (lux)
34 * within the TAOS tsl258x family of devices (tsl2580, tsl2581, tsl2583).
45 *
56 * Copyright (c) 2011, TAOS Corporation.
67 * Copyright (c) 2016-2017 Brian Masney <masneyb@onstation.org>
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 as published by
10
- * the Free Software Foundation; either version 2 of the License, or
11
- * (at your option) any later version.
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.
178 */
189
1910 #include <linux/kernel.h>
....@@ -857,7 +848,6 @@
857848 indio_dev->info = &tsl2583_info;
858849 indio_dev->channels = tsl2583_channels;
859850 indio_dev->num_channels = ARRAY_SIZE(tsl2583_channels);
860
- indio_dev->dev.parent = &clientp->dev;
861851 indio_dev->modes = INDIO_DIRECT_MODE;
862852 indio_dev->name = chip->client->name;
863853
....@@ -866,7 +856,7 @@
866856 TSL2583_POWER_OFF_DELAY_MS);
867857 pm_runtime_use_autosuspend(&clientp->dev);
868858
869
- ret = devm_iio_device_register(indio_dev->dev.parent, indio_dev);
859
+ ret = iio_device_register(indio_dev);
870860 if (ret) {
871861 dev_err(&clientp->dev, "%s: iio registration failed\n",
872862 __func__);