Skip to content

Commit 72a2972

Browse files
elkablolag-linaro
authored andcommitted
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: Marek Behún <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent 43a707a commit 72a2972

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/leds/leds-turris-omnia.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ static ssize_t brightness_show(struct device *dev, struct device_attribute *a,
166166
if (ret < 0)
167167
return ret;
168168

169-
return sprintf(buf, "%d\n", ret);
169+
return sysfs_emit(buf, "%d\n", ret);
170170
}
171171

172172
static ssize_t brightness_store(struct device *dev, struct device_attribute *a,

0 commit comments

Comments
 (0)