mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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 <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Frank Rowand <[email protected]> Cc: [email protected] Acked-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
bcf54d5385
commit
0634c29589
7 changed files with 24 additions and 22 deletions
|
|
@ -847,7 +847,7 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *a,
|
|||
struct platform_device *pdev = to_platform_device(dev);
|
||||
int len;
|
||||
|
||||
len = of_device_get_modalias(dev, buf, PAGE_SIZE -1);
|
||||
len = of_device_modalias(dev, buf, PAGE_SIZE);
|
||||
if (len != -ENODEV)
|
||||
return len;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue