.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * lm3533-als.c -- LM3533 Ambient Light Sensor driver |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (C) 2011-2012 Texas Instruments |
---|
5 | 6 | * |
---|
6 | 7 | * Author: Johan Hovold <jhovold@gmail.com> |
---|
7 | | - * |
---|
8 | | - * This program is free software; you can redistribute it and/or modify it |
---|
9 | | - * under the terms of the GNU General Public License as published by the |
---|
10 | | - * Free Software Foundation; either version 2 of the License, or (at your |
---|
11 | | - * option) any later version. |
---|
12 | 8 | */ |
---|
13 | 9 | |
---|
14 | 10 | #include <linux/atomic.h> |
---|
.. | .. |
---|
746 | 742 | if (val < LM3533_ALS_RESISTOR_MIN || val > LM3533_ALS_RESISTOR_MAX) { |
---|
747 | 743 | dev_err(&als->pdev->dev, "invalid resistor value\n"); |
---|
748 | 744 | return -EINVAL; |
---|
749 | | - }; |
---|
| 745 | + } |
---|
750 | 746 | |
---|
751 | 747 | ret = lm3533_write(als->lm3533, LM3533_REG_ALS_RESISTOR_SELECT, val); |
---|
752 | 748 | if (ret) { |
---|
.. | .. |
---|
856 | 852 | indio_dev->channels = lm3533_als_channels; |
---|
857 | 853 | indio_dev->num_channels = ARRAY_SIZE(lm3533_als_channels); |
---|
858 | 854 | indio_dev->name = dev_name(&pdev->dev); |
---|
859 | | - indio_dev->dev.parent = pdev->dev.parent; |
---|
| 855 | + iio_device_set_parent(indio_dev, pdev->dev.parent); |
---|
860 | 856 | indio_dev->modes = INDIO_DIRECT_MODE; |
---|
861 | 857 | |
---|
862 | 858 | als = iio_priv(indio_dev); |
---|