summaryrefslogtreecommitdiffstats
path: root/sound/pcmcia/pdaudiocf
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pcmcia/pdaudiocf')
-rw-r--r--sound/pcmcia/pdaudiocf/pdaudiocf.c12
-rw-r--r--sound/pcmcia/pdaudiocf/pdaudiocf.h2
2 files changed, 6 insertions, 8 deletions
diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf.c b/sound/pcmcia/pdaudiocf/pdaudiocf.c
index 7c4091a57b69..b4158201e9e6 100644
--- a/sound/pcmcia/pdaudiocf/pdaudiocf.c
+++ b/sound/pcmcia/pdaudiocf/pdaudiocf.c
@@ -70,7 +70,7 @@ static void pdacf_release(dev_link_t *link)
*/
static int snd_pdacf_free(struct snd_pdacf *pdacf)
{
- dev_link_t *link = &pdacf->link;
+ dev_link_t *link = pdacf->p_dev;
pdacf_release(link);
@@ -100,6 +100,8 @@ static int snd_pdacf_attach(struct pcmcia_device *p_dev)
.dev_free = snd_pdacf_dev_free,
};
+ link = dev_to_instance(p_dev);
+
snd_printdd(KERN_DEBUG "pdacf_attach called\n");
/* find an empty slot from the card list */
for (i = 0; i < SNDRV_CARDS; i++) {
@@ -133,7 +135,7 @@ static int snd_pdacf_attach(struct pcmcia_device *p_dev)
pdacf->index = i;
card_list[i] = card;
- link = &pdacf->link;
+ pdacf->p_dev = p_dev;
link->priv = pdacf;
link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
@@ -150,10 +152,6 @@ static int snd_pdacf_attach(struct pcmcia_device *p_dev)
link->conf.ConfigIndex = 1;
link->conf.Present = PRESENT_OPTION;
- /* Chain drivers */
- link->next = NULL;
-
- link->handle = p_dev;
pdacf_config(link);
return 0;
@@ -262,7 +260,7 @@ static void pdacf_config(dev_link_t *link)
if (snd_pdacf_assign_resources(pdacf, link->io.BasePort1, link->irq.AssignedIRQ) < 0)
goto failed;
- link->dev = &pdacf->node;
+ link->dev_node = &pdacf->node;
link->state &= ~DEV_CONFIG_PENDING;
return;
diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf.h b/sound/pcmcia/pdaudiocf/pdaudiocf.h
index 2744f189a613..9a14a4f64bd3 100644
--- a/sound/pcmcia/pdaudiocf/pdaudiocf.h
+++ b/sound/pcmcia/pdaudiocf/pdaudiocf.h
@@ -116,7 +116,7 @@ struct snd_pdacf {
void *pcm_area;
/* pcmcia stuff */
- dev_link_t link;
+ struct pcmcia_device *p_dev;
dev_node_t node;
};