Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6c2d046980299d52d78b2738ad7f11fc593dea75
Commit:     6c2d046980299d52d78b2738ad7f11fc593dea75
Parent:     9414715a7bbb45450015e9bc2676d85d919d08d4
Author:     Olaf Hering <[EMAIL PROTECTED]>
AuthorDate: Mon Apr 2 14:33:27 2007 +0200
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Fri Apr 13 03:55:17 2007 +1000

    [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: Olaf Hering <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
---
 drivers/macintosh/macio_sysfs.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/macintosh/macio_sysfs.c b/drivers/macintosh/macio_sysfs.c
index 8566bdf..0a5647f 100644
--- a/drivers/macintosh/macio_sysfs.c
+++ b/drivers/macintosh/macio_sysfs.c
@@ -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;
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to