summaryrefslogtreecommitdiff
path: root/drivers/usb/common
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2017-03-22 17:16:27 +0300
committerRob Herring <robh@kernel.org>2017-03-22 22:56:13 +0300
commit0634c2958927198797bf9e55d26fb51cce4c22b4 (patch)
treee517e4931cce3cec6323e08355d53a97b8de66b3 /drivers/usb/common
parentbcf54d5385abaea9c8026aae6f4eeb348671a52d (diff)
downloadlinux-0634c2958927198797bf9e55d26fb51cce4c22b4.tar.xz
of: Add function for generating a DT modalias with a newline
The modalias sysfs attr is lacking a newline for DT aliases on platform devices. The macio and ibmebus correctly add the newline, but open code it. Introduce a new function, of_device_modalias(), that fills the buffer with the modalias including the newline and update users of the old of_device_get_modalias function. Signed-off-by: Rob Herring <robh@kernel.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Frank Rowand <frowand.list@gmail.com> Cc: linuxppc-dev@lists.ozlabs.org Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/common')
-rw-r--r--drivers/usb/common/ulpi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/common/ulpi.c b/drivers/usb/common/ulpi.c
index c9480d77810c..930e8f35f8df 100644
--- a/drivers/usb/common/ulpi.c
+++ b/drivers/usb/common/ulpi.c
@@ -107,7 +107,7 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
int len;
struct ulpi *ulpi = to_ulpi_dev(dev);
- len = of_device_get_modalias(dev, buf, PAGE_SIZE - 1);
+ len = of_device_modalias(dev, buf, PAGE_SIZE);
if (len != -ENODEV)
return len;