Bläddra i källkod

Input: initialize serio and gameport at subsystem level

Serio and gameport cores do not depend on other drivers and are
used by code living outside of drivers/input/{gameport|serio}.
Registering them at subsystem level guarantees that they are
fully initialized before anyone tries to use them.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Dmitry Torokhov 19 år sedan
förälder
incheckning
51c38f9bce
3 ändrade filer med 3 tillägg och 5 borttagningar
  1. 1 3
      drivers/Makefile
  2. 1 1
      drivers/input/gameport/gameport.c
  3. 1 1
      drivers/input/serio/serio.c

+ 1 - 3
drivers/Makefile

@@ -25,9 +25,6 @@ obj-$(CONFIG_CONNECTOR)		+= connector/
 obj-$(CONFIG_FB_I810)           += video/i810/
 obj-$(CONFIG_FB_I810)           += video/i810/
 obj-$(CONFIG_FB_INTEL)          += video/intelfb/
 obj-$(CONFIG_FB_INTEL)          += video/intelfb/
 
 
-# we also need input/serio early so serio bus is initialized by the time
-# serial drivers start registering their serio ports
-obj-$(CONFIG_SERIO)		+= input/serio/
 obj-y				+= serial/
 obj-y				+= serial/
 obj-$(CONFIG_PARPORT)		+= parport/
 obj-$(CONFIG_PARPORT)		+= parport/
 obj-y				+= base/ block/ misc/ mfd/ net/ media/
 obj-y				+= base/ block/ misc/ mfd/ net/ media/
@@ -53,6 +50,7 @@ obj-$(CONFIG_TC)		+= tc/
 obj-$(CONFIG_USB)		+= usb/
 obj-$(CONFIG_USB)		+= usb/
 obj-$(CONFIG_PCI)		+= usb/
 obj-$(CONFIG_PCI)		+= usb/
 obj-$(CONFIG_USB_GADGET)	+= usb/gadget/
 obj-$(CONFIG_USB_GADGET)	+= usb/gadget/
+obj-$(CONFIG_SERIO)		+= input/serio/
 obj-$(CONFIG_GAMEPORT)		+= input/gameport/
 obj-$(CONFIG_GAMEPORT)		+= input/gameport/
 obj-$(CONFIG_INPUT)		+= input/
 obj-$(CONFIG_INPUT)		+= input/
 obj-$(CONFIG_I2O)		+= message/
 obj-$(CONFIG_I2O)		+= message/

+ 1 - 1
drivers/input/gameport/gameport.c

@@ -797,5 +797,5 @@ static void __exit gameport_exit(void)
 	kthread_stop(gameport_task);
 	kthread_stop(gameport_task);
 }
 }
 
 
-module_init(gameport_init);
+subsys_initcall(gameport_init);
 module_exit(gameport_exit);
 module_exit(gameport_exit);

+ 1 - 1
drivers/input/serio/serio.c

@@ -924,5 +924,5 @@ static void __exit serio_exit(void)
 	kthread_stop(serio_task);
 	kthread_stop(serio_task);
 }
 }
 
 
-module_init(serio_init);
+subsys_initcall(serio_init);
 module_exit(serio_exit);
 module_exit(serio_exit);