diff options
author | Marek BehĂșn <kabel@kernel.org> | 2024-08-31 11:20:40 +0200 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2024-09-02 09:42:09 +0000 |
commit | 97a9c5b3e0a4791cd4aa9d9ebbbfb2c0e83e2ff0 (patch) | |
tree | f4acabb7e00606a2fe7b93119d0c8f835cf7bd75 /drivers | |
parent | 671d5f68698b5e516c23048e5bfd4bcd9d90cc78 (diff) |
firmware: turris-mox-rwtm: Use sysfs_emit() instead of sprintf()
Use sysfs_emit() instead of sprintf() in sysfs attribute .show()
method.
Signed-off-by: Marek BehĂșn <kabel@kernel.org>
Link: https://lore.kernel.org/r/20240831092050.23093-7-kabel@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/firmware/turris-mox-rwtm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/firmware/turris-mox-rwtm.c b/drivers/firmware/turris-mox-rwtm.c index ca1eb1687d44..8923c4cabcd0 100644 --- a/drivers/firmware/turris-mox-rwtm.c +++ b/drivers/firmware/turris-mox-rwtm.c @@ -151,7 +151,7 @@ name##_show(struct kobject *kobj, struct kobj_attribute *a, \ struct mox_rwtm *rwtm = to_rwtm(kobj); \ if (!rwtm->has_##cat) \ return -ENODATA; \ - return sprintf(buf, format, rwtm->name); \ + return sysfs_emit(buf, format, rwtm->name); \ } \ static struct kobj_attribute mox_attr_##name = __ATTR_RO(name) |