| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Device driver for monitoring ambient light intensity (lux) |
|---|
| 3 | 4 | * within the TAOS tsl258x family of devices (tsl2580, tsl2581, tsl2583). |
|---|
| 4 | 5 | * |
|---|
| 5 | 6 | * Copyright (c) 2011, TAOS Corporation. |
|---|
| 6 | 7 | * 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. |
|---|
| 17 | 8 | */ |
|---|
| 18 | 9 | |
|---|
| 19 | 10 | #include <linux/kernel.h> |
|---|
| .. | .. |
|---|
| 857 | 848 | indio_dev->info = &tsl2583_info; |
|---|
| 858 | 849 | indio_dev->channels = tsl2583_channels; |
|---|
| 859 | 850 | indio_dev->num_channels = ARRAY_SIZE(tsl2583_channels); |
|---|
| 860 | | - indio_dev->dev.parent = &clientp->dev; |
|---|
| 861 | 851 | indio_dev->modes = INDIO_DIRECT_MODE; |
|---|
| 862 | 852 | indio_dev->name = chip->client->name; |
|---|
| 863 | 853 | |
|---|
| .. | .. |
|---|
| 866 | 856 | TSL2583_POWER_OFF_DELAY_MS); |
|---|
| 867 | 857 | pm_runtime_use_autosuspend(&clientp->dev); |
|---|
| 868 | 858 | |
|---|
| 869 | | - ret = devm_iio_device_register(indio_dev->dev.parent, indio_dev); |
|---|
| 859 | + ret = iio_device_register(indio_dev); |
|---|
| 870 | 860 | if (ret) { |
|---|
| 871 | 861 | dev_err(&clientp->dev, "%s: iio registration failed\n", |
|---|
| 872 | 862 | __func__); |
|---|