diff options
Diffstat (limited to 'drivers/char/pcmcia/cm4000_cs.c')
-rw-r--r-- | drivers/char/pcmcia/cm4000_cs.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c index 79b8ad0e32df..22dce9d47b2b 100644 --- a/drivers/char/pcmcia/cm4000_cs.c +++ b/drivers/char/pcmcia/cm4000_cs.c | |||
@@ -1759,7 +1759,7 @@ static void cmm_cm4000_release(struct pcmcia_device * link) | |||
1759 | 1759 | ||
1760 | /*==== Interface to PCMCIA Layer =======================================*/ | 1760 | /*==== Interface to PCMCIA Layer =======================================*/ |
1761 | 1761 | ||
1762 | static void cm4000_config(struct pcmcia_device * link, int devno) | 1762 | static int cm4000_config(struct pcmcia_device * link, int devno) |
1763 | { | 1763 | { |
1764 | struct cm4000_dev *dev; | 1764 | struct cm4000_dev *dev; |
1765 | tuple_t tuple; | 1765 | tuple_t tuple; |
@@ -1846,7 +1846,7 @@ static void cm4000_config(struct pcmcia_device * link, int devno) | |||
1846 | link->dev_node = &dev->node; | 1846 | link->dev_node = &dev->node; |
1847 | link->state &= ~DEV_CONFIG_PENDING; | 1847 | link->state &= ~DEV_CONFIG_PENDING; |
1848 | 1848 | ||
1849 | return; | 1849 | return 0; |
1850 | 1850 | ||
1851 | cs_failed: | 1851 | cs_failed: |
1852 | cs_error(link, fail_fn, fail_rc); | 1852 | cs_error(link, fail_fn, fail_rc); |
@@ -1854,6 +1854,7 @@ cs_release: | |||
1854 | cm4000_release(link); | 1854 | cm4000_release(link); |
1855 | 1855 | ||
1856 | link->state &= ~DEV_CONFIG_PENDING; | 1856 | link->state &= ~DEV_CONFIG_PENDING; |
1857 | return -ENODEV; | ||
1857 | } | 1858 | } |
1858 | 1859 | ||
1859 | static int cm4000_suspend(struct pcmcia_device *link) | 1860 | static int cm4000_suspend(struct pcmcia_device *link) |
@@ -1883,10 +1884,10 @@ static void cm4000_release(struct pcmcia_device *link) | |||
1883 | pcmcia_disable_device(link); | 1884 | pcmcia_disable_device(link); |
1884 | } | 1885 | } |
1885 | 1886 | ||
1886 | static int cm4000_attach(struct pcmcia_device *link) | 1887 | static int cm4000_probe(struct pcmcia_device *link) |
1887 | { | 1888 | { |
1888 | struct cm4000_dev *dev; | 1889 | struct cm4000_dev *dev; |
1889 | int i; | 1890 | int i, ret; |
1890 | 1891 | ||
1891 | for (i = 0; i < CM4000_MAX_DEV; i++) | 1892 | for (i = 0; i < CM4000_MAX_DEV; i++) |
1892 | if (dev_table[i] == NULL) | 1893 | if (dev_table[i] == NULL) |
@@ -1913,7 +1914,9 @@ static int cm4000_attach(struct pcmcia_device *link) | |||
1913 | init_waitqueue_head(&dev->readq); | 1914 | init_waitqueue_head(&dev->readq); |
1914 | 1915 | ||
1915 | link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; | 1916 | link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; |
1916 | cm4000_config(link, i); | 1917 | ret = cm4000_config(link, i); |
1918 | if (ret) | ||
1919 | return ret; | ||
1917 | 1920 | ||
1918 | class_device_create(cmm_class, NULL, MKDEV(major, i), NULL, | 1921 | class_device_create(cmm_class, NULL, MKDEV(major, i), NULL, |
1919 | "cmm%d", i); | 1922 | "cmm%d", i); |
@@ -1968,7 +1971,7 @@ static struct pcmcia_driver cm4000_driver = { | |||
1968 | .drv = { | 1971 | .drv = { |
1969 | .name = "cm4000_cs", | 1972 | .name = "cm4000_cs", |
1970 | }, | 1973 | }, |
1971 | .probe = cm4000_attach, | 1974 | .probe = cm4000_probe, |
1972 | .remove = cm4000_detach, | 1975 | .remove = cm4000_detach, |
1973 | .suspend = cm4000_suspend, | 1976 | .suspend = cm4000_suspend, |
1974 | .resume = cm4000_resume, | 1977 | .resume = cm4000_resume, |