Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 25066
b: refs/heads/master
c: dd55563
h: refs/heads/master
v: v3
  • Loading branch information
Bjorn Helgaas authored and Dmitry Torokhov committed Mar 14, 2006
1 parent 30926c3 commit d4b341c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e5c6c8e457d16c7cbc12f849ad18d4d508950de2
refs/heads/master: dd55563f635751327eb06ae569d4761a0220f2e0
13 changes: 6 additions & 7 deletions trunk/drivers/input/gameport/ns558.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,14 +252,14 @@ static struct pnp_driver ns558_pnp_driver;

#endif

static int pnp_registered = 0;

static int __init ns558_init(void)
{
int i = 0;
int error;

if (pnp_register_driver(&ns558_pnp_driver) >= 0)
pnp_registered = 1;
error = pnp_register_driver(&ns558_pnp_driver);
if (error && error != -ENODEV) /* should be ENOSYS really */
return error;

/*
* Probe ISA ports after PnP, so that PnP ports that are already
Expand All @@ -270,7 +270,7 @@ static int __init ns558_init(void)
while (ns558_isa_portlist[i])
ns558_isa_probe(ns558_isa_portlist[i++]);

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

static void __exit ns558_exit(void)
Expand All @@ -283,8 +283,7 @@ static void __exit ns558_exit(void)
kfree(ns558);
}

if (pnp_registered)
pnp_unregister_driver(&ns558_pnp_driver);
pnp_unregister_driver(&ns558_pnp_driver);
}

module_init(ns558_init);
Expand Down

0 comments on commit d4b341c

Please sign in to comment.