mirror of
https://github.com/torvalds/linux.git
synced 2024-12-16 16:12:52 +00:00
video: fbdev: omapfb: panel-dsi-cm: Use sysfs_emit() instead of snprintf()
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>
This commit is contained in:
parent
0d84dcab5c
commit
f63658a59c
@ -409,7 +409,7 @@ static ssize_t dsicm_num_errors_show(struct device *dev,
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
return snprintf(buf, PAGE_SIZE, "%d\n", errors);
|
||||
return sysfs_emit(buf, "%d\n", errors);
|
||||
}
|
||||
|
||||
static ssize_t dsicm_hw_revision_show(struct device *dev,
|
||||
@ -439,7 +439,7 @@ static ssize_t dsicm_hw_revision_show(struct device *dev,
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
return snprintf(buf, PAGE_SIZE, "%02x.%02x.%02x\n", id1, id2, id3);
|
||||
return sysfs_emit(buf, "%02x.%02x.%02x\n", id1, id2, id3);
|
||||
}
|
||||
|
||||
static ssize_t dsicm_store_ulps(struct device *dev,
|
||||
@ -487,7 +487,7 @@ static ssize_t dsicm_show_ulps(struct device *dev,
|
||||
t = ddata->ulps_enabled;
|
||||
mutex_unlock(&ddata->lock);
|
||||
|
||||
return snprintf(buf, PAGE_SIZE, "%u\n", t);
|
||||
return sysfs_emit(buf, "%u\n", t);
|
||||
}
|
||||
|
||||
static ssize_t dsicm_store_ulps_timeout(struct device *dev,
|
||||
@ -532,7 +532,7 @@ static ssize_t dsicm_show_ulps_timeout(struct device *dev,
|
||||
t = ddata->ulps_timeout;
|
||||
mutex_unlock(&ddata->lock);
|
||||
|
||||
return snprintf(buf, PAGE_SIZE, "%u\n", t);
|
||||
return sysfs_emit(buf, "%u\n", t);
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(num_dsi_errors, S_IRUGO, dsicm_num_errors_show, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user