mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
PCI/sysfs: Add 'devspec' newline
Previously, when the value of the "devspec" sysfs attribute was read from the user space there was no newline present, and utilities such as "cat" wouldn't display the result of the read correctly. Append a newline character in the show() function to match other "devspec" attributes. Link: https://lore.kernel.org/r/20210603000112.703037-5-kw@linux.com Signed-off-by: Krzysztof Wilczyński <kw@linux.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
This commit is contained in:
parent
381bd3fa83
commit
14c19b2a40
1 changed files with 1 additions and 1 deletions
|
@ -537,7 +537,7 @@ static ssize_t devspec_show(struct device *dev,
|
|||
|
||||
if (np == NULL)
|
||||
return 0;
|
||||
return sysfs_emit(buf, "%pOF", np);
|
||||
return sysfs_emit(buf, "%pOF\n", np);
|
||||
}
|
||||
static DEVICE_ATTR_RO(devspec);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue