From 116674acc97ba75a720329996877077d988443a2 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Fri, 9 Mar 2001 20:33:35 +0000 Subject: Merge with Linux 2.4.2. --- drivers/parport/probe.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers/parport/probe.c') diff --git a/drivers/parport/probe.c b/drivers/parport/probe.c index eb94af448..e19771dfc 100644 --- a/drivers/parport/probe.c +++ b/drivers/parport/probe.c @@ -75,8 +75,9 @@ static void parse_data(struct parport *port, int device, char *str) char *u; *(sep++) = 0; /* Get rid of trailing blanks */ - u = strchr (sep, ' '); - if (u) *u = '\0'; + u = sep + strlen (sep) - 1; + while (u >= p && *u == ' ') + *u-- = '\0'; u = p; while (*u) { *u = toupper(*u); -- cgit v1.2.3