diff options
Diffstat (limited to 'drivers/hwmon/sht3x.c')
-rw-r--r-- | drivers/hwmon/sht3x.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/hwmon/sht3x.c b/drivers/hwmon/sht3x.c index 3f279aa1cee5..8305e44d9ab2 100644 --- a/drivers/hwmon/sht3x.c +++ b/drivers/hwmon/sht3x.c @@ -320,7 +320,7 @@ static ssize_t temp1_limit_show(struct device *dev, u8 index = to_sensor_dev_attr(attr)->index; int temperature_limit = data->temperature_limits[index]; - return scnprintf(buf, PAGE_SIZE, "%d\n", temperature_limit); + return sysfs_emit(buf, "%d\n", temperature_limit); } static ssize_t humidity1_limit_show(struct device *dev, @@ -331,7 +331,7 @@ static ssize_t humidity1_limit_show(struct device *dev, u8 index = to_sensor_dev_attr(attr)->index; u32 humidity_limit = data->humidity_limits[index]; - return scnprintf(buf, PAGE_SIZE, "%u\n", humidity_limit); + return sysfs_emit(buf, "%u\n", humidity_limit); } /* @@ -483,7 +483,7 @@ static ssize_t temp1_alarm_show(struct device *dev, if (ret) return ret; - return scnprintf(buf, PAGE_SIZE, "%d\n", !!(buffer[0] & 0x04)); + return sysfs_emit(buf, "%d\n", !!(buffer[0] & 0x04)); } static ssize_t humidity1_alarm_show(struct device *dev, @@ -498,7 +498,7 @@ static ssize_t humidity1_alarm_show(struct device *dev, if (ret) return ret; - return scnprintf(buf, PAGE_SIZE, "%d\n", !!(buffer[0] & 0x08)); + return sysfs_emit(buf, "%d\n", !!(buffer[0] & 0x08)); } static ssize_t heater_enable_show(struct device *dev, @@ -513,7 +513,7 @@ static ssize_t heater_enable_show(struct device *dev, if (ret) return ret; - return scnprintf(buf, PAGE_SIZE, "%d\n", !!(buffer[0] & 0x20)); + return sysfs_emit(buf, "%d\n", !!(buffer[0] & 0x20)); } static ssize_t heater_enable_store(struct device *dev, @@ -550,7 +550,7 @@ static ssize_t update_interval_show(struct device *dev, { struct sht3x_data *data = dev_get_drvdata(dev); - return scnprintf(buf, PAGE_SIZE, "%u\n", + return sysfs_emit(buf, "%u\n", mode_to_update_interval[data->mode]); } |