From: Benoit Goby Date: Thu, 10 May 2012 08:08:01 +0000 (+0200) Subject: usb: gadget: u_serial: Allow calling gserial_setup after init X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c3c04b2945eccd8cdc07bbede3090c18dfed43c0;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git usb: gadget: u_serial: Allow calling gserial_setup after init Remove geserial_setup from the init section. The android gadget driver calls it after probe, after userspace has configured the gadget driver. Signed-off-by: Benoit Goby Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Kyungmin Park Acked-by: Michal Nazarewicz Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/gadget/u_serial.c b/drivers/usb/gadget/u_serial.c index 6c23938d2711..380a87f6e56c 100644 --- a/drivers/usb/gadget/u_serial.c +++ b/drivers/usb/gadget/u_serial.c @@ -1025,7 +1025,7 @@ static const struct tty_operations gs_tty_ops = { static struct tty_driver *gs_tty_driver; -static int __init +static int gs_port_alloc(unsigned port_num, struct usb_cdc_line_coding *coding) { struct gs_port *port; @@ -1071,7 +1071,7 @@ gs_port_alloc(unsigned port_num, struct usb_cdc_line_coding *coding) * * Returns negative errno or zero. */ -int __init gserial_setup(struct usb_gadget *g, unsigned count) +int gserial_setup(struct usb_gadget *g, unsigned count) { unsigned i; struct usb_cdc_line_coding coding;