Remove the assumption that pnp_register_driver() returns the number of devices
claimed.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Adam Belay <ambx1@neo.rr.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
static int __initdata synthirq = -1;
static int __initdata isapnp = 1;
static int __initdata synthirq = -1;
static int __initdata isapnp = 1;
+static unsigned int cs4232_devices;
+
MODULE_DESCRIPTION("CS4232 based soundcard driver");
MODULE_AUTHOR("Hannu Savolainen, Paul Barton-Davis");
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("CS4232 based soundcard driver");
MODULE_AUTHOR("Hannu Savolainen, Paul Barton-Davis");
MODULE_LICENSE("GPL");
return -ENODEV;
}
pnp_set_drvdata(dev,isapnpcfg);
return -ENODEV;
}
pnp_set_drvdata(dev,isapnpcfg);
- if (isapnp &&
- (pnp_register_driver(&cs4232_driver) > 0)
- )
- return 0;
+ if (isapnp) {
+ pnp_register_driver(&cs4232_driver);
+ if (cs4232_devices)
+ return 0;
+ }
if(io==-1||irq==-1||dma==-1)
{
if(io==-1||irq==-1||dma==-1)
{
int ints[7];
/* If we have isapnp cards, no need for options */
int ints[7];
/* If we have isapnp cards, no need for options */
- if (pnp_register_driver(&cs4232_driver) > 0)
+ pnp_register_driver(&cs4232_driver);
+ if (cs4232_devices)
return 1;
str = get_options(str, ARRAY_SIZE(ints), ints);
return 1;
str = get_options(str, ARRAY_SIZE(ints), ints);