[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1376854140-16904-1-git-send-email-yann@droneaud.fr>
Date: Sun, 18 Aug 2013 21:29:00 +0200
From: Yann Droneaud <yann@...neaud.fr>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Yann Droneaud <ydroneaud@...eya.com>,
Wei Shuai <cpuwolf@...il.com>,
Frans Klaver <frans.klaver@...ns.com>,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] USB: serial: fix stringify operator in usb-serial-simple
From: Yann Droneaud <ydroneaud@...eya.com>
usb-serial-simple uses an unknown stringify macro that make
all drivers being named "stringify(vendor)".
This can be a problem when two drivers have the same (wrong) name:
kernel: usbcore: registered new interface driver usb_serial_simple
kernel: usbserial: USB Serial support registered for stringify(vendor)
kernel Error: Driver 'stringify(vendor)' is already registered, aborting...
kernel: usbserial: problem -16 when registering driver stringify(vendor)
kernel: usbserial: USB Serial deregistering driver stringify(vendor)
kernel: usbcore: deregistering interface driver usb_serial_simple
Before the fix:
$ strings drivers/usb/serial/usb-serial-simple.o
usb_serial_simple
stringify(vendor)
After the fix:
$ strings drivers/usb/serial/usb-serial-simple.o
usb_serial_simple
funsoft
flashloader
vivopay
moto_modem
hp4x
suunto
siemens_mpi
This patch makes usb-serial-simple use the correct stringify operator.
Signed-off-by: Yann Droneaud <ydroneaud@...eya.com>
---
drivers/usb/serial/usb-serial-simple.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/serial/usb-serial-simple.c b/drivers/usb/serial/usb-serial-simple.c
index 6a06131..677c08c 100644
--- a/drivers/usb/serial/usb-serial-simple.c
+++ b/drivers/usb/serial/usb-serial-simple.c
@@ -29,7 +29,7 @@ static const struct usb_device_id vendor##_id_table[] = { \
static struct usb_serial_driver vendor##_device = { \
.driver = { \
.owner = THIS_MODULE, \
- .name = "stringify(vendor)", \
+ .name = #vendor, \
}, \
.id_table = vendor##_id_table, \
.num_ports = 1, \
--
1.8.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists