mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
[PATCH] Driver core: Documentation: fix whitespace between parameters
Fix whitespace after comma between parameters. Signed-off-by: Jan Veldeman <Jan.Veldeman@advalvas.be> Signed-off-by: Domen Puncer <domen@coderock.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
9a8af6b3b6
commit
f8d825bfb8
@ -216,13 +216,13 @@ A very simple (and naive) implementation of a device attribute is:
|
||||
|
||||
static ssize_t show_name(struct device *dev, struct device_attribute *attr, char *buf)
|
||||
{
|
||||
return sprintf(buf,"%s\n",dev->name);
|
||||
return snprintf(buf, PAGE_SIZE, "%s\n", dev->name);
|
||||
}
|
||||
|
||||
static ssize_t store_name(struct device * dev, const char * buf)
|
||||
{
|
||||
sscanf(buf, "%20s", dev->name);
|
||||
return strlen(buf);
|
||||
return strnlen(buf, PAGE_SIZE);
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(name, S_IRUGO, show_name, store_name);
|
||||
|
Loading…
x
Reference in New Issue
Block a user