aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/atmel_cs.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2008-08-02 09:30:31 -0400
committerDominik Brodowski <linux@dominikbrodowski.net>2008-08-22 19:22:00 -0400
commit8e2fc39ddea7fe8c6798837da282db88a09af793 (patch)
tree7cba37b5b86f4ff25562012a14e29424e3872de0 /drivers/net/wireless/atmel_cs.c
parent498ac1899b62626bf6879a251d75c22ec564c559 (diff)
pcmcia: pcmcia_config_loop() default CIS entry handling
Many drivers use the default CIS entry within their pcmcia_config_loop() callback function. Therefore, factor the default CIS entry handling out. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/net/wireless/atmel_cs.c')
-rw-r--r--drivers/net/wireless/atmel_cs.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/net/wireless/atmel_cs.c b/drivers/net/wireless/atmel_cs.c
index 12efd44d64a1..c71aae992ecc 100644
--- a/drivers/net/wireless/atmel_cs.c
+++ b/drivers/net/wireless/atmel_cs.c
@@ -226,14 +226,12 @@ static int card_present(void *arg)
226 226
227static int atmel_config_check(struct pcmcia_device *p_dev, 227static int atmel_config_check(struct pcmcia_device *p_dev,
228 cistpl_cftable_entry_t *cfg, 228 cistpl_cftable_entry_t *cfg,
229 cistpl_cftable_entry_t *dflt,
229 void *priv_data) 230 void *priv_data)
230{ 231{
231 cistpl_cftable_entry_t *dflt = priv_data;
232
233 if (cfg->flags & CISTPL_CFTABLE_DEFAULT)
234 *dflt = *cfg;
235 if (cfg->index == 0) 232 if (cfg->index == 0)
236 return -ENODEV; 233 return -ENODEV;
234
237 /* Does this card need audio output? */ 235 /* Does this card need audio output? */
238 if (cfg->flags & CISTPL_CFTABLE_AUDIO) { 236 if (cfg->flags & CISTPL_CFTABLE_AUDIO) {
239 p_dev->conf.Attributes |= CONF_ENABLE_SPKR; 237 p_dev->conf.Attributes |= CONF_ENABLE_SPKR;
@@ -278,7 +276,6 @@ static int atmel_config(struct pcmcia_device *link)
278 local_info_t *dev; 276 local_info_t *dev;
279 int last_fn, last_ret; 277 int last_fn, last_ret;
280 struct pcmcia_device_id *did; 278 struct pcmcia_device_id *did;
281 cistpl_cftable_entry_t dflt = { 0 };
282 279
283 dev = link->priv; 280 dev = link->priv;
284 did = handle_to_dev(link).driver_data; 281 did = handle_to_dev(link).driver_data;
@@ -297,7 +294,7 @@ static int atmel_config(struct pcmcia_device *link)
297 these things without consulting the CIS, and most client drivers 294 these things without consulting the CIS, and most client drivers
298 will only use the CIS to fill in implementation-defined details. 295 will only use the CIS to fill in implementation-defined details.
299 */ 296 */
300 if (pcmcia_loop_config(link, atmel_config_check, &dflt)) 297 if (pcmcia_loop_config(link, atmel_config_check, NULL))
301 goto failed; 298 goto failed;
302 299
303 /* 300 /*