forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/iio/light/isl29028.c
....@@ -1,21 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * IIO driver for the light sensor ISL29028.
34 * ISL29028 is Concurrent Ambient Light and Proximity Sensor
45 *
56 * Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
67 * Copyright (c) 2016-2017 Brian Masney <masneyb@onstation.org>
7
- *
8
- * This program is free software; you can redistribute it and/or modify it
9
- * under the terms and conditions of the GNU General Public License,
10
- * version 2, as published by the Free Software Foundation.
11
- *
12
- * This program is distributed in the hope it will be useful, but WITHOUT
13
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15
- * more details.
16
- *
17
- * You should have received a copy of the GNU General Public License
18
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
198 *
209 * Datasheets:
2110 * - http://www.intersil.com/content/dam/Intersil/documents/isl2/isl29028.pdf
....@@ -631,7 +620,6 @@
631620 indio_dev->channels = isl29028_channels;
632621 indio_dev->num_channels = ARRAY_SIZE(isl29028_channels);
633622 indio_dev->name = id->name;
634
- indio_dev->dev.parent = &client->dev;
635623 indio_dev->modes = INDIO_DIRECT_MODE;
636624
637625 pm_runtime_enable(&client->dev);
....@@ -639,7 +627,7 @@
639627 ISL29028_POWER_OFF_DELAY_MS);
640628 pm_runtime_use_autosuspend(&client->dev);
641629
642
- ret = devm_iio_device_register(indio_dev->dev.parent, indio_dev);
630
+ ret = iio_device_register(indio_dev);
643631 if (ret < 0) {
644632 dev_err(&client->dev,
645633 "%s(): iio registration failed with error %d\n",