summaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serdev/core.c5
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)
static ssize_t modalias_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
- ssize_t len = of_device_get_modalias(dev, buf, PAGE_SIZE - 2);
- buf[len] = '\n';
- buf[len+1] = 0;
- return len+1;
+ return of_device_modalias(dev, buf, PAGE_SIZE);
}
static struct device_attribute serdev_device_attrs[] = {