diff options
Diffstat (limited to 'drivers/char/pcmcia/cm4040_cs.c')
-rw-r--r-- | drivers/char/pcmcia/cm4040_cs.c | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/drivers/char/pcmcia/cm4040_cs.c b/drivers/char/pcmcia/cm4040_cs.c index 55cf4be42976..9b1ff7e8f896 100644 --- a/drivers/char/pcmcia/cm4040_cs.c +++ b/drivers/char/pcmcia/cm4040_cs.c | |||
@@ -523,29 +523,11 @@ static int reader_config(struct pcmcia_device *link, int devno) | |||
523 | int fail_fn, fail_rc; | 523 | int fail_fn, fail_rc; |
524 | int rc; | 524 | int rc; |
525 | 525 | ||
526 | tuple.DesiredTuple = CISTPL_CONFIG; | ||
527 | tuple.Attributes = 0; | 526 | tuple.Attributes = 0; |
528 | tuple.TupleData = buf; | 527 | tuple.TupleData = buf; |
529 | tuple.TupleDataMax = sizeof(buf); | 528 | tuple.TupleDataMax = sizeof(buf); |
530 | tuple.TupleOffset = 0; | 529 | tuple.TupleOffset = 0; |
531 | 530 | ||
532 | if ((fail_rc = pcmcia_get_first_tuple(link, &tuple)) != CS_SUCCESS) { | ||
533 | fail_fn = GetFirstTuple; | ||
534 | goto cs_failed; | ||
535 | } | ||
536 | if ((fail_rc = pcmcia_get_tuple_data(link, &tuple)) != CS_SUCCESS) { | ||
537 | fail_fn = GetTupleData; | ||
538 | goto cs_failed; | ||
539 | } | ||
540 | if ((fail_rc = pcmcia_parse_tuple(link, &tuple, &parse)) | ||
541 | != CS_SUCCESS) { | ||
542 | fail_fn = ParseTuple; | ||
543 | goto cs_failed; | ||
544 | } | ||
545 | |||
546 | link->conf.ConfigBase = parse.config.base; | ||
547 | link->conf.Present = parse.config.rmask[0]; | ||
548 | |||
549 | link->io.BasePort2 = 0; | 531 | link->io.BasePort2 = 0; |
550 | link->io.NumPorts2 = 0; | 532 | link->io.NumPorts2 = 0; |
551 | link->io.Attributes2 = 0; | 533 | link->io.Attributes2 = 0; |
@@ -609,8 +591,6 @@ static int reader_config(struct pcmcia_device *link, int devno) | |||
609 | 591 | ||
610 | return 0; | 592 | return 0; |
611 | 593 | ||
612 | cs_failed: | ||
613 | cs_error(link, fail_fn, fail_rc); | ||
614 | cs_release: | 594 | cs_release: |
615 | reader_release(link); | 595 | reader_release(link); |
616 | return -ENODEV; | 596 | return -ENODEV; |
@@ -721,14 +701,14 @@ static int __init cm4040_init(void) | |||
721 | 701 | ||
722 | printk(KERN_INFO "%s\n", version); | 702 | printk(KERN_INFO "%s\n", version); |
723 | cmx_class = class_create(THIS_MODULE, "cardman_4040"); | 703 | cmx_class = class_create(THIS_MODULE, "cardman_4040"); |
724 | if (!cmx_class) | 704 | if (IS_ERR(cmx_class)) |
725 | return -1; | 705 | return PTR_ERR(cmx_class); |
726 | 706 | ||
727 | major = register_chrdev(0, DEVICE_NAME, &reader_fops); | 707 | major = register_chrdev(0, DEVICE_NAME, &reader_fops); |
728 | if (major < 0) { | 708 | if (major < 0) { |
729 | printk(KERN_WARNING MODULE_NAME | 709 | printk(KERN_WARNING MODULE_NAME |
730 | ": could not get major number\n"); | 710 | ": could not get major number\n"); |
731 | return -1; | 711 | return major; |
732 | } | 712 | } |
733 | 713 | ||
734 | rc = pcmcia_register_driver(&reader_driver); | 714 | rc = pcmcia_register_driver(&reader_driver); |