diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-03-31 10:26:06 -0500 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-03-31 10:26:06 -0500 |
commit | 15b99ac1729503db9e6dc642a50b9b6cb3bf51f9 (patch) | |
tree | cfb8897487beba502aac2b28bc35066a87e34299 /drivers/net/wireless/spectrum_cs.c | |
parent | fba395eee7d3f342ca739c20f5b3ee635d0420a0 (diff) |
[PATCH] pcmcia: add return value to _config() functions
Most of the driver initialization isn't done in the .probe function, but in
the internal _config() functions. Make them return a value, so that .probe
can properly report whether the probing of the device succeeded or not.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/net/wireless/spectrum_cs.c')
-rw-r--r-- | drivers/net/wireless/spectrum_cs.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/net/wireless/spectrum_cs.c b/drivers/net/wireless/spectrum_cs.c index a75ea7e593ac..118b2c6e5a29 100644 --- a/drivers/net/wireless/spectrum_cs.c +++ b/drivers/net/wireless/spectrum_cs.c | |||
@@ -71,7 +71,7 @@ struct orinoco_pccard { | |||
71 | /* Function prototypes */ | 71 | /* Function prototypes */ |
72 | /********************************************************************/ | 72 | /********************************************************************/ |
73 | 73 | ||
74 | static void spectrum_cs_config(struct pcmcia_device *link); | 74 | static int spectrum_cs_config(struct pcmcia_device *link); |
75 | static void spectrum_cs_release(struct pcmcia_device *link); | 75 | static void spectrum_cs_release(struct pcmcia_device *link); |
76 | 76 | ||
77 | /********************************************************************/ | 77 | /********************************************************************/ |
@@ -583,7 +583,7 @@ spectrum_cs_hard_reset(struct orinoco_private *priv) | |||
583 | * configure the card at this point -- we wait until we receive a card | 583 | * configure the card at this point -- we wait until we receive a card |
584 | * insertion event. */ | 584 | * insertion event. */ |
585 | static int | 585 | static int |
586 | spectrum_cs_attach(struct pcmcia_device *link) | 586 | spectrum_cs_probe(struct pcmcia_device *link) |
587 | { | 587 | { |
588 | struct net_device *dev; | 588 | struct net_device *dev; |
589 | struct orinoco_private *priv; | 589 | struct orinoco_private *priv; |
@@ -614,9 +614,7 @@ spectrum_cs_attach(struct pcmcia_device *link) | |||
614 | link->conf.IntType = INT_MEMORY_AND_IO; | 614 | link->conf.IntType = INT_MEMORY_AND_IO; |
615 | 615 | ||
616 | link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; | 616 | link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; |
617 | spectrum_cs_config(link); | 617 | return spectrum_cs_config(link); |
618 | |||
619 | return 0; | ||
620 | } /* spectrum_cs_attach */ | 618 | } /* spectrum_cs_attach */ |
621 | 619 | ||
622 | /* | 620 | /* |
@@ -647,7 +645,7 @@ static void spectrum_cs_detach(struct pcmcia_device *link) | |||
647 | * device available to the system. | 645 | * device available to the system. |
648 | */ | 646 | */ |
649 | 647 | ||
650 | static void | 648 | static int |
651 | spectrum_cs_config(struct pcmcia_device *link) | 649 | spectrum_cs_config(struct pcmcia_device *link) |
652 | { | 650 | { |
653 | struct net_device *dev = link->priv; | 651 | struct net_device *dev = link->priv; |
@@ -857,13 +855,14 @@ spectrum_cs_config(struct pcmcia_device *link) | |||
857 | link->io.BasePort2 + link->io.NumPorts2 - 1); | 855 | link->io.BasePort2 + link->io.NumPorts2 - 1); |
858 | printk("\n"); | 856 | printk("\n"); |
859 | 857 | ||
860 | return; | 858 | return 0; |
861 | 859 | ||
862 | cs_failed: | 860 | cs_failed: |
863 | cs_error(link, last_fn, last_ret); | 861 | cs_error(link, last_fn, last_ret); |
864 | 862 | ||
865 | failed: | 863 | failed: |
866 | spectrum_cs_release(link); | 864 | spectrum_cs_release(link); |
865 | return -ENODEV; | ||
867 | } /* spectrum_cs_config */ | 866 | } /* spectrum_cs_config */ |
868 | 867 | ||
869 | /* | 868 | /* |
@@ -954,7 +953,7 @@ static struct pcmcia_driver orinoco_driver = { | |||
954 | .drv = { | 953 | .drv = { |
955 | .name = DRIVER_NAME, | 954 | .name = DRIVER_NAME, |
956 | }, | 955 | }, |
957 | .probe = spectrum_cs_attach, | 956 | .probe = spectrum_cs_probe, |
958 | .remove = spectrum_cs_detach, | 957 | .remove = spectrum_cs_detach, |
959 | .suspend = spectrum_cs_suspend, | 958 | .suspend = spectrum_cs_suspend, |
960 | .resume = spectrum_cs_resume, | 959 | .resume = spectrum_cs_resume, |