Commit 72a29725 authored by Marek Behún's avatar Marek Behún Committed by Lee Jones

leds: turris-omnia: Use sysfs_emit() instead of sprintf()

Use the dedicated sysfs_emit() function instead of sprintf() in sysfs
attribute accessor brightness_show().
Signed-off-by: default avatarMarek Behún <kabel@kernel.org>
Link: https://lore.kernel.org/r/20230802160748.11208-4-kabel@kernel.orgSigned-off-by: default avatarLee Jones <lee@kernel.org>
parent 43a707ae
...@@ -166,7 +166,7 @@ static ssize_t brightness_show(struct device *dev, struct device_attribute *a, ...@@ -166,7 +166,7 @@ static ssize_t brightness_show(struct device *dev, struct device_attribute *a,
if (ret < 0) if (ret < 0)
return ret; return ret;
return sprintf(buf, "%d\n", ret); return sysfs_emit(buf, "%d\n", ret);
} }
static ssize_t brightness_store(struct device *dev, struct device_attribute *a, static ssize_t brightness_store(struct device *dev, struct device_attribute *a,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment