diff options
Diffstat (limited to 'sound/pcmcia/pdaudiocf/pdaudiocf.c')
-rw-r--r-- | sound/pcmcia/pdaudiocf/pdaudiocf.c | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf.c b/sound/pcmcia/pdaudiocf/pdaudiocf.c index fd3590fcaedb..2d40cc72f236 100644 --- a/sound/pcmcia/pdaudiocf/pdaudiocf.c +++ b/sound/pcmcia/pdaudiocf/pdaudiocf.c | |||
@@ -219,35 +219,15 @@ do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0) | |||
219 | static int pdacf_config(struct pcmcia_device *link) | 219 | static int pdacf_config(struct pcmcia_device *link) |
220 | { | 220 | { |
221 | struct snd_pdacf *pdacf = link->priv; | 221 | struct snd_pdacf *pdacf = link->priv; |
222 | tuple_t tuple; | ||
223 | cisparse_t *parse = NULL; | ||
224 | u_short buf[32]; | ||
225 | int last_fn, last_ret; | 222 | int last_fn, last_ret; |
226 | 223 | ||
227 | snd_printdd(KERN_DEBUG "pdacf_config called\n"); | 224 | snd_printdd(KERN_DEBUG "pdacf_config called\n"); |
228 | parse = kmalloc(sizeof(*parse), GFP_KERNEL); | ||
229 | if (! parse) { | ||
230 | snd_printk(KERN_ERR "pdacf_config: cannot allocate\n"); | ||
231 | return -ENOMEM; | ||
232 | } | ||
233 | tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY; | ||
234 | tuple.Attributes = 0; | ||
235 | tuple.TupleData = (cisdata_t *)buf; | ||
236 | tuple.TupleDataMax = sizeof(buf); | ||
237 | tuple.TupleOffset = 0; | ||
238 | tuple.DesiredTuple = CISTPL_CONFIG; | ||
239 | CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple)); | ||
240 | CS_CHECK(GetTupleData, pcmcia_get_tuple_data(link, &tuple)); | ||
241 | CS_CHECK(ParseTuple, pcmcia_parse_tuple(link, &tuple, parse)); | ||
242 | link->conf.ConfigBase = parse->config.base; | ||
243 | link->conf.ConfigIndex = 0x5; | 225 | link->conf.ConfigIndex = 0x5; |
244 | 226 | ||
245 | CS_CHECK(RequestIO, pcmcia_request_io(link, &link->io)); | 227 | CS_CHECK(RequestIO, pcmcia_request_io(link, &link->io)); |
246 | CS_CHECK(RequestIRQ, pcmcia_request_irq(link, &link->irq)); | 228 | CS_CHECK(RequestIRQ, pcmcia_request_irq(link, &link->irq)); |
247 | CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link, &link->conf)); | 229 | CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link, &link->conf)); |
248 | 230 | ||
249 | kfree(parse); | ||
250 | |||
251 | if (snd_pdacf_assign_resources(pdacf, link->io.BasePort1, link->irq.AssignedIRQ) < 0) | 231 | if (snd_pdacf_assign_resources(pdacf, link->io.BasePort1, link->irq.AssignedIRQ) < 0) |
252 | goto failed; | 232 | goto failed; |
253 | 233 | ||
@@ -255,7 +235,6 @@ static int pdacf_config(struct pcmcia_device *link) | |||
255 | return 0; | 235 | return 0; |
256 | 236 | ||
257 | cs_failed: | 237 | cs_failed: |
258 | kfree(parse); | ||
259 | cs_error(link, last_fn, last_ret); | 238 | cs_error(link, last_fn, last_ret); |
260 | failed: | 239 | failed: |
261 | pcmcia_disable_device(link); | 240 | pcmcia_disable_device(link); |
@@ -299,7 +278,8 @@ static int pdacf_resume(struct pcmcia_device *link) | |||
299 | * Module entry points | 278 | * Module entry points |
300 | */ | 279 | */ |
301 | static struct pcmcia_device_id snd_pdacf_ids[] = { | 280 | static struct pcmcia_device_id snd_pdacf_ids[] = { |
302 | PCMCIA_DEVICE_MANF_CARD(0x015d, 0x4c45), | 281 | /* this is too general PCMCIA_DEVICE_MANF_CARD(0x015d, 0x4c45), */ |
282 | PCMCIA_DEVICE_PROD_ID12("Core Sound","PDAudio-CF",0x396d19d2,0x71717b49), | ||
303 | PCMCIA_DEVICE_NULL | 283 | PCMCIA_DEVICE_NULL |
304 | }; | 284 | }; |
305 | MODULE_DEVICE_TABLE(pcmcia, snd_pdacf_ids); | 285 | MODULE_DEVICE_TABLE(pcmcia, snd_pdacf_ids); |