diff options
Diffstat (limited to 'drivers/char/pcmcia/cm4000_cs.c')
-rw-r--r-- | drivers/char/pcmcia/cm4000_cs.c | 26 |
1 files changed, 3 insertions, 23 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 | ||
1844 | cs_failed: | ||
1845 | cs_error(link, fail_fn, fail_rc); | ||
1846 | cs_release: | 1826 | cs_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); |