diff options
Diffstat (limited to 'drivers/tty/serdev/core.c')
-rw-r--r-- | drivers/tty/serdev/core.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/tty/serdev/core.c b/drivers/tty/serdev/core.c index 1e1cbae3a0ea..1c4829a56351 100644 --- a/drivers/tty/serdev/core.c +++ b/drivers/tty/serdev/core.c | |||
@@ -224,10 +224,7 @@ static int serdev_drv_remove(struct device *dev) | |||
224 | static ssize_t modalias_show(struct device *dev, | 224 | static ssize_t modalias_show(struct device *dev, |
225 | struct device_attribute *attr, char *buf) | 225 | struct device_attribute *attr, char *buf) |
226 | { | 226 | { |
227 | ssize_t len = of_device_get_modalias(dev, buf, PAGE_SIZE - 2); | 227 | return of_device_modalias(dev, buf, PAGE_SIZE); |
228 | buf[len] = '\n'; | ||
229 | buf[len+1] = 0; | ||
230 | return len+1; | ||
231 | } | 228 | } |
232 | 229 | ||
233 | static struct device_attribute serdev_device_attrs[] = { | 230 | static struct device_attribute serdev_device_attrs[] = { |