Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6c2d0469 authored by Olaf Hering's avatar Olaf Hering Committed by Paul Mackerras
Browse files

[POWERPC] Fix modalias content in sysfs for macio devices



Currently the buf pointer is advanced too far during each iteration.
Also terminate the string with a newline.

Signed-off-by: default avatarOlaf Hering <olaf@aepfle.de>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 9414715a
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -53,12 +53,14 @@ static ssize_t modalias_show (struct device *dev, struct device_attribute *attr,
	buf += length;
	while (cplen > 0) {
		int l;
		length += sprintf (buf, "C%s", compat);
		buf += length;
		l = sprintf (buf, "C%s", compat);
		length += l;
		buf += l;
		l = strlen (compat) + 1;
		compat += l;
		cplen -= l;
	}
	length += sprintf(buf, "\n");

	return length;
}