aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/pcmcia
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2006-12-06 10:01:18 -0500
committerDavid Howells <dhowells@warthog.cambridge.redhat.com>2006-12-06 10:01:18 -0500
commit4796b71fbb907ce6b8a9acf1852d3646a80b4576 (patch)
tree6263f165446c581efdbb760205c1f85378fe6259 /drivers/char/pcmcia
parent6d5aefb8eaa38e44b5b8cf60c812aceafc02d924 (diff)
parentec0bf39a471bf6fcd01def2bd677128cea940b73 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts: drivers/pcmcia/ds.c Fix up merge failures with Linus's head and fix new compile failures. Signed-Off-By: David Howells <dhowells@redhat.com>
Diffstat (limited to 'drivers/char/pcmcia')
-rw-r--r--drivers/char/pcmcia/cm4000_cs.c26
-rw-r--r--drivers/char/pcmcia/cm4040_cs.c26
-rw-r--r--drivers/char/pcmcia/synclink_cs.c7
3 files changed, 6 insertions, 53 deletions
diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c
index 50d20aafeb18..211c93fda6fc 100644
--- a/drivers/char/pcmcia/cm4000_cs.c
+++ b/drivers/char/pcmcia/cm4000_cs.c
@@ -1764,29 +1764,11 @@ static int cm4000_config(struct pcmcia_device * link, int devno)
1764 int rc; 1764 int rc;
1765 1765
1766 /* read the config-tuples */ 1766 /* read the config-tuples */
1767 tuple.DesiredTuple = CISTPL_CONFIG;
1768 tuple.Attributes = 0; 1767 tuple.Attributes = 0;
1769 tuple.TupleData = buf; 1768 tuple.TupleData = buf;
1770 tuple.TupleDataMax = sizeof(buf); 1769 tuple.TupleDataMax = sizeof(buf);
1771 tuple.TupleOffset = 0; 1770 tuple.TupleOffset = 0;
1772 1771
1773 if ((fail_rc = pcmcia_get_first_tuple(link, &tuple)) != CS_SUCCESS) {
1774 fail_fn = GetFirstTuple;
1775 goto cs_failed;
1776 }
1777 if ((fail_rc = pcmcia_get_tuple_data(link, &tuple)) != CS_SUCCESS) {
1778 fail_fn = GetTupleData;
1779 goto cs_failed;
1780 }
1781 if ((fail_rc =
1782 pcmcia_parse_tuple(link, &tuple, &parse)) != CS_SUCCESS) {
1783 fail_fn = ParseTuple;
1784 goto cs_failed;
1785 }
1786
1787 link->conf.ConfigBase = parse.config.base;
1788 link->conf.Present = parse.config.rmask[0];
1789
1790 link->io.BasePort2 = 0; 1772 link->io.BasePort2 = 0;
1791 link->io.NumPorts2 = 0; 1773 link->io.NumPorts2 = 0;
1792 link->io.Attributes2 = 0; 1774 link->io.Attributes2 = 0;
@@ -1841,8 +1823,6 @@ static int cm4000_config(struct pcmcia_device * link, int devno)
1841 1823
1842 return 0; 1824 return 0;
1843 1825
1844cs_failed:
1845 cs_error(link, fail_fn, fail_rc);
1846cs_release: 1826cs_release:
1847 cm4000_release(link); 1827 cm4000_release(link);
1848 return -ENODEV; 1828 return -ENODEV;
@@ -1973,14 +1953,14 @@ static int __init cmm_init(void)
1973 printk(KERN_INFO "%s\n", version); 1953 printk(KERN_INFO "%s\n", version);
1974 1954
1975 cmm_class = class_create(THIS_MODULE, "cardman_4000"); 1955 cmm_class = class_create(THIS_MODULE, "cardman_4000");
1976 if (!cmm_class) 1956 if (IS_ERR(cmm_class))
1977 return -1; 1957 return PTR_ERR(cmm_class);
1978 1958
1979 major = register_chrdev(0, DEVICE_NAME, &cm4000_fops); 1959 major = register_chrdev(0, DEVICE_NAME, &cm4000_fops);
1980 if (major < 0) { 1960 if (major < 0) {
1981 printk(KERN_WARNING MODULE_NAME 1961 printk(KERN_WARNING MODULE_NAME
1982 ": could not get major number\n"); 1962 ": could not get major number\n");
1983 return -1; 1963 return major;
1984 } 1964 }
1985 1965
1986 rc = pcmcia_register_driver(&cm4000_driver); 1966 rc = pcmcia_register_driver(&cm4000_driver);
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
612cs_failed:
613 cs_error(link, fail_fn, fail_rc);
614cs_release: 594cs_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);
diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c
index e4d950072b5a..1bd12296dca5 100644
--- a/drivers/char/pcmcia/synclink_cs.c
+++ b/drivers/char/pcmcia/synclink_cs.c
@@ -604,17 +604,10 @@ static int mgslpc_config(struct pcmcia_device *link)
604 if (debug_level >= DEBUG_LEVEL_INFO) 604 if (debug_level >= DEBUG_LEVEL_INFO)
605 printk("mgslpc_config(0x%p)\n", link); 605 printk("mgslpc_config(0x%p)\n", link);
606 606
607 /* read CONFIG tuple to find its configuration registers */
608 tuple.DesiredTuple = CISTPL_CONFIG;
609 tuple.Attributes = 0; 607 tuple.Attributes = 0;
610 tuple.TupleData = buf; 608 tuple.TupleData = buf;
611 tuple.TupleDataMax = sizeof(buf); 609 tuple.TupleDataMax = sizeof(buf);
612 tuple.TupleOffset = 0; 610 tuple.TupleOffset = 0;
613 CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple));
614 CS_CHECK(GetTupleData, pcmcia_get_tuple_data(link, &tuple));
615 CS_CHECK(ParseTuple, pcmcia_parse_tuple(link, &tuple, &parse));
616 link->conf.ConfigBase = parse.config.base;
617 link->conf.Present = parse.config.rmask[0];
618 611
619 /* get CIS configuration entry */ 612 /* get CIS configuration entry */
620 613