From 84e2d34004dcd0c90d1af43a143511b334f11a4d Mon Sep 17 00:00:00 2001 From: Dominik Brodowski Date: Tue, 29 Jul 2008 08:38:55 +0200 Subject: pcmcia: use pcmcia_loop_config in misc pcmcia drivers Use the config loop helper in misc pcmcia drivers. CC: Harald Welte CC: CC: Russell King CC: Ed Okerson CC: linux-serial@vger.kernel.org CC: boti@rocketmail.com CC: linux-usb@vger.kernel.org Signed-off-by: Dominik Brodowski --- drivers/char/pcmcia/cm4000_cs.c | 73 +++++++++++++-------------------------- drivers/char/pcmcia/cm4040_cs.c | 76 ++++++++++++++++------------------------- 2 files changed, 54 insertions(+), 95 deletions(-) (limited to 'drivers/char/pcmcia') diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c index f070ae7bd91a..47adec480bd1 100644 --- a/drivers/char/pcmcia/cm4000_cs.c +++ b/drivers/char/pcmcia/cm4000_cs.c @@ -1759,65 +1759,40 @@ static void cmm_cm4000_release(struct pcmcia_device * link) /*==== Interface to PCMCIA Layer =======================================*/ +static int cm4000_config_check(struct pcmcia_device *p_dev, + cistpl_cftable_entry_t *cfg, + void *priv_data) +{ + p_dev->conf.ConfigIndex = cfg->index; + + if (!cfg->io.nwin) + return -ENODEV; + + /* Get the IOaddr */ + p_dev->io.BasePort1 = cfg->io.win[0].base; + p_dev->io.NumPorts1 = cfg->io.win[0].len; + p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; + if (!(cfg->io.flags & CISTPL_IO_8BIT)) + p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_16; + if (!(cfg->io.flags & CISTPL_IO_16BIT)) + p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_8; + p_dev->io.IOAddrLines = cfg->io.flags & CISTPL_IO_LINES_MASK; + + return pcmcia_request_io(p_dev, &p_dev->io); +} + static int cm4000_config(struct pcmcia_device * link, int devno) { struct cm4000_dev *dev; - tuple_t tuple; - cisparse_t parse; - u_char buf[64]; - int fail_fn, fail_rc; - int rc; /* read the config-tuples */ - tuple.Attributes = 0; - tuple.TupleData = buf; - tuple.TupleDataMax = sizeof(buf); - tuple.TupleOffset = 0; - - link->io.BasePort2 = 0; - link->io.NumPorts2 = 0; - link->io.Attributes2 = 0; - tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY; - for (rc = pcmcia_get_first_tuple(link, &tuple); - rc == CS_SUCCESS; rc = pcmcia_get_next_tuple(link, &tuple)) { - - rc = pcmcia_get_tuple_data(link, &tuple); - if (rc != CS_SUCCESS) - continue; - rc = pcmcia_parse_tuple(link, &tuple, &parse); - if (rc != CS_SUCCESS) - continue; - - link->conf.ConfigIndex = parse.cftable_entry.index; - - if (!parse.cftable_entry.io.nwin) - continue; - - /* Get the IOaddr */ - link->io.BasePort1 = parse.cftable_entry.io.win[0].base; - link->io.NumPorts1 = parse.cftable_entry.io.win[0].len; - link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; - if (!(parse.cftable_entry.io.flags & CISTPL_IO_8BIT)) - link->io.Attributes1 = IO_DATA_PATH_WIDTH_16; - if (!(parse.cftable_entry.io.flags & CISTPL_IO_16BIT)) - link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; - link->io.IOAddrLines = parse.cftable_entry.io.flags - & CISTPL_IO_LINES_MASK; - - rc = pcmcia_request_io(link, &link->io); - if (rc == CS_SUCCESS) - break; /* we are done */ - } - if (rc != CS_SUCCESS) + if (pcmcia_loop_config(link, cm4000_config_check, NULL)) goto cs_release; link->conf.IntType = 00000002; - if ((fail_rc = - pcmcia_request_configuration(link, &link->conf)) != CS_SUCCESS) { - fail_fn = RequestConfiguration; + if (pcmcia_request_configuration(link, &link->conf)) goto cs_release; - } dev = link->priv; sprintf(dev->node.dev_name, DEVICE_NAME "%d", devno); diff --git a/drivers/char/pcmcia/cm4040_cs.c b/drivers/char/pcmcia/cm4040_cs.c index 0b5934bef7a4..e0f5d8c9b266 100644 --- a/drivers/char/pcmcia/cm4040_cs.c +++ b/drivers/char/pcmcia/cm4040_cs.c @@ -526,65 +526,49 @@ static void cm4040_reader_release(struct pcmcia_device *link) return; } -static int reader_config(struct pcmcia_device *link, int devno) +static int cm4040_config_check(struct pcmcia_device *p_dev, + cistpl_cftable_entry_t *cfg, + void *priv_data) { - struct reader_dev *dev; - tuple_t tuple; - cisparse_t parse; - u_char buf[64]; - int fail_fn, fail_rc; int rc; + p_dev->conf.ConfigIndex = cfg->index; + + if (!cfg->io.nwin) + return -ENODEV; - tuple.Attributes = 0; - tuple.TupleData = buf; - tuple.TupleDataMax = sizeof(buf); - tuple.TupleOffset = 0; + /* Get the IOaddr */ + p_dev->io.BasePort1 = cfg->io.win[0].base; + p_dev->io.NumPorts1 = cfg->io.win[0].len; + p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; + if (!(cfg->io.flags & CISTPL_IO_8BIT)) + p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_16; + if (!(cfg->io.flags & CISTPL_IO_16BIT)) + p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_8; + p_dev->io.IOAddrLines = cfg->io.flags & CISTPL_IO_LINES_MASK; + + rc = pcmcia_request_io(p_dev, &p_dev->io); + dev_printk(KERN_INFO, &handle_to_dev(p_dev), + "pcmcia_request_io returned 0x%x\n", rc); + return rc; +} + + +static int reader_config(struct pcmcia_device *link, int devno) +{ + struct reader_dev *dev; + int fail_rc; link->io.BasePort2 = 0; link->io.NumPorts2 = 0; link->io.Attributes2 = 0; - tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY; - for (rc = pcmcia_get_first_tuple(link, &tuple); - rc == CS_SUCCESS; - rc = pcmcia_get_next_tuple(link, &tuple)) { - rc = pcmcia_get_tuple_data(link, &tuple); - if (rc != CS_SUCCESS) - continue; - rc = pcmcia_parse_tuple(link, &tuple, &parse); - if (rc != CS_SUCCESS) - continue; - - link->conf.ConfigIndex = parse.cftable_entry.index; - - if (!parse.cftable_entry.io.nwin) - continue; - - link->io.BasePort1 = parse.cftable_entry.io.win[0].base; - link->io.NumPorts1 = parse.cftable_entry.io.win[0].len; - link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; - if (!(parse.cftable_entry.io.flags & CISTPL_IO_8BIT)) - link->io.Attributes1 = IO_DATA_PATH_WIDTH_16; - if (!(parse.cftable_entry.io.flags & CISTPL_IO_16BIT)) - link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; - link->io.IOAddrLines = parse.cftable_entry.io.flags - & CISTPL_IO_LINES_MASK; - rc = pcmcia_request_io(link, &link->io); - - dev_printk(KERN_INFO, &handle_to_dev(link), "foo"); - if (rc == CS_SUCCESS) - break; - else - dev_printk(KERN_INFO, &handle_to_dev(link), - "pcmcia_request_io failed 0x%x\n", rc); - } - if (rc != CS_SUCCESS) + + if (pcmcia_loop_config(link, cm4040_config_check, NULL)) goto cs_release; link->conf.IntType = 00000002; if ((fail_rc = pcmcia_request_configuration(link,&link->conf)) !=CS_SUCCESS) { - fail_fn = RequestConfiguration; dev_printk(KERN_INFO, &handle_to_dev(link), "pcmcia_request_configuration failed 0x%x\n", fail_rc); -- cgit v1.2.2 From 498ac1899b62626bf6879a251d75c22ec564c559 Mon Sep 17 00:00:00 2001 From: Dominik Brodowski Date: Sat, 2 Aug 2008 14:59:13 +0200 Subject: pcmcia: pcmcia_config_loop() ConfigIndex unification Almost all drivers set p_dev->conf.ConfigIndex to cfg->index in the pcmcia_config_loop() callback function. Therefore, factor it out. Signed-off-by: Dominik Brodowski --- drivers/char/pcmcia/cm4000_cs.c | 2 -- drivers/char/pcmcia/cm4040_cs.c | 2 -- 2 files changed, 4 deletions(-) (limited to 'drivers/char/pcmcia') diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c index 47adec480bd1..7eafd2f4dbb9 100644 --- a/drivers/char/pcmcia/cm4000_cs.c +++ b/drivers/char/pcmcia/cm4000_cs.c @@ -1763,8 +1763,6 @@ static int cm4000_config_check(struct pcmcia_device *p_dev, cistpl_cftable_entry_t *cfg, void *priv_data) { - p_dev->conf.ConfigIndex = cfg->index; - if (!cfg->io.nwin) return -ENODEV; diff --git a/drivers/char/pcmcia/cm4040_cs.c b/drivers/char/pcmcia/cm4040_cs.c index e0f5d8c9b266..71ca8c474c89 100644 --- a/drivers/char/pcmcia/cm4040_cs.c +++ b/drivers/char/pcmcia/cm4040_cs.c @@ -531,8 +531,6 @@ static int cm4040_config_check(struct pcmcia_device *p_dev, void *priv_data) { int rc; - p_dev->conf.ConfigIndex = cfg->index; - if (!cfg->io.nwin) return -ENODEV; -- cgit v1.2.2 From 8e2fc39ddea7fe8c6798837da282db88a09af793 Mon Sep 17 00:00:00 2001 From: Dominik Brodowski Date: Sat, 2 Aug 2008 15:30:31 +0200 Subject: 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 --- drivers/char/pcmcia/cm4000_cs.c | 1 + drivers/char/pcmcia/cm4040_cs.c | 1 + 2 files changed, 2 insertions(+) (limited to 'drivers/char/pcmcia') diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c index 7eafd2f4dbb9..7785fbb4c0f6 100644 --- a/drivers/char/pcmcia/cm4000_cs.c +++ b/drivers/char/pcmcia/cm4000_cs.c @@ -1761,6 +1761,7 @@ static void cmm_cm4000_release(struct pcmcia_device * link) static int cm4000_config_check(struct pcmcia_device *p_dev, cistpl_cftable_entry_t *cfg, + cistpl_cftable_entry_t *dflt, void *priv_data) { if (!cfg->io.nwin) diff --git a/drivers/char/pcmcia/cm4040_cs.c b/drivers/char/pcmcia/cm4040_cs.c index 71ca8c474c89..468ddef916b3 100644 --- a/drivers/char/pcmcia/cm4040_cs.c +++ b/drivers/char/pcmcia/cm4040_cs.c @@ -528,6 +528,7 @@ static void cm4040_reader_release(struct pcmcia_device *link) static int cm4040_config_check(struct pcmcia_device *p_dev, cistpl_cftable_entry_t *cfg, + cistpl_cftable_entry_t *dflt, void *priv_data) { int rc; -- cgit v1.2.2 From ad913c11928f51abb6174f165db8d8d205b22e21 Mon Sep 17 00:00:00 2001 From: Dominik Brodowski Date: Sat, 2 Aug 2008 16:12:00 +0200 Subject: pcmcia: pcmcia_config_loop() improvement by passing vcc By passing the current Vcc setting to the pcmcia_config_loop callback function, we can remove pcmcia_get_configuration_info() calls from many drivers. Signed-off-by: Dominik Brodowski --- drivers/char/pcmcia/cm4000_cs.c | 1 + drivers/char/pcmcia/cm4040_cs.c | 1 + 2 files changed, 2 insertions(+) (limited to 'drivers/char/pcmcia') diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c index 7785fbb4c0f6..1c5bf99895ed 100644 --- a/drivers/char/pcmcia/cm4000_cs.c +++ b/drivers/char/pcmcia/cm4000_cs.c @@ -1762,6 +1762,7 @@ static void cmm_cm4000_release(struct pcmcia_device * link) static int cm4000_config_check(struct pcmcia_device *p_dev, cistpl_cftable_entry_t *cfg, cistpl_cftable_entry_t *dflt, + unsigned int vcc, void *priv_data) { if (!cfg->io.nwin) diff --git a/drivers/char/pcmcia/cm4040_cs.c b/drivers/char/pcmcia/cm4040_cs.c index 468ddef916b3..e047bac56f0e 100644 --- a/drivers/char/pcmcia/cm4040_cs.c +++ b/drivers/char/pcmcia/cm4040_cs.c @@ -529,6 +529,7 @@ static void cm4040_reader_release(struct pcmcia_device *link) static int cm4040_config_check(struct pcmcia_device *p_dev, cistpl_cftable_entry_t *cfg, cistpl_cftable_entry_t *dflt, + unsigned int vcc, void *priv_data) { int rc; -- cgit v1.2.2 From ef313e36d8896a42fc567a83a5d4b86821634e8d Mon Sep 17 00:00:00 2001 From: Dominik Brodowski Date: Sat, 2 Aug 2008 16:25:26 +0200 Subject: pcmcia: remove remaining in-kernel pcmcia_get_configuration_info() users Remove the three remaining pcmcia_get_configuration_info() users: - pcmciamtd is marked broken anyway. - serial_cs.c can access the relevant structs directly - ipwireless didn't use the output CC: linux-serial@vger.kernel.org CC: Russell King Acked-by: David Sterba Signed-off-by: Dominik Brodowski --- drivers/char/pcmcia/ipwireless/main.c | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'drivers/char/pcmcia') diff --git a/drivers/char/pcmcia/ipwireless/main.c b/drivers/char/pcmcia/ipwireless/main.c index 5eca7a99afe6..1f520e544d45 100644 --- a/drivers/char/pcmcia/ipwireless/main.c +++ b/drivers/char/pcmcia/ipwireless/main.c @@ -83,7 +83,6 @@ static int config_ipwireless(struct ipw_dev *ipw) { struct pcmcia_device *link = ipw->link; int ret; - config_info_t conf; tuple_t tuple; unsigned short buf[64]; cisparse_t parse; @@ -297,15 +296,6 @@ static int config_ipwireless(struct ipw_dev *ipw) goto exit3; } - /* Look up current Vcc */ - - ret = pcmcia_get_configuration_info(link, &conf); - - if (ret != CS_SUCCESS) { - cs_error(link, GetConfigurationInfo, ret); - goto exit4; - } - printk(KERN_INFO IPWIRELESS_PCCARD_NAME ": Card type %s\n", ipw->is_v2_card ? "V2/V3" : "V1"); printk(KERN_INFO IPWIRELESS_PCCARD_NAME -- cgit v1.2.2 From 4c89e88bfde6a3c179790e21004f24e09a058290 Mon Sep 17 00:00:00 2001 From: Dominik Brodowski Date: Sun, 3 Aug 2008 10:07:45 +0200 Subject: pcmcia: deprecate CS_SUCCESS Instead of using own error or success codes, the PCMCIA code should rely on the generic return values. Therefore, replace all occurrences of CS_SUCCESS with 0. CC: netdev@vger.kernel.org Signed-off-by: Dominik Brodowski --- drivers/char/pcmcia/cm4040_cs.c | 4 ++-- drivers/char/pcmcia/ipwireless/main.c | 36 +++++++++++++++++------------------ 2 files changed, 20 insertions(+), 20 deletions(-) (limited to 'drivers/char/pcmcia') diff --git a/drivers/char/pcmcia/cm4040_cs.c b/drivers/char/pcmcia/cm4040_cs.c index e047bac56f0e..2d7c906435b7 100644 --- a/drivers/char/pcmcia/cm4040_cs.c +++ b/drivers/char/pcmcia/cm4040_cs.c @@ -567,8 +567,8 @@ static int reader_config(struct pcmcia_device *link, int devno) link->conf.IntType = 00000002; - if ((fail_rc = pcmcia_request_configuration(link,&link->conf)) - !=CS_SUCCESS) { + fail_rc = pcmcia_request_configuration(link, &link->conf); + if (fail_rc != 0) { dev_printk(KERN_INFO, &handle_to_dev(link), "pcmcia_request_configuration failed 0x%x\n", fail_rc); diff --git a/drivers/char/pcmcia/ipwireless/main.c b/drivers/char/pcmcia/ipwireless/main.c index 1f520e544d45..24ffe0324e53 100644 --- a/drivers/char/pcmcia/ipwireless/main.c +++ b/drivers/char/pcmcia/ipwireless/main.c @@ -67,7 +67,7 @@ static void signalled_reboot_work(struct work_struct *work_reboot) struct pcmcia_device *link = ipw->link; int ret = pccard_reset_card(link->socket); - if (ret != CS_SUCCESS) + if (ret != 0) cs_error(link, ResetCard, ret); } @@ -104,7 +104,7 @@ static int config_ipwireless(struct ipw_dev *ipw) while (ret == 0) { ret = pcmcia_get_tuple_data(link, &tuple); - if (ret != CS_SUCCESS) { + if (ret != 0) { cs_error(link, GetTupleData, ret); goto exit0; } @@ -115,21 +115,21 @@ static int config_ipwireless(struct ipw_dev *ipw) ret = pcmcia_get_first_tuple(link, &tuple); - if (ret != CS_SUCCESS) { + if (ret != 0) { cs_error(link, GetFirstTuple, ret); goto exit0; } ret = pcmcia_get_tuple_data(link, &tuple); - if (ret != CS_SUCCESS) { + if (ret != 0) { cs_error(link, GetTupleData, ret); goto exit0; } ret = pcmcia_parse_tuple(link, &tuple, &parse); - if (ret != CS_SUCCESS) { + if (ret != 0) { cs_error(link, ParseTuple, ret); goto exit0; } @@ -151,21 +151,21 @@ static int config_ipwireless(struct ipw_dev *ipw) ret = pcmcia_get_first_tuple(link, &tuple); - if (ret != CS_SUCCESS) { + if (ret != 0) { cs_error(link, GetFirstTuple, ret); goto exit0; } ret = pcmcia_get_tuple_data(link, &tuple); - if (ret != CS_SUCCESS) { + if (ret != 0) { cs_error(link, GetTupleData, ret); goto exit0; } ret = pcmcia_parse_tuple(link, &tuple, &parse); - if (ret != CS_SUCCESS) { + if (ret != 0) { cs_error(link, GetTupleData, ret); goto exit0; } @@ -180,7 +180,7 @@ static int config_ipwireless(struct ipw_dev *ipw) ret = pcmcia_request_io(link, &link->io); - if (ret != CS_SUCCESS) { + if (ret != 0) { cs_error(link, RequestIO, ret); goto exit0; } @@ -194,21 +194,21 @@ static int config_ipwireless(struct ipw_dev *ipw) ret = pcmcia_get_first_tuple(link, &tuple); - if (ret != CS_SUCCESS) { + if (ret != 0) { cs_error(link, GetFirstTuple, ret); goto exit1; } ret = pcmcia_get_tuple_data(link, &tuple); - if (ret != CS_SUCCESS) { + if (ret != 0) { cs_error(link, GetTupleData, ret); goto exit1; } ret = pcmcia_parse_tuple(link, &tuple, &parse); - if (ret != CS_SUCCESS) { + if (ret != 0) { cs_error(link, ParseTuple, ret); goto exit1; } @@ -226,7 +226,7 @@ static int config_ipwireless(struct ipw_dev *ipw) ret = pcmcia_request_window(&link, &ipw->request_common_memory, &ipw->handle_common_memory); - if (ret != CS_SUCCESS) { + if (ret != 0) { cs_error(link, RequestWindow, ret); goto exit1; } @@ -238,7 +238,7 @@ static int config_ipwireless(struct ipw_dev *ipw) ret = pcmcia_map_mem_page(ipw->handle_common_memory, &memreq_common_memory); - if (ret != CS_SUCCESS) { + if (ret != 0) { cs_error(link, MapMemPage, ret); goto exit1; } @@ -260,7 +260,7 @@ static int config_ipwireless(struct ipw_dev *ipw) ret = pcmcia_request_window(&link, &ipw->request_attr_memory, &ipw->handle_attr_memory); - if (ret != CS_SUCCESS) { + if (ret != 0) { cs_error(link, RequestWindow, ret); goto exit2; } @@ -271,7 +271,7 @@ static int config_ipwireless(struct ipw_dev *ipw) ret = pcmcia_map_mem_page(ipw->handle_attr_memory, &memreq_attr_memory); - if (ret != CS_SUCCESS) { + if (ret != 0) { cs_error(link, MapMemPage, ret); goto exit2; } @@ -291,7 +291,7 @@ static int config_ipwireless(struct ipw_dev *ipw) ret = pcmcia_request_irq(link, &link->irq); - if (ret != CS_SUCCESS) { + if (ret != 0) { cs_error(link, RequestIRQ, ret); goto exit3; } @@ -331,7 +331,7 @@ static int config_ipwireless(struct ipw_dev *ipw) */ ret = pcmcia_request_configuration(link, &link->conf); - if (ret != CS_SUCCESS) { + if (ret != 0) { cs_error(link, RequestConfiguration, ret); goto exit4; } -- cgit v1.2.2 From 994917f8b718f1cd7114317cc3cbf04fe46c1841 Mon Sep 17 00:00:00 2001 From: Dominik Brodowski Date: Sun, 31 Aug 2008 15:20:26 +0200 Subject: pcmcia: card services header cleanup 16-bit PCMCIA device handling function definitions are moved to ds.h, internal definitions to cs_internal.h. Signed-off-by: Dominik Brodowski --- drivers/char/pcmcia/ipwireless/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/char/pcmcia') diff --git a/drivers/char/pcmcia/ipwireless/main.c b/drivers/char/pcmcia/ipwireless/main.c index 24ffe0324e53..dcf2b59ca8c5 100644 --- a/drivers/char/pcmcia/ipwireless/main.c +++ b/drivers/char/pcmcia/ipwireless/main.c @@ -65,7 +65,7 @@ static void signalled_reboot_work(struct work_struct *work_reboot) struct ipw_dev *ipw = container_of(work_reboot, struct ipw_dev, work_reboot); struct pcmcia_device *link = ipw->link; - int ret = pccard_reset_card(link->socket); + int ret = pcmcia_reset_card(link->socket); if (ret != 0) cs_error(link, ResetCard, ret); -- cgit v1.2.2 From 2f3061eb1086f98990d6495b8c63a1b83f2f59aa Mon Sep 17 00:00:00 2001 From: Dominik Brodowski Date: Sun, 31 Aug 2008 15:50:33 +0200 Subject: pcmcia: remove unused argument to pcmcia_parse_tuple() Since we're just parsing the tuple being passed to this function, we don't need any device-specific information. Also, remove the call to pcmcia_validate_cis() from pcmciamtd.c, since it is already called by the PCMCIA core. Signed-off-by: Dominik Brodowski --- drivers/char/pcmcia/ipwireless/main.c | 6 +++--- drivers/char/pcmcia/synclink_cs.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/char/pcmcia') diff --git a/drivers/char/pcmcia/ipwireless/main.c b/drivers/char/pcmcia/ipwireless/main.c index dcf2b59ca8c5..5216fce0c62d 100644 --- a/drivers/char/pcmcia/ipwireless/main.c +++ b/drivers/char/pcmcia/ipwireless/main.c @@ -127,7 +127,7 @@ static int config_ipwireless(struct ipw_dev *ipw) goto exit0; } - ret = pcmcia_parse_tuple(link, &tuple, &parse); + ret = pcmcia_parse_tuple(&tuple, &parse); if (ret != 0) { cs_error(link, ParseTuple, ret); @@ -163,7 +163,7 @@ static int config_ipwireless(struct ipw_dev *ipw) goto exit0; } - ret = pcmcia_parse_tuple(link, &tuple, &parse); + ret = pcmcia_parse_tuple(&tuple, &parse); if (ret != 0) { cs_error(link, GetTupleData, ret); @@ -206,7 +206,7 @@ static int config_ipwireless(struct ipw_dev *ipw) goto exit1; } - ret = pcmcia_parse_tuple(link, &tuple, &parse); + ret = pcmcia_parse_tuple(&tuple, &parse); if (ret != 0) { cs_error(link, ParseTuple, ret); diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c index d1fceabe3aef..05bf9c55ecc2 100644 --- a/drivers/char/pcmcia/synclink_cs.c +++ b/drivers/char/pcmcia/synclink_cs.c @@ -604,7 +604,7 @@ static int mgslpc_config(struct pcmcia_device *link) cfg = &(parse.cftable_entry); CS_CHECK(GetTupleData, pcmcia_get_tuple_data(link, &tuple)); - CS_CHECK(ParseTuple, pcmcia_parse_tuple(link, &tuple, &parse)); + CS_CHECK(ParseTuple, pcmcia_parse_tuple(&tuple, &parse)); if (cfg->flags & CISTPL_CFTABLE_DEFAULT) dflt = *cfg; if (cfg->index == 0) -- cgit v1.2.2