[RFC PATCH 9/11] pcmcia updates (post 2.6.16): remove unneeded Vcc pseudo setting

Dominik Brodowski linux at dominikbrodowski.net
Sun Jan 15 14:14:45 EST 2006


Subject: [PATCH] pcmcia: remove unneeded Vcc pseudo setting
From: Dominik Brodowski <linux at dominikbrodowski.net>
Date: 1137325396 +0100

As we do not allow setting Vcc in the pcmcia core, and Vpp1 and
Vpp2 can only be set to the same value, a lot of code can be
streamlined.

Signed-off-by: Dominik Brodowski <linux at dominikbrodowski.net>

---

 drivers/bluetooth/bluecard_cs.c         |    4 ----
 drivers/bluetooth/bt3c_cs.c             |    6 +-----
 drivers/bluetooth/btuart_cs.c           |    6 +-----
 drivers/bluetooth/dtl1_cs.c             |    4 ----
 drivers/char/pcmcia/cm4000_cs.c         |    7 -------
 drivers/char/pcmcia/cm4040_cs.c         |    7 -------
 drivers/char/pcmcia/synclink_cs.c       |    7 -------
 drivers/ide/legacy/ide-cs.c             |   11 ++++-------
 drivers/isdn/hardware/avm/avm_cs.c      |    1 -
 drivers/isdn/hisax/avma1_cs.c           |    1 -
 drivers/isdn/hisax/elsa_cs.c            |    8 ++------
 drivers/isdn/hisax/sedlbauer_cs.c       |   16 ++++++----------
 drivers/isdn/hisax/teles_cs.c           |    8 ++------
 drivers/mtd/maps/pcmciamtd.c            |    7 ++-----
 drivers/net/pcmcia/3c574_cs.c           |    1 -
 drivers/net/pcmcia/3c589_cs.c           |    1 -
 drivers/net/pcmcia/axnet_cs.c           |    5 -----
 drivers/net/pcmcia/com20020_cs.c        |    1 -
 drivers/net/pcmcia/fmvj18x_cs.c         |    8 +-------
 drivers/net/pcmcia/ibmtr_cs.c           |    1 -
 drivers/net/pcmcia/nmclan_cs.c          |    1 -
 drivers/net/pcmcia/pcnet_cs.c           |    5 -----
 drivers/net/pcmcia/smc91c92_cs.c        |    1 -
 drivers/net/pcmcia/xirc2ps_cs.c         |    1 -
 drivers/net/wireless/airo_cs.c          |   19 ++++++-------------
 drivers/net/wireless/atmel_cs.c         |   10 ++--------
 drivers/net/wireless/hostap/hostap_cs.c |   19 +++++++------------
 drivers/net/wireless/netwave_cs.c       |    1 -
 drivers/net/wireless/orinoco_cs.c       |   20 +++++++-------------
 drivers/net/wireless/ray_cs.c           |    1 -
 drivers/net/wireless/spectrum_cs.c      |   20 +++++++-------------
 drivers/net/wireless/wavelan_cs.c       |    1 -
 drivers/net/wireless/wl3501_cs.c        |    1 -
 drivers/parport/parport_cs.c            |    5 -----
 drivers/pcmcia/pcmcia_resource.c        |    6 +-----
 drivers/scsi/pcmcia/aha152x_stub.c      |    1 -
 drivers/scsi/pcmcia/fdomain_stub.c      |    1 -
 drivers/scsi/pcmcia/nsp_cs.c            |   15 ++++++---------
 drivers/scsi/pcmcia/qlogic_stub.c       |    1 -
 drivers/scsi/pcmcia/sym53c500_cs.c      |    1 -
 drivers/serial/serial_cs.c              |   12 +-----------
 drivers/telephony/ixj_pcmcia.c          |    3 ---
 drivers/usb/host/sl811_cs.c             |   15 ++++++---------
 include/pcmcia/cs.h                     |    2 +-
 sound/pcmcia/pdaudiocf/pdaudiocf.c      |    4 ----
 sound/pcmcia/vx/vxpocket.c              |    1 -
 46 files changed, 63 insertions(+), 214 deletions(-)

Full patch at:
http://kernel.org/git/?p=linux/kernel/git/brodo/pcmcia-2.6.git;a=commit;h=1d6a89afc818e87bfe2f4edb4ab06cb4b9056df2

024cf19aa8f89090bccda81b78022c2da869c57d
diff --git a/drivers/bluetooth/bluecard_cs.c b/drivers/bluetooth/bluecard_cs.c
index bb833b2..8e23f9a 100644
--- a/drivers/bluetooth/bluecard_cs.c
+++ b/drivers/bluetooth/bluecard_cs.c
@@ -878,7 +878,6 @@ static int bluecard_attach(struct pcmcia
 	link->irq.Instance = info;
 
 	link->conf.Attributes = CONF_ENABLE_IRQ;
-	link->conf.Vcc = 50;
 	link->conf.IntType = INT_MEMORY_AND_IO;
 
 	link->handle = p_dev;
@@ -925,7 +924,6 @@ static void bluecard_config(dev_link_t *
 	tuple_t tuple;
 	u_short buf[256];
 	cisparse_t parse;
-	config_info_t config;
 	int i, n, last_ret, last_fn;
 
 	tuple.TupleData = (cisdata_t *)buf;
@@ -945,8 +943,6 @@ static void bluecard_config(dev_link_t *
 
 	/* Configure card */
 	link->state |= DEV_CONFIG;
-	i = pcmcia_get_configuration_info(handle, &config);
-	link->conf.Vcc = config.Vcc;
 
 	link->conf.ConfigIndex = 0x20;
 	link->io.NumPorts1 = 64;
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c
index 16504f8..17e2fbf 100644
--- a/drivers/pcmcia/pcmcia_resource.c
+++ b/drivers/pcmcia/pcmcia_resource.c
@@ -618,11 +618,7 @@ int pcmcia_request_configuration(struct 
 		return CS_CONFIGURATION_LOCKED;
 
 	/* Do power control.  We don't allow changes in Vcc. */
-	if (s->socket.Vcc != req->Vcc)
-		return CS_BAD_VCC;
-	if (req->Vpp1 != req->Vpp2)
-		return CS_BAD_VPP;
-	s->socket.Vpp = req->Vpp1;
+	s->socket.Vpp = req->Vpp;
 	if (s->ops->set_socket(s, &s->socket))
 		return CS_BAD_VPP;
 
diff --git a/include/pcmcia/cs.h b/include/pcmcia/cs.h
index 087b3bc..e0835d6 100644
--- a/include/pcmcia/cs.h
+++ b/include/pcmcia/cs.h
@@ -125,7 +125,7 @@ typedef struct modconf_t {
 /* For RequestConfiguration */
 typedef struct config_req_t {
     u_int	Attributes;
-    u_int	Vcc, Vpp1, Vpp2;
+    u_int	Vpp; /* both Vpp1 and Vpp2 */
     u_int	IntType;
     u_int	ConfigBase;
     u_char	Status, Pin, Copy, ExtStatus;
-- 
1.1.2



More information about the linux-pcmcia mailing list