According to Documentation/filesystems/sysfs.rst, show() functions
should use sysfs_emit() when formatting the value to be returned to user
space.
This keeps consistent usage of sysfs_emit() across the same file.
Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
[ Yilun: clarify the necessity of the change in changelog ]
Reviewed-by: Xu Yilun <yilun.xu@intel.com>
Link: https://lore.kernel.org/r/20260117043626.2188219-1-dinguyen@kernel.org
Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com>
{
struct fpga_bridge *bridge = to_fpga_bridge(dev);
- return sprintf(buf, "%s\n", bridge->name);
+ return sysfs_emit(buf, "%s\n", bridge->name);
}
static ssize_t state_show(struct device *dev,