Skip to content

Commit

Permalink
Input: Probe PnP gameports first, ISA after that.
Browse files Browse the repository at this point in the history
Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
  • Loading branch information
Vojtech Pavlik authored and Dmitry Torokhov committed May 29, 2005
1 parent 7d6064d commit f6397ce
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions drivers/input/gameport/ns558.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,18 +258,18 @@ static int __init ns558_init(void)
{
int i = 0;

if (pnp_register_driver(&ns558_pnp_driver) >= 0)
pnp_registered = 1;

/*
* Probe ISA ports first so that PnP gets to choose free port addresses
* not occupied by the ISA ports.
* Probe ISA ports after PnP, so that PnP ports that are already
* enabled get detected as PnP. This may be suboptimal in multi-device
* configurations, but saves hassle with simple setups.
*/

while (ns558_isa_portlist[i])
ns558_isa_probe(ns558_isa_portlist[i++]);

if (pnp_register_driver(&ns558_pnp_driver) >= 0)
pnp_registered = 1;


return (list_empty(&ns558_list) && !pnp_registered) ? -ENODEV : 0;
}

Expand Down

0 comments on commit f6397ce

Please sign in to comment.