hwmon.c (b70366e5d31788650b2a5cec5cd13ea80ac7e44a) hwmon.c (5ba6bcbc335771c37d05b88cbfcad5441b57130b)
1/*
2 * hwmon.c - part of lm_sensors, Linux kernel modules for hardware monitoring
3 *
4 * This file defines the sysfs class "hwmon", for use by sensors drivers.
5 *
6 * Copyright (C) 2005 Mark M. Hoffman <mhoffman@lightlink.com>
7 *
8 * This program is free software; you can redistribute it and/or modify

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

181 return sprintf(buf, "%ld\n", val);
182}
183
184static ssize_t hwmon_attr_show_string(struct device *dev,
185 struct device_attribute *devattr,
186 char *buf)
187{
188 struct hwmon_device_attribute *hattr = to_hwmon_attr(devattr);
1/*
2 * hwmon.c - part of lm_sensors, Linux kernel modules for hardware monitoring
3 *
4 * This file defines the sysfs class "hwmon", for use by sensors drivers.
5 *
6 * Copyright (C) 2005 Mark M. Hoffman <mhoffman@lightlink.com>
7 *
8 * This program is free software; you can redistribute it and/or modify

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

181 return sprintf(buf, "%ld\n", val);
182}
183
184static ssize_t hwmon_attr_show_string(struct device *dev,
185 struct device_attribute *devattr,
186 char *buf)
187{
188 struct hwmon_device_attribute *hattr = to_hwmon_attr(devattr);
189 char *s;
189 const char *s;
190 int ret;
191
192 ret = hattr->ops->read_string(dev, hattr->type, hattr->attr,
193 hattr->index, &s);
194 if (ret < 0)
195 return ret;
196
197 return sprintf(buf, "%s\n", s);

--- 689 unchanged lines hidden ---
190 int ret;
191
192 ret = hattr->ops->read_string(dev, hattr->type, hattr->attr,
193 hattr->index, &s);
194 if (ret < 0)
195 return ret;
196
197 return sprintf(buf, "%s\n", s);

--- 689 unchanged lines hidden ---