aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/pcmcia
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2010-07-30 03:51:52 -0400
committerDominik Brodowski <linux@dominikbrodowski.net>2010-09-29 11:20:23 -0400
commit440eed43e2a95bb842488755683716814da10f2b (patch)
tree45c49181a077f845cd366cfa7dc07f259fd01078 /drivers/net/pcmcia
parent9485ee14e143c7076e88deea1e87ca3eb0b2f94e (diff)
pcmcia: introduce autoconfiguration feature
Introduce an autoconfiguration feature to set certain values in pcmcia_loop_config(), instead of copying the same code over and over in each PCMCIA driver. At first, introduce the following options: CONF_AUTO_CHECK_VCC check or matching Vcc entry CONF_AUTO_SET_VPP set Vpp CONF_AUTO_AUDIO enable the speaker line CC: netdev@vger.kernel.org CC: linux-wireless@vger.kernel.org CC: linux-ide@vger.kernel.org CC: linux-usb@vger.kernel.org CC: laforge@gnumonks.org CC: linux-mtd@lists.infradead.org CC: alsa-devel@alsa-project.org CC: linux-serial@vger.kernel.org CC: Jiri Kosina <jkosina@suse.cz> CC: linux-scsi@vger.kernel.org Acked-by: Gustavo F. Padovan <padovan@profusion.mobi> (for drivers/bluetooth) Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/net/pcmcia')
-rw-r--r--drivers/net/pcmcia/axnet_cs.c1
-rw-r--r--drivers/net/pcmcia/fmvj18x_cs.c1
-rw-r--r--drivers/net/pcmcia/pcnet_cs.c1
-rw-r--r--drivers/net/pcmcia/smc91c92_cs.c2
-rw-r--r--drivers/net/pcmcia/xirc2ps_cs.c5
5 files changed, 2 insertions, 8 deletions
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c
index f361d2865e34..17f1040e255e 100644
--- a/drivers/net/pcmcia/axnet_cs.c
+++ b/drivers/net/pcmcia/axnet_cs.c
@@ -287,7 +287,6 @@ static int try_io_port(struct pcmcia_device *link)
287static int axnet_configcheck(struct pcmcia_device *p_dev, 287static int axnet_configcheck(struct pcmcia_device *p_dev,
288 cistpl_cftable_entry_t *cfg, 288 cistpl_cftable_entry_t *cfg,
289 cistpl_cftable_entry_t *dflt, 289 cistpl_cftable_entry_t *dflt,
290 unsigned int vcc,
291 void *priv_data) 290 void *priv_data)
292{ 291{
293 int i; 292 int i;
diff --git a/drivers/net/pcmcia/fmvj18x_cs.c b/drivers/net/pcmcia/fmvj18x_cs.c
index f6865adb126d..c1479e3bfab4 100644
--- a/drivers/net/pcmcia/fmvj18x_cs.c
+++ b/drivers/net/pcmcia/fmvj18x_cs.c
@@ -322,7 +322,6 @@ static int ungermann_try_io_port(struct pcmcia_device *link)
322static int fmvj18x_ioprobe(struct pcmcia_device *p_dev, 322static int fmvj18x_ioprobe(struct pcmcia_device *p_dev,
323 cistpl_cftable_entry_t *cfg, 323 cistpl_cftable_entry_t *cfg,
324 cistpl_cftable_entry_t *dflt, 324 cistpl_cftable_entry_t *dflt,
325 unsigned int vcc,
326 void *priv_data) 325 void *priv_data)
327{ 326{
328 return 0; /* strange, but that's what the code did already before... */ 327 return 0; /* strange, but that's what the code did already before... */
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c
index 4a3b6a43550f..12b028c6abc9 100644
--- a/drivers/net/pcmcia/pcnet_cs.c
+++ b/drivers/net/pcmcia/pcnet_cs.c
@@ -503,7 +503,6 @@ static int try_io_port(struct pcmcia_device *link)
503static int pcnet_confcheck(struct pcmcia_device *p_dev, 503static int pcnet_confcheck(struct pcmcia_device *p_dev,
504 cistpl_cftable_entry_t *cfg, 504 cistpl_cftable_entry_t *cfg,
505 cistpl_cftable_entry_t *dflt, 505 cistpl_cftable_entry_t *dflt,
506 unsigned int vcc,
507 void *priv_data) 506 void *priv_data)
508{ 507{
509 int *priv = priv_data; 508 int *priv = priv_data;
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c
index 8c16ba672012..e127d2b546dd 100644
--- a/drivers/net/pcmcia/smc91c92_cs.c
+++ b/drivers/net/pcmcia/smc91c92_cs.c
@@ -420,7 +420,6 @@ static int mhz_3288_power(struct pcmcia_device *link)
420static int mhz_mfc_config_check(struct pcmcia_device *p_dev, 420static int mhz_mfc_config_check(struct pcmcia_device *p_dev,
421 cistpl_cftable_entry_t *cf, 421 cistpl_cftable_entry_t *cf,
422 cistpl_cftable_entry_t *dflt, 422 cistpl_cftable_entry_t *dflt,
423 unsigned int vcc,
424 void *priv_data) 423 void *priv_data)
425{ 424{
426 int k; 425 int k;
@@ -590,7 +589,6 @@ static int mot_setup(struct pcmcia_device *link)
590static int smc_configcheck(struct pcmcia_device *p_dev, 589static int smc_configcheck(struct pcmcia_device *p_dev,
591 cistpl_cftable_entry_t *cf, 590 cistpl_cftable_entry_t *cf,
592 cistpl_cftable_entry_t *dflt, 591 cistpl_cftable_entry_t *dflt,
593 unsigned int vcc,
594 void *priv_data) 592 void *priv_data)
595{ 593{
596 p_dev->resource[0]->start = cf->io.win[0].base; 594 p_dev->resource[0]->start = cf->io.win[0].base;
diff --git a/drivers/net/pcmcia/xirc2ps_cs.c b/drivers/net/pcmcia/xirc2ps_cs.c
index 7a4a99b73d17..2bc2eb89c4cd 100644
--- a/drivers/net/pcmcia/xirc2ps_cs.c
+++ b/drivers/net/pcmcia/xirc2ps_cs.c
@@ -668,7 +668,6 @@ static int
668xirc2ps_config_modem(struct pcmcia_device *p_dev, 668xirc2ps_config_modem(struct pcmcia_device *p_dev,
669 cistpl_cftable_entry_t *cf, 669 cistpl_cftable_entry_t *cf,
670 cistpl_cftable_entry_t *dflt, 670 cistpl_cftable_entry_t *dflt,
671 unsigned int vcc,
672 void *priv_data) 671 void *priv_data)
673{ 672{
674 unsigned int ioaddr; 673 unsigned int ioaddr;
@@ -688,7 +687,6 @@ static int
688xirc2ps_config_check(struct pcmcia_device *p_dev, 687xirc2ps_config_check(struct pcmcia_device *p_dev,
689 cistpl_cftable_entry_t *cf, 688 cistpl_cftable_entry_t *cf,
690 cistpl_cftable_entry_t *dflt, 689 cistpl_cftable_entry_t *dflt,
691 unsigned int vcc,
692 void *priv_data) 690 void *priv_data)
693{ 691{
694 int *pass = priv_data; 692 int *pass = priv_data;
@@ -826,7 +824,8 @@ xirc2ps_config(struct pcmcia_device * link)
826 * the Mako if (on the first pass) the COR bit 5 is set. 824 * the Mako if (on the first pass) the COR bit 5 is set.
827 */ 825 */
828 for (pass=0; pass < 2; pass++) 826 for (pass=0; pass < 2; pass++)
829 if (!pcmcia_loop_config(link, xirc2ps_config_check, &pass)) 827 if (!pcmcia_loop_config(link, xirc2ps_config_check,
828 &pass))
830 goto port_found; 829 goto port_found;
831 /* if special option: 830 /* if special option:
832 * try to configure as Ethernet only. 831 * try to configure as Ethernet only.