pwm: sysfs: Replace sprintf() with sysfs_emit()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 26 Aug 2022 17:07:15 +0000 (20:07 +0300)
committerThierry Reding <thierry.reding@gmail.com>
Wed, 28 Sep 2022 15:52:02 +0000 (17:52 +0200)
commit4709f9ea338d34276d747c88323f964e148c0c09
treea43862715be177f0dc96cf951c4ad9248a1b7db0
parentb4319802867515ca6e492bff54879bc22a71a62c
pwm: sysfs: Replace sprintf() with sysfs_emit()

While the uses in this code are unproblematic, it's generally safer for
sysfs outputs to use the new sysfs_emit() helper instead of raw calls to
sprintf() and friends. This also has the benefit of annotating the uses,
which makes them easier to audit and potentially use them to generate
sysfs documentation from them.

This patch replaces existing sprintf() calls straightforwardly with the
new helper.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/sysfs.c