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 <kabel@kernel.org>
Link: https://lore.kernel.org/r/20230802160748.11208-4-kabel@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
This commit is contained in:
Marek Behún 2023-08-02 18:07:45 +02:00 committed by Lee Jones
parent 43a707ae58
commit 72a29725b6
1 changed files with 1 additions and 1 deletions

View File

@ -166,7 +166,7 @@ static ssize_t brightness_show(struct device *dev, struct device_attribute *a,
if (ret < 0)
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,