Skip to content

Commit

Permalink
video: fbdev: omapfb: panel-tpo-td043mtea1: Use sysfs_emit() instead …
Browse files Browse the repository at this point in the history
…of snprintf()

[ Upstream commit c07a039 ]

Use sysfs_emit instead of scnprintf, snprintf or sprintf.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Jing Yao <yao.jing2@zte.com.cn>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Jing Yao authored and gregkh committed Apr 8, 2022
1 parent 4397e43 commit 381c1e2
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -169,7 +169,7 @@ static ssize_t tpo_td043_vmirror_show(struct device *dev,
{
struct panel_drv_data *ddata = dev_get_drvdata(dev);

return snprintf(buf, PAGE_SIZE, "%d\n", ddata->vmirror);
return sysfs_emit(buf, "%d\n", ddata->vmirror);
}

static ssize_t tpo_td043_vmirror_store(struct device *dev,
Expand Down Expand Up @@ -199,7 +199,7 @@ static ssize_t tpo_td043_mode_show(struct device *dev,
{
struct panel_drv_data *ddata = dev_get_drvdata(dev);

return snprintf(buf, PAGE_SIZE, "%d\n", ddata->mode);
return sysfs_emit(buf, "%d\n", ddata->mode);
}

static ssize_t tpo_td043_mode_store(struct device *dev,
Expand Down

0 comments on commit 381c1e2

Please sign in to comment.