hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/hwmon/max31722.c
....@@ -1,12 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * max31722 - hwmon driver for Maxim Integrated MAX31722/MAX31723 SPI
34 * digital thermometer and thermostats.
45 *
56 * Copyright (c) 2016, Intel Corporation.
6
- *
7
- * This file is subject to the terms and conditions of version 2 of
8
- * the GNU General Public License. See the file COPYING in the main
9
- * directory of this archive for more details.
107 */
118
129 #include <linux/hwmon.h>
....@@ -49,9 +46,8 @@
4946 return 0;
5047 }
5148
52
-static ssize_t max31722_show_temp(struct device *dev,
53
- struct device_attribute *attr,
54
- char *buf)
49
+static ssize_t max31722_temp_show(struct device *dev,
50
+ struct device_attribute *attr, char *buf)
5551 {
5652 ssize_t ret;
5753 struct max31722_data *data = dev_get_drvdata(dev);
....@@ -63,8 +59,7 @@
6359 return sprintf(buf, "%d\n", (s16)le16_to_cpu(ret) * 125 / 32);
6460 }
6561
66
-static SENSOR_DEVICE_ATTR(temp1_input, S_IRUGO,
67
- max31722_show_temp, NULL, 0);
62
+static SENSOR_DEVICE_ATTR_RO(temp1_input, max31722_temp, 0);
6863
6964 static struct attribute *max31722_attrs[] = {
7065 &sensor_dev_attr_temp1_input.dev_attr.attr,