hwmon.c (692d42d411b7db6a76382537fccbee3a12a2bcdb) hwmon.c (d8cc9415a40f479b666fc03e7b1f4601868e6dc8)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * hwmon.c - part of lm_sensors, Linux kernel modules for hardware monitoring
4 *
5 * This file defines the sysfs class "hwmon", for use by sensors drivers.
6 *
7 * Copyright (C) 2005 Mark M. Hoffman <mhoffman@lightlink.com>
8 */

--- 160 unchanged lines hidden (view full) ---

169 return 0;
170}
171
172static int hwmon_thermal_set_trips(struct thermal_zone_device *tz, int low, int high)
173{
174 struct hwmon_thermal_data *tdata = tz->devdata;
175 struct hwmon_device *hwdev = to_hwmon_device(tdata->dev);
176 const struct hwmon_chip_info *chip = hwdev->chip;
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * hwmon.c - part of lm_sensors, Linux kernel modules for hardware monitoring
4 *
5 * This file defines the sysfs class "hwmon", for use by sensors drivers.
6 *
7 * Copyright (C) 2005 Mark M. Hoffman <mhoffman@lightlink.com>
8 */

--- 160 unchanged lines hidden (view full) ---

169 return 0;
170}
171
172static int hwmon_thermal_set_trips(struct thermal_zone_device *tz, int low, int high)
173{
174 struct hwmon_thermal_data *tdata = tz->devdata;
175 struct hwmon_device *hwdev = to_hwmon_device(tdata->dev);
176 const struct hwmon_chip_info *chip = hwdev->chip;
177 const struct hwmon_channel_info **info = chip->info;
177 const struct hwmon_channel_info * const *info = chip->info;
178 unsigned int i;
179 int err;
180
181 if (!chip->ops->write)
182 return 0;
183
184 for (i = 0; info[i] && info[i]->type != hwmon_temp; i++)
185 continue;

--- 62 unchanged lines hidden (view full) ---

248
249 return 0;
250}
251
252static int hwmon_thermal_register_sensors(struct device *dev)
253{
254 struct hwmon_device *hwdev = to_hwmon_device(dev);
255 const struct hwmon_chip_info *chip = hwdev->chip;
178 unsigned int i;
179 int err;
180
181 if (!chip->ops->write)
182 return 0;
183
184 for (i = 0; info[i] && info[i]->type != hwmon_temp; i++)
185 continue;

--- 62 unchanged lines hidden (view full) ---

248
249 return 0;
250}
251
252static int hwmon_thermal_register_sensors(struct device *dev)
253{
254 struct hwmon_device *hwdev = to_hwmon_device(dev);
255 const struct hwmon_chip_info *chip = hwdev->chip;
256 const struct hwmon_channel_info **info = chip->info;
256 const struct hwmon_channel_info * const *info = chip->info;
257 void *drvdata = dev_get_drvdata(dev);
258 int i;
259
260 for (i = 1; info[i]; i++) {
261 int j;
262
263 if (info[i]->type != hwmon_temp)
264 continue;

--- 929 unchanged lines hidden ---
257 void *drvdata = dev_get_drvdata(dev);
258 int i;
259
260 for (i = 1; info[i]; i++) {
261 int j;
262
263 if (info[i]->type != hwmon_temp)
264 continue;

--- 929 unchanged lines hidden ---