summaryrefslogtreecommitdiff
path: root/drivers/iio/light
diff options
context:
space:
mode:
authorTian Tao <tiantao6@hisilicon.com>2021-04-12 16:39:10 +0800
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2021-05-17 13:49:05 +0100
commitc79859bd77debda56fcce011d161c563c4a06451 (patch)
treee39b47c60c4af0a8d1551c8a06ff6a2356bf94bd /drivers/iio/light
parent643adb9af72e2af62a532590fad0c767045c1e76 (diff)
iio: light: Convert sysfs sprintf/snprintf family to sysfs_emit
Fix the following coccicheck warning: drivers/iio/light/veml6030.c:131:8-16: WARNING: use scnprintf or sprintf Signed-off-by: Tian Tao <tiantao6@hisilicon.com> Link: https://lore.kernel.org/r/1618216751-1678-3-git-send-email-tiantao6@hisilicon.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/light')
-rw-r--r--drivers/iio/light/veml6030.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/light/veml6030.c b/drivers/iio/light/veml6030.c
index de85c9b30be1..3c937c55a10d 100644
--- a/drivers/iio/light/veml6030.c
+++ b/drivers/iio/light/veml6030.c
@@ -128,7 +128,7 @@ static ssize_t in_illuminance_period_available_show(struct device *dev,
return -EINVAL;
}
- return snprintf(buf, PAGE_SIZE, "%s\n", period_values[x]);
+ return sysfs_emit(buf, "%s\n", period_values[x]);
}
static IIO_DEVICE_ATTR_RO(in_illuminance_period_available, 0);