lkml.org 
[lkml]   [2002]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[2.5 patch] fix compile error in usb-serial.c
drivers/usb/serial/usb-serial.c in 2.5.48 fails to compile with the
following error:

<-- snip -->

...
gcc -Wp,-MD,drivers/usb/serial/.usb-serial.o.d -D__KERNEL__ -Iinclude
-Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer
-fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=k6
-Iarch/i386/mach-generic -nostdinc -iwithprefix include -DKBUILD_BASENAME=usb_serial
-DKBUILD_MODNAME=usbserial -c -o drivers/usb/serial/usb-serial.o
drivers/usb/serial/usb-serial.c
drivers/usb/serial/usb-serial.c: In function `serial_read_proc':
drivers/usb/serial/usb-serial.c:842: dereferencing pointer to incompletetype
make[3]: *** [drivers/usb/serial/usb-serial.o] Error 1

<-- snip -->


Is the following patch correct?


--- linux-2.5.48/drivers/usb/serial/usb-serial.c.old 2002-11-18 15:16:57.000000000 +0100
+++ linux-2.5.48/drivers/usb/serial/usb-serial.c 2002-11-18 15:24:39.000000000 +0100
@@ -839,7 +839,7 @@

length += sprintf (page+length, "%d:", i);
if (serial->type->owner)
- length += sprintf (page+length, " module:%s", serial->type->owner->name);
+ length += sprintf (page+length, " module:%s", module_name(serial->type->owner));
length += sprintf (page+length, " name:\"%s\"", serial->type->name);
length += sprintf (page+length, " vendor:%04x product:%04x", serial->vendor, serial->product);
length += sprintf (page+length, " num_ports:%d", serial->num_ports);



cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:31    [W:0.664 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site