aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/input/gameport/gameport.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/input/gameport/gameport.c b/drivers/input/gameport/gameport.c
index a0af97efe6ac..bba5894fcecd 100644
--- a/drivers/input/gameport/gameport.c
+++ b/drivers/input/gameport/gameport.c
@@ -730,12 +730,6 @@ static int gameport_driver_remove(struct device *dev)
730 return 0; 730 return 0;
731} 731}
732 732
733static struct bus_type gameport_bus = {
734 .name = "gameport",
735 .probe = gameport_driver_probe,
736 .remove = gameport_driver_remove,
737};
738
739static void gameport_add_driver(struct gameport_driver *drv) 733static void gameport_add_driver(struct gameport_driver *drv)
740{ 734{
741 int error; 735 int error;
@@ -781,6 +775,15 @@ static int gameport_bus_match(struct device *dev, struct device_driver *drv)
781 return !gameport_drv->ignore; 775 return !gameport_drv->ignore;
782} 776}
783 777
778static struct bus_type gameport_bus = {
779 .name = "gameport",
780 .dev_attrs = gameport_device_attrs,
781 .drv_attrs = gameport_driver_attrs,
782 .match = gameport_bus_match,
783 .probe = gameport_driver_probe,
784 .remove = gameport_driver_remove,
785};
786
784static void gameport_set_drv(struct gameport *gameport, struct gameport_driver *drv) 787static void gameport_set_drv(struct gameport *gameport, struct gameport_driver *drv)
785{ 788{
786 mutex_lock(&gameport->drv_mutex); 789 mutex_lock(&gameport->drv_mutex);
@@ -790,7 +793,6 @@ static void gameport_set_drv(struct gameport *gameport, struct gameport_driver *
790 793
791int gameport_open(struct gameport *gameport, struct gameport_driver *drv, int mode) 794int gameport_open(struct gameport *gameport, struct gameport_driver *drv, int mode)
792{ 795{
793
794 if (gameport->open) { 796 if (gameport->open) {
795 if (gameport->open(gameport, mode)) { 797 if (gameport->open(gameport, mode)) {
796 return -1; 798 return -1;
@@ -818,9 +820,6 @@ static int __init gameport_init(void)
818{ 820{
819 int error; 821 int error;
820 822
821 gameport_bus.dev_attrs = gameport_device_attrs;
822 gameport_bus.drv_attrs = gameport_driver_attrs;
823 gameport_bus.match = gameport_bus_match;
824 error = bus_register(&gameport_bus); 823 error = bus_register(&gameport_bus);
825 if (error) { 824 if (error) {
826 printk(KERN_ERR "gameport: failed to register gameport bus, error: %d\n", error); 825 printk(KERN_ERR "gameport: failed to register gameport bus, error: %d\n", error);