.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* linux/drivers/hwmon/s3c-hwmon.c |
---|
2 | 3 | * |
---|
3 | 4 | * Copyright (C) 2005, 2008, 2009 Simtec Electronics |
---|
.. | .. |
---|
5 | 6 | * Ben Dooks <ben@simtec.co.uk> |
---|
6 | 7 | * |
---|
7 | 8 | * S3C24XX/S3C64XX ADC hwmon support |
---|
8 | | - * |
---|
9 | | - * This program is free software; you can redistribute it and/or modify |
---|
10 | | - * it under the terms of the GNU General Public License version 2 as |
---|
11 | | - * published by the Free Software Foundation. |
---|
12 | | - * |
---|
13 | | - * This program is distributed in the hope that it will be useful, |
---|
14 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
15 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
16 | | - * GNU General Public License for more details. |
---|
17 | | - * |
---|
18 | | - * You should have received a copy of the GNU General Public License |
---|
19 | | - * along with this program; if not, write to the Free Software |
---|
20 | | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
---|
21 | 9 | */ |
---|
22 | 10 | |
---|
23 | 11 | #include <linux/module.h> |
---|
.. | .. |
---|
32 | 20 | #include <linux/hwmon.h> |
---|
33 | 21 | #include <linux/hwmon-sysfs.h> |
---|
34 | 22 | |
---|
35 | | -#include <plat/adc.h> |
---|
| 23 | +#include <linux/soc/samsung/s3c-adc.h> |
---|
36 | 24 | #include <linux/platform_data/hwmon-s3c.h> |
---|
37 | 25 | |
---|
38 | 26 | struct s3c_hwmon_attr { |
---|
.. | .. |
---|
98 | 86 | static ssize_t s3c_hwmon_show_raw(struct device *dev, |
---|
99 | 87 | struct device_attribute *attr, char *buf) |
---|
100 | 88 | { |
---|
101 | | - struct s3c_hwmon *adc = platform_get_drvdata(to_platform_device(dev)); |
---|
| 89 | + struct s3c_hwmon *adc = dev_get_drvdata(dev); |
---|
102 | 90 | struct sensor_device_attribute *sa = to_sensor_dev_attr(attr); |
---|
103 | 91 | int ret; |
---|
104 | 92 | |
---|
.. | .. |
---|
164 | 152 | char *buf) |
---|
165 | 153 | { |
---|
166 | 154 | struct sensor_device_attribute *sen_attr = to_sensor_dev_attr(attr); |
---|
167 | | - struct s3c_hwmon *hwmon = platform_get_drvdata(to_platform_device(dev)); |
---|
| 155 | + struct s3c_hwmon *hwmon = dev_get_drvdata(dev); |
---|
168 | 156 | struct s3c_hwmon_pdata *pdata = dev_get_platdata(dev); |
---|
169 | 157 | struct s3c_hwmon_chcfg *cfg; |
---|
170 | 158 | int ret; |
---|