diff options
-rw-r--r-- | drivers/char/pcmcia/ipwireless/main.c | 6 | ||||
-rw-r--r-- | drivers/char/pcmcia/synclink_cs.c | 2 | ||||
-rw-r--r-- | drivers/mtd/maps/pcmciamtd.c | 7 | ||||
-rw-r--r-- | drivers/net/pcmcia/fmvj18x_cs.c | 2 | ||||
-rw-r--r-- | drivers/net/pcmcia/smc91c92_cs.c | 4 | ||||
-rw-r--r-- | drivers/net/pcmcia/xirc2ps_cs.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/b43/pcmcia.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_cs.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/if_cs.c | 2 | ||||
-rw-r--r-- | drivers/pcmcia/cistpl.c | 6 | ||||
-rw-r--r-- | drivers/pcmcia/cs_internal.h | 2 | ||||
-rw-r--r-- | drivers/pcmcia/pcmcia_ioctl.c | 2 | ||||
-rw-r--r-- | drivers/pcmcia/pcmcia_resource.c | 2 | ||||
-rw-r--r-- | drivers/serial/serial_cs.c | 2 | ||||
-rw-r--r-- | include/pcmcia/cistpl.h | 11 |
15 files changed, 23 insertions, 33 deletions
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) | |||
127 | goto exit0; | 127 | goto exit0; |
128 | } | 128 | } |
129 | 129 | ||
130 | ret = pcmcia_parse_tuple(link, &tuple, &parse); | 130 | ret = pcmcia_parse_tuple(&tuple, &parse); |
131 | 131 | ||
132 | if (ret != 0) { | 132 | if (ret != 0) { |
133 | cs_error(link, ParseTuple, ret); | 133 | cs_error(link, ParseTuple, ret); |
@@ -163,7 +163,7 @@ static int config_ipwireless(struct ipw_dev *ipw) | |||
163 | goto exit0; | 163 | goto exit0; |
164 | } | 164 | } |
165 | 165 | ||
166 | ret = pcmcia_parse_tuple(link, &tuple, &parse); | 166 | ret = pcmcia_parse_tuple(&tuple, &parse); |
167 | 167 | ||
168 | if (ret != 0) { | 168 | if (ret != 0) { |
169 | cs_error(link, GetTupleData, ret); | 169 | cs_error(link, GetTupleData, ret); |
@@ -206,7 +206,7 @@ static int config_ipwireless(struct ipw_dev *ipw) | |||
206 | goto exit1; | 206 | goto exit1; |
207 | } | 207 | } |
208 | 208 | ||
209 | ret = pcmcia_parse_tuple(link, &tuple, &parse); | 209 | ret = pcmcia_parse_tuple(&tuple, &parse); |
210 | 210 | ||
211 | if (ret != 0) { | 211 | if (ret != 0) { |
212 | cs_error(link, ParseTuple, ret); | 212 | 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) | |||
604 | 604 | ||
605 | cfg = &(parse.cftable_entry); | 605 | cfg = &(parse.cftable_entry); |
606 | CS_CHECK(GetTupleData, pcmcia_get_tuple_data(link, &tuple)); | 606 | CS_CHECK(GetTupleData, pcmcia_get_tuple_data(link, &tuple)); |
607 | CS_CHECK(ParseTuple, pcmcia_parse_tuple(link, &tuple, &parse)); | 607 | CS_CHECK(ParseTuple, pcmcia_parse_tuple(&tuple, &parse)); |
608 | 608 | ||
609 | if (cfg->flags & CISTPL_CFTABLE_DEFAULT) dflt = *cfg; | 609 | if (cfg->flags & CISTPL_CFTABLE_DEFAULT) dflt = *cfg; |
610 | if (cfg->index == 0) | 610 | if (cfg->index == 0) |
diff --git a/drivers/mtd/maps/pcmciamtd.c b/drivers/mtd/maps/pcmciamtd.c index 27b3d96b7124..d600c2deff73 100644 --- a/drivers/mtd/maps/pcmciamtd.c +++ b/drivers/mtd/maps/pcmciamtd.c | |||
@@ -374,7 +374,7 @@ static void card_settings(struct pcmciamtd_dev *dev, struct pcmcia_device *link, | |||
374 | cs_error(link, GetTupleData, rc); | 374 | cs_error(link, GetTupleData, rc); |
375 | break; | 375 | break; |
376 | } | 376 | } |
377 | rc = pcmcia_parse_tuple(link, &tuple, &parse); | 377 | rc = pcmcia_parse_tuple(&tuple, &parse); |
378 | if (rc != 0) { | 378 | if (rc != 0) { |
379 | cs_error(link, ParseTuple, rc); | 379 | cs_error(link, ParseTuple, rc); |
380 | break; | 380 | break; |
@@ -498,11 +498,6 @@ static int pcmciamtd_config(struct pcmcia_device *link) | |||
498 | 498 | ||
499 | DEBUG(3, "link=0x%p", link); | 499 | DEBUG(3, "link=0x%p", link); |
500 | 500 | ||
501 | DEBUG(2, "Validating CIS"); | ||
502 | ret = pcmcia_validate_cis(link, NULL); | ||
503 | if (ret != 0) | ||
504 | cs_error(link, GetTupleData, ret); | ||
505 | |||
506 | card_settings(dev, link, &new_name); | 501 | card_settings(dev, link, &new_name); |
507 | 502 | ||
508 | dev->pcmcia_map.phys = NO_XIP; | 503 | dev->pcmcia_map.phys = NO_XIP; |
diff --git a/drivers/net/pcmcia/fmvj18x_cs.c b/drivers/net/pcmcia/fmvj18x_cs.c index 0ffd981502e1..69d916daa7bb 100644 --- a/drivers/net/pcmcia/fmvj18x_cs.c +++ b/drivers/net/pcmcia/fmvj18x_cs.c | |||
@@ -362,7 +362,7 @@ static int fmvj18x_config(struct pcmcia_device *link) | |||
362 | tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY; | 362 | tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY; |
363 | CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple)); | 363 | CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple)); |
364 | CS_CHECK(GetTupleData, pcmcia_get_tuple_data(link, &tuple)); | 364 | CS_CHECK(GetTupleData, pcmcia_get_tuple_data(link, &tuple)); |
365 | CS_CHECK(ParseTuple, pcmcia_parse_tuple(link, &tuple, &parse)); | 365 | CS_CHECK(ParseTuple, pcmcia_parse_tuple(&tuple, &parse)); |
366 | link->conf.ConfigIndex = parse.cftable_entry.index; | 366 | link->conf.ConfigIndex = parse.cftable_entry.index; |
367 | switch (link->manf_id) { | 367 | switch (link->manf_id) { |
368 | case MANFID_TDK: | 368 | case MANFID_TDK: |
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c index 918b4a3eca57..c74d6656d266 100644 --- a/drivers/net/pcmcia/smc91c92_cs.c +++ b/drivers/net/pcmcia/smc91c92_cs.c | |||
@@ -415,7 +415,7 @@ static int first_tuple(struct pcmcia_device *handle, tuple_t *tuple, | |||
415 | i = pcmcia_get_tuple_data(handle, tuple); | 415 | i = pcmcia_get_tuple_data(handle, tuple); |
416 | if (i != 0) | 416 | if (i != 0) |
417 | return i; | 417 | return i; |
418 | return pcmcia_parse_tuple(handle, tuple, parse); | 418 | return pcmcia_parse_tuple(tuple, parse); |
419 | } | 419 | } |
420 | 420 | ||
421 | static int next_tuple(struct pcmcia_device *handle, tuple_t *tuple, | 421 | static int next_tuple(struct pcmcia_device *handle, tuple_t *tuple, |
@@ -426,7 +426,7 @@ static int next_tuple(struct pcmcia_device *handle, tuple_t *tuple, | |||
426 | if ((i = pcmcia_get_next_tuple(handle, tuple)) != 0 || | 426 | if ((i = pcmcia_get_next_tuple(handle, tuple)) != 0 || |
427 | (i = pcmcia_get_tuple_data(handle, tuple)) != 0) | 427 | (i = pcmcia_get_tuple_data(handle, tuple)) != 0) |
428 | return i; | 428 | return i; |
429 | return pcmcia_parse_tuple(handle, tuple, parse); | 429 | return pcmcia_parse_tuple(tuple, parse); |
430 | } | 430 | } |
431 | 431 | ||
432 | /*====================================================================== | 432 | /*====================================================================== |
diff --git a/drivers/net/pcmcia/xirc2ps_cs.c b/drivers/net/pcmcia/xirc2ps_cs.c index d97e6e917c3c..8366bfc7d28c 100644 --- a/drivers/net/pcmcia/xirc2ps_cs.c +++ b/drivers/net/pcmcia/xirc2ps_cs.c | |||
@@ -377,7 +377,7 @@ first_tuple(struct pcmcia_device *handle, tuple_t *tuple, cisparse_t *parse) | |||
377 | 377 | ||
378 | if ((err = pcmcia_get_first_tuple(handle, tuple)) == 0 && | 378 | if ((err = pcmcia_get_first_tuple(handle, tuple)) == 0 && |
379 | (err = pcmcia_get_tuple_data(handle, tuple)) == 0) | 379 | (err = pcmcia_get_tuple_data(handle, tuple)) == 0) |
380 | err = pcmcia_parse_tuple(handle, tuple, parse); | 380 | err = pcmcia_parse_tuple(tuple, parse); |
381 | return err; | 381 | return err; |
382 | } | 382 | } |
383 | 383 | ||
@@ -388,7 +388,7 @@ next_tuple(struct pcmcia_device *handle, tuple_t *tuple, cisparse_t *parse) | |||
388 | 388 | ||
389 | if ((err = pcmcia_get_next_tuple(handle, tuple)) == 0 && | 389 | if ((err = pcmcia_get_next_tuple(handle, tuple)) == 0 && |
390 | (err = pcmcia_get_tuple_data(handle, tuple)) == 0) | 390 | (err = pcmcia_get_tuple_data(handle, tuple)) == 0) |
391 | err = pcmcia_parse_tuple(handle, tuple, parse); | 391 | err = pcmcia_parse_tuple(tuple, parse); |
392 | return err; | 392 | return err; |
393 | } | 393 | } |
394 | 394 | ||
diff --git a/drivers/net/wireless/b43/pcmcia.c b/drivers/net/wireless/b43/pcmcia.c index ab42fb6addf6..3cfc30307a27 100644 --- a/drivers/net/wireless/b43/pcmcia.c +++ b/drivers/net/wireless/b43/pcmcia.c | |||
@@ -87,7 +87,7 @@ static int __devinit b43_pcmcia_probe(struct pcmcia_device *dev) | |||
87 | res = pcmcia_get_tuple_data(dev, &tuple); | 87 | res = pcmcia_get_tuple_data(dev, &tuple); |
88 | if (res != 0) | 88 | if (res != 0) |
89 | goto err_kfree_ssb; | 89 | goto err_kfree_ssb; |
90 | res = pcmcia_parse_tuple(dev, &tuple, &parse); | 90 | res = pcmcia_parse_tuple(&tuple, &parse); |
91 | if (res != 0) | 91 | if (res != 0) |
92 | goto err_kfree_ssb; | 92 | goto err_kfree_ssb; |
93 | 93 | ||
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c index 2826e674a8e7..633740277352 100644 --- a/drivers/net/wireless/hostap/hostap_cs.c +++ b/drivers/net/wireless/hostap/hostap_cs.c | |||
@@ -305,7 +305,7 @@ static int sandisk_enable_wireless(struct net_device *dev) | |||
305 | tuple.DesiredTuple = CISTPL_LONGLINK_MFC; | 305 | tuple.DesiredTuple = CISTPL_LONGLINK_MFC; |
306 | if (pcmcia_get_first_tuple(hw_priv->link, &tuple) || | 306 | if (pcmcia_get_first_tuple(hw_priv->link, &tuple) || |
307 | pcmcia_get_tuple_data(hw_priv->link, &tuple) || | 307 | pcmcia_get_tuple_data(hw_priv->link, &tuple) || |
308 | pcmcia_parse_tuple(hw_priv->link, &tuple, parse) || | 308 | pcmcia_parse_tuple(&tuple, parse) || |
309 | parse->longlink_mfc.nfn < 2) { | 309 | parse->longlink_mfc.nfn < 2) { |
310 | /* No multi-function links found */ | 310 | /* No multi-function links found */ |
311 | ret = -ENODEV; | 311 | ret = -ENODEV; |
diff --git a/drivers/net/wireless/libertas/if_cs.c b/drivers/net/wireless/libertas/if_cs.c index 04d7a251e3f0..e2fe2d677324 100644 --- a/drivers/net/wireless/libertas/if_cs.c +++ b/drivers/net/wireless/libertas/if_cs.c | |||
@@ -798,7 +798,7 @@ static int if_cs_probe(struct pcmcia_device *p_dev) | |||
798 | tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY; | 798 | tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY; |
799 | if ((ret = pcmcia_get_first_tuple(p_dev, &tuple)) != 0 || | 799 | if ((ret = pcmcia_get_first_tuple(p_dev, &tuple)) != 0 || |
800 | (ret = pcmcia_get_tuple_data(p_dev, &tuple)) != 0 || | 800 | (ret = pcmcia_get_tuple_data(p_dev, &tuple)) != 0 || |
801 | (ret = pcmcia_parse_tuple(p_dev, &tuple, &parse)) != 0) | 801 | (ret = pcmcia_parse_tuple(&tuple, &parse)) != 0) |
802 | { | 802 | { |
803 | lbs_pr_err("error in pcmcia_get_first_tuple etc\n"); | 803 | lbs_pr_err("error in pcmcia_get_first_tuple etc\n"); |
804 | goto out1; | 804 | goto out1; |
diff --git a/drivers/pcmcia/cistpl.c b/drivers/pcmcia/cistpl.c index 772fc96d5ec3..dcce9f5d8465 100644 --- a/drivers/pcmcia/cistpl.c +++ b/drivers/pcmcia/cistpl.c | |||
@@ -1359,7 +1359,7 @@ static int parse_format(tuple_t *tuple, cistpl_format_t *fmt) | |||
1359 | 1359 | ||
1360 | /*====================================================================*/ | 1360 | /*====================================================================*/ |
1361 | 1361 | ||
1362 | int pccard_parse_tuple(tuple_t *tuple, cisparse_t *parse) | 1362 | int pcmcia_parse_tuple(tuple_t *tuple, cisparse_t *parse) |
1363 | { | 1363 | { |
1364 | int ret = 0; | 1364 | int ret = 0; |
1365 | 1365 | ||
@@ -1442,7 +1442,7 @@ int pccard_parse_tuple(tuple_t *tuple, cisparse_t *parse) | |||
1442 | __cs_dbg(0, "parse_tuple failed %d\n", ret); | 1442 | __cs_dbg(0, "parse_tuple failed %d\n", ret); |
1443 | return ret; | 1443 | return ret; |
1444 | } | 1444 | } |
1445 | EXPORT_SYMBOL(pccard_parse_tuple); | 1445 | EXPORT_SYMBOL(pcmcia_parse_tuple); |
1446 | 1446 | ||
1447 | /*====================================================================== | 1447 | /*====================================================================== |
1448 | 1448 | ||
@@ -1472,7 +1472,7 @@ int pccard_read_tuple(struct pcmcia_socket *s, unsigned int function, cisdata_t | |||
1472 | ret = pccard_get_tuple_data(s, &tuple); | 1472 | ret = pccard_get_tuple_data(s, &tuple); |
1473 | if (ret != 0) | 1473 | if (ret != 0) |
1474 | goto done; | 1474 | goto done; |
1475 | ret = pccard_parse_tuple(&tuple, parse); | 1475 | ret = pcmcia_parse_tuple(&tuple, parse); |
1476 | done: | 1476 | done: |
1477 | kfree(buf); | 1477 | kfree(buf); |
1478 | return ret; | 1478 | return ret; |
diff --git a/drivers/pcmcia/cs_internal.h b/drivers/pcmcia/cs_internal.h index d71eeee4992b..79615e6d540b 100644 --- a/drivers/pcmcia/cs_internal.h +++ b/drivers/pcmcia/cs_internal.h | |||
@@ -197,6 +197,8 @@ int pccard_read_tuple(struct pcmcia_socket *s, unsigned int function, | |||
197 | cisdata_t code, void *parse); | 197 | cisdata_t code, void *parse); |
198 | int pcmcia_replace_cis(struct pcmcia_socket *s, | 198 | int pcmcia_replace_cis(struct pcmcia_socket *s, |
199 | const u8 *data, const size_t len); | 199 | const u8 *data, const size_t len); |
200 | int pccard_validate_cis(struct pcmcia_socket *s, unsigned int function, | ||
201 | unsigned int *count); | ||
200 | 202 | ||
201 | /* rsrc_mgr.c */ | 203 | /* rsrc_mgr.c */ |
202 | int pcmcia_validate_mem(struct pcmcia_socket *s); | 204 | int pcmcia_validate_mem(struct pcmcia_socket *s); |
diff --git a/drivers/pcmcia/pcmcia_ioctl.c b/drivers/pcmcia/pcmcia_ioctl.c index 579ec9455706..1703b20cad5d 100644 --- a/drivers/pcmcia/pcmcia_ioctl.c +++ b/drivers/pcmcia/pcmcia_ioctl.c | |||
@@ -858,7 +858,7 @@ static int ds_ioctl(struct inode * inode, struct file * file, | |||
858 | break; | 858 | break; |
859 | case DS_PARSE_TUPLE: | 859 | case DS_PARSE_TUPLE: |
860 | buf->tuple.TupleData = buf->tuple_parse.data; | 860 | buf->tuple.TupleData = buf->tuple_parse.data; |
861 | ret = pccard_parse_tuple(&buf->tuple, &buf->tuple_parse.parse); | 861 | ret = pcmcia_parse_tuple(&buf->tuple, &buf->tuple_parse.parse); |
862 | break; | 862 | break; |
863 | case DS_RESET_CARD: | 863 | case DS_RESET_CARD: |
864 | ret = pcmcia_reset_card(s); | 864 | ret = pcmcia_reset_card(s); |
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c index 93a270e15cea..afea2b2558b5 100644 --- a/drivers/pcmcia/pcmcia_resource.c +++ b/drivers/pcmcia/pcmcia_resource.c | |||
@@ -937,7 +937,7 @@ int pcmcia_loop_config(struct pcmcia_device *p_dev, | |||
937 | if (pcmcia_get_tuple_data(p_dev, tuple)) | 937 | if (pcmcia_get_tuple_data(p_dev, tuple)) |
938 | goto next_entry; | 938 | goto next_entry; |
939 | 939 | ||
940 | if (pcmcia_parse_tuple(p_dev, tuple, &cfg_mem->parse)) | 940 | if (pcmcia_parse_tuple(tuple, &cfg_mem->parse)) |
941 | goto next_entry; | 941 | goto next_entry; |
942 | 942 | ||
943 | /* default values */ | 943 | /* default values */ |
diff --git a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c index dbb3bf3065fa..7546aa887fa7 100644 --- a/drivers/serial/serial_cs.c +++ b/drivers/serial/serial_cs.c | |||
@@ -436,7 +436,7 @@ first_tuple(struct pcmcia_device *handle, tuple_t * tuple, cisparse_t * parse) | |||
436 | i = pcmcia_get_tuple_data(handle, tuple); | 436 | i = pcmcia_get_tuple_data(handle, tuple); |
437 | if (i != 0) | 437 | if (i != 0) |
438 | return i; | 438 | return i; |
439 | return pcmcia_parse_tuple(handle, tuple, parse); | 439 | return pcmcia_parse_tuple(tuple, parse); |
440 | } | 440 | } |
441 | 441 | ||
442 | /*====================================================================*/ | 442 | /*====================================================================*/ |
diff --git a/include/pcmcia/cistpl.h b/include/pcmcia/cistpl.h index 7e8c2bcf11a7..353abe74be74 100644 --- a/include/pcmcia/cistpl.h +++ b/include/pcmcia/cistpl.h | |||
@@ -583,13 +583,12 @@ typedef struct cisinfo_t { | |||
583 | #ifdef __KERNEL__ | 583 | #ifdef __KERNEL__ |
584 | struct pcmcia_socket; | 584 | struct pcmcia_socket; |
585 | 585 | ||
586 | int pcmcia_parse_tuple(tuple_t *tuple, cisparse_t *parse); | ||
587 | |||
586 | /* don't use outside of PCMCIA core yet */ | 588 | /* don't use outside of PCMCIA core yet */ |
587 | int pccard_get_next_tuple(struct pcmcia_socket *s, unsigned int func, tuple_t *tuple); | 589 | int pccard_get_next_tuple(struct pcmcia_socket *s, unsigned int func, tuple_t *tuple); |
588 | int pccard_get_first_tuple(struct pcmcia_socket *s, unsigned int function, tuple_t *tuple); | 590 | int pccard_get_first_tuple(struct pcmcia_socket *s, unsigned int function, tuple_t *tuple); |
589 | int pccard_get_tuple_data(struct pcmcia_socket *s, tuple_t *tuple); | 591 | int pccard_get_tuple_data(struct pcmcia_socket *s, tuple_t *tuple); |
590 | int pccard_parse_tuple(tuple_t *tuple, cisparse_t *parse); | ||
591 | |||
592 | int pccard_validate_cis(struct pcmcia_socket *s, unsigned int function, unsigned int *count); | ||
593 | 592 | ||
594 | /* ... but use these wrappers instead */ | 593 | /* ... but use these wrappers instead */ |
595 | #define pcmcia_get_first_tuple(p_dev, tuple) \ | 594 | #define pcmcia_get_first_tuple(p_dev, tuple) \ |
@@ -601,12 +600,6 @@ int pccard_validate_cis(struct pcmcia_socket *s, unsigned int function, unsigned | |||
601 | #define pcmcia_get_tuple_data(p_dev, tuple) \ | 600 | #define pcmcia_get_tuple_data(p_dev, tuple) \ |
602 | pccard_get_tuple_data(p_dev->socket, tuple) | 601 | pccard_get_tuple_data(p_dev->socket, tuple) |
603 | 602 | ||
604 | #define pcmcia_parse_tuple(p_dev, tuple, parse) \ | ||
605 | pccard_parse_tuple(tuple, parse) | ||
606 | |||
607 | #define pcmcia_validate_cis(p_dev, info) \ | ||
608 | pccard_validate_cis(p_dev->socket, p_dev->func, info) | ||
609 | |||
610 | int pcmcia_loop_config(struct pcmcia_device *p_dev, | 603 | int pcmcia_loop_config(struct pcmcia_device *p_dev, |
611 | int (*conf_check) (struct pcmcia_device *p_dev, | 604 | int (*conf_check) (struct pcmcia_device *p_dev, |
612 | cistpl_cftable_entry_t *cf, | 605 | cistpl_cftable_entry_t *cf, |