From: Park Tae-sun ts930@dgu.ac.kr
The sysfs documentation (Documentation/filesystems/sysfs.rst) recommends using sysfs_emit() instead of sprintf() in sysfs show() callbacks.
Replace sprintf() with sysfs_emit() in the protocol_id_show() callback.
This follows the standard kernel practice and existing use of sysfs_emit() in other Greybus sysfs show functions.
No functional change.
Signed-off-by: Park Tae-sun ts930@dgu.ac.kr --- drivers/staging/greybus/gbphy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/greybus/gbphy.c b/drivers/staging/greybus/gbphy.c index bdb0f5164a6f..bb9a5b538e6e 100644 --- a/drivers/staging/greybus/gbphy.c +++ b/drivers/staging/greybus/gbphy.c @@ -31,7 +31,7 @@ static ssize_t protocol_id_show(struct device *dev, { struct gbphy_device *gbphy_dev = to_gbphy_dev(dev);
- return sprintf(buf, "0x%02x\n", gbphy_dev->cport_desc->protocol_id); + return sysfs_emit(buf, "0x%02x\n", gbphy_dev->cport_desc->protocol_id); } static DEVICE_ATTR_RO(protocol_id);