Commit ebdb71ea authored by Bjorn Helgaas's avatar Bjorn Helgaas Committed by Linus Torvalds

[PATCH] PNP: adjust pnp_register_card_driver() signature: interwave

Remove the assumption that pnp_register_card_driver() returns the
number of devices claimed.  And fix some __init/__devinit issues.
Signed-off-by: default avatarBjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Adam Belay <ambx1@neo.rr.com>
Cc: Jaroslav Kysela <perex@suse.cz>
Acked-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 6a3a3a02
...@@ -791,7 +791,7 @@ static int __devinit snd_interwave_probe(struct snd_card *card, int dev) ...@@ -791,7 +791,7 @@ static int __devinit snd_interwave_probe(struct snd_card *card, int dev)
return 0; return 0;
} }
static int __init snd_interwave_nonpnp_probe1(int dev, struct platform_device *devptr) static int __devinit snd_interwave_nonpnp_probe1(int dev, struct platform_device *devptr)
{ {
struct snd_card *card; struct snd_card *card;
int err; int err;
...@@ -809,7 +809,7 @@ static int __init snd_interwave_nonpnp_probe1(int dev, struct platform_device *d ...@@ -809,7 +809,7 @@ static int __init snd_interwave_nonpnp_probe1(int dev, struct platform_device *d
return 0; return 0;
} }
static int __init snd_interwave_nonpnp_probe(struct platform_device *pdev) static int __devinit snd_interwave_nonpnp_probe(struct platform_device *pdev)
{ {
int dev = pdev->id; int dev = pdev->id;
int err; int err;
...@@ -867,6 +867,7 @@ static struct platform_driver snd_interwave_driver = { ...@@ -867,6 +867,7 @@ static struct platform_driver snd_interwave_driver = {
}; };
#ifdef CONFIG_PNP #ifdef CONFIG_PNP
static unsigned int __devinitdata interwave_pnp_devices;
static int __devinit snd_interwave_pnp_detect(struct pnp_card_link *pcard, static int __devinit snd_interwave_pnp_detect(struct pnp_card_link *pcard,
const struct pnp_card_device_id *pid) const struct pnp_card_device_id *pid)
...@@ -897,6 +898,7 @@ static int __devinit snd_interwave_pnp_detect(struct pnp_card_link *pcard, ...@@ -897,6 +898,7 @@ static int __devinit snd_interwave_pnp_detect(struct pnp_card_link *pcard,
} }
pnp_set_card_drvdata(pcard, card); pnp_set_card_drvdata(pcard, card);
dev++; dev++;
interwave_pnp_devices++;
return 0; return 0;
} }
...@@ -954,10 +956,10 @@ static int __init alsa_card_interwave_init(void) ...@@ -954,10 +956,10 @@ static int __init alsa_card_interwave_init(void)
} }
/* ISA PnP cards */ /* ISA PnP cards */
i = pnp_register_card_driver(&interwave_pnpc_driver); err = pnp_register_card_driver(&interwave_pnpc_driver);
if (i >= 0) { if (!err) {
pnp_registered = 1; pnp_registered = 1;
cards += i; cards += interwave_pnp_devices;;
} }
if (!cards) { if (!cards) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment