diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-03-05 04:45:09 -0500 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-03-31 10:15:57 -0500 |
commit | fd238232cd0ff4840ae6946bb338502154096d88 (patch) | |
tree | d20e8f5871f7cff9d0867a84f6ba088fbffcbe28 /sound/pcmcia/pdaudiocf/pdaudiocf.c | |
parent | a78f4dd331a4f6a396eb5849656a4a72a70a56d7 (diff) |
[PATCH] pcmcia: embed dev_link_t into struct pcmcia_device
Embed dev_link_t into struct pcmcia_device(), as they basically address the
same entity. The actual contents of dev_link_t will be cleaned up step by step.
This patch includes a bugfix from and signed-off-by Andrew Morton.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'sound/pcmcia/pdaudiocf/pdaudiocf.c')
-rw-r--r-- | sound/pcmcia/pdaudiocf/pdaudiocf.c | 12 |
1 files changed, 5 insertions, 7 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) | |||
70 | */ | 70 | */ |
71 | static int snd_pdacf_free(struct snd_pdacf *pdacf) | 71 | static int snd_pdacf_free(struct snd_pdacf *pdacf) |
72 | { | 72 | { |
73 | dev_link_t *link = &pdacf->link; | 73 | dev_link_t *link = pdacf->p_dev; |
74 | 74 | ||
75 | pdacf_release(link); | 75 | pdacf_release(link); |
76 | 76 | ||
@@ -100,6 +100,8 @@ static int snd_pdacf_attach(struct pcmcia_device *p_dev) | |||
100 | .dev_free = snd_pdacf_dev_free, | 100 | .dev_free = snd_pdacf_dev_free, |
101 | }; | 101 | }; |
102 | 102 | ||
103 | link = dev_to_instance(p_dev); | ||
104 | |||
103 | snd_printdd(KERN_DEBUG "pdacf_attach called\n"); | 105 | snd_printdd(KERN_DEBUG "pdacf_attach called\n"); |
104 | /* find an empty slot from the card list */ | 106 | /* find an empty slot from the card list */ |
105 | for (i = 0; i < SNDRV_CARDS; i++) { | 107 | for (i = 0; i < SNDRV_CARDS; i++) { |
@@ -133,7 +135,7 @@ static int snd_pdacf_attach(struct pcmcia_device *p_dev) | |||
133 | pdacf->index = i; | 135 | pdacf->index = i; |
134 | card_list[i] = card; | 136 | card_list[i] = card; |
135 | 137 | ||
136 | link = &pdacf->link; | 138 | pdacf->p_dev = p_dev; |
137 | link->priv = pdacf; | 139 | link->priv = pdacf; |
138 | 140 | ||
139 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; | 141 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; |
@@ -150,10 +152,6 @@ static int snd_pdacf_attach(struct pcmcia_device *p_dev) | |||
150 | link->conf.ConfigIndex = 1; | 152 | link->conf.ConfigIndex = 1; |
151 | link->conf.Present = PRESENT_OPTION; | 153 | link->conf.Present = PRESENT_OPTION; |
152 | 154 | ||
153 | /* Chain drivers */ | ||
154 | link->next = NULL; | ||
155 | |||
156 | link->handle = p_dev; | ||
157 | pdacf_config(link); | 155 | pdacf_config(link); |
158 | 156 | ||
159 | return 0; | 157 | return 0; |
@@ -262,7 +260,7 @@ static void pdacf_config(dev_link_t *link) | |||
262 | if (snd_pdacf_assign_resources(pdacf, link->io.BasePort1, link->irq.AssignedIRQ) < 0) | 260 | if (snd_pdacf_assign_resources(pdacf, link->io.BasePort1, link->irq.AssignedIRQ) < 0) |
263 | goto failed; | 261 | goto failed; |
264 | 262 | ||
265 | link->dev = &pdacf->node; | 263 | link->dev_node = &pdacf->node; |
266 | link->state &= ~DEV_CONFIG_PENDING; | 264 | link->state &= ~DEV_CONFIG_PENDING; |
267 | return; | 265 | return; |
268 | 266 | ||