diff options
Diffstat (limited to 'drivers/net/wireless/libertas/if_cs.c')
-rw-r--r-- | drivers/net/wireless/libertas/if_cs.c | 57 |
1 files changed, 7 insertions, 50 deletions
diff --git a/drivers/net/wireless/libertas/if_cs.c b/drivers/net/wireless/libertas/if_cs.c index e213a5dc049d..fc8121190d38 100644 --- a/drivers/net/wireless/libertas/if_cs.c +++ b/drivers/net/wireless/libertas/if_cs.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include <linux/firmware.h> | 28 | #include <linux/firmware.h> |
29 | #include <linux/netdevice.h> | 29 | #include <linux/netdevice.h> |
30 | 30 | ||
31 | #include <pcmcia/cs.h> | ||
32 | #include <pcmcia/cistpl.h> | 31 | #include <pcmcia/cistpl.h> |
33 | #include <pcmcia/ds.h> | 32 | #include <pcmcia/ds.h> |
34 | 33 | ||
@@ -759,15 +758,6 @@ static int if_cs_host_to_card(struct lbs_private *priv, | |||
759 | } | 758 | } |
760 | 759 | ||
761 | 760 | ||
762 | /********************************************************************/ | ||
763 | /* Card Services */ | ||
764 | /********************************************************************/ | ||
765 | |||
766 | /* | ||
767 | * After a card is removed, if_cs_release() will unregister the | ||
768 | * device, and release the PCMCIA configuration. If the device is | ||
769 | * still open, this will be postponed until it is closed. | ||
770 | */ | ||
771 | static void if_cs_release(struct pcmcia_device *p_dev) | 761 | static void if_cs_release(struct pcmcia_device *p_dev) |
772 | { | 762 | { |
773 | struct if_cs_card *card = p_dev->priv; | 763 | struct if_cs_card *card = p_dev->priv; |
@@ -783,31 +773,12 @@ static void if_cs_release(struct pcmcia_device *p_dev) | |||
783 | } | 773 | } |
784 | 774 | ||
785 | 775 | ||
786 | /* | 776 | static int if_cs_ioprobe(struct pcmcia_device *p_dev, void *priv_data) |
787 | * This creates an "instance" of the driver, allocating local data | ||
788 | * structures for one device. The device is registered with Card | ||
789 | * Services. | ||
790 | * | ||
791 | * The dev_link structure is initialized, but we don't actually | ||
792 | * configure the card at this point -- we wait until we receive a card | ||
793 | * insertion event. | ||
794 | */ | ||
795 | |||
796 | static int if_cs_ioprobe(struct pcmcia_device *p_dev, | ||
797 | cistpl_cftable_entry_t *cfg, | ||
798 | cistpl_cftable_entry_t *dflt, | ||
799 | unsigned int vcc, | ||
800 | void *priv_data) | ||
801 | { | 777 | { |
778 | p_dev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH; | ||
802 | p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; | 779 | p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; |
803 | p_dev->resource[0]->start = cfg->io.win[0].base; | ||
804 | p_dev->resource[0]->end = cfg->io.win[0].len; | ||
805 | 780 | ||
806 | /* Do we need to allocate an interrupt? */ | 781 | if (p_dev->resource[1]->end) { |
807 | p_dev->conf.Attributes |= CONF_ENABLE_IRQ; | ||
808 | |||
809 | /* IO window settings */ | ||
810 | if (cfg->io.nwin != 1) { | ||
811 | lbs_pr_err("wrong CIS (check number of IO windows)\n"); | 782 | lbs_pr_err("wrong CIS (check number of IO windows)\n"); |
812 | return -ENODEV; | 783 | return -ENODEV; |
813 | } | 784 | } |
@@ -835,8 +806,7 @@ static int if_cs_probe(struct pcmcia_device *p_dev) | |||
835 | card->p_dev = p_dev; | 806 | card->p_dev = p_dev; |
836 | p_dev->priv = card; | 807 | p_dev->priv = card; |
837 | 808 | ||
838 | p_dev->conf.Attributes = 0; | 809 | p_dev->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_IO; |
839 | p_dev->conf.IntType = INT_MEMORY_AND_IO; | ||
840 | 810 | ||
841 | if (pcmcia_loop_config(p_dev, if_cs_ioprobe, NULL)) { | 811 | if (pcmcia_loop_config(p_dev, if_cs_ioprobe, NULL)) { |
842 | lbs_pr_err("error in pcmcia_loop_config\n"); | 812 | lbs_pr_err("error in pcmcia_loop_config\n"); |
@@ -860,14 +830,9 @@ static int if_cs_probe(struct pcmcia_device *p_dev) | |||
860 | goto out1; | 830 | goto out1; |
861 | } | 831 | } |
862 | 832 | ||
863 | /* | 833 | ret = pcmcia_enable_device(p_dev); |
864 | * This actually configures the PCMCIA socket -- setting up | ||
865 | * the I/O windows and the interrupt mapping, and putting the | ||
866 | * card and host interface into "Memory and IO" mode. | ||
867 | */ | ||
868 | ret = pcmcia_request_configuration(p_dev, &p_dev->conf); | ||
869 | if (ret) { | 834 | if (ret) { |
870 | lbs_pr_err("error in pcmcia_request_configuration\n"); | 835 | lbs_pr_err("error in pcmcia_enable_device\n"); |
871 | goto out2; | 836 | goto out2; |
872 | } | 837 | } |
873 | 838 | ||
@@ -979,12 +944,6 @@ out: | |||
979 | } | 944 | } |
980 | 945 | ||
981 | 946 | ||
982 | /* | ||
983 | * This deletes a driver "instance". The device is de-registered with | ||
984 | * Card Services. If it has been released, all local data structures | ||
985 | * are freed. Otherwise, the structures will be freed when the device | ||
986 | * is released. | ||
987 | */ | ||
988 | static void if_cs_detach(struct pcmcia_device *p_dev) | 947 | static void if_cs_detach(struct pcmcia_device *p_dev) |
989 | { | 948 | { |
990 | struct if_cs_card *card = p_dev->priv; | 949 | struct if_cs_card *card = p_dev->priv; |
@@ -1018,9 +977,7 @@ MODULE_DEVICE_TABLE(pcmcia, if_cs_ids); | |||
1018 | 977 | ||
1019 | static struct pcmcia_driver lbs_driver = { | 978 | static struct pcmcia_driver lbs_driver = { |
1020 | .owner = THIS_MODULE, | 979 | .owner = THIS_MODULE, |
1021 | .drv = { | 980 | .name = DRV_NAME, |
1022 | .name = DRV_NAME, | ||
1023 | }, | ||
1024 | .probe = if_cs_probe, | 981 | .probe = if_cs_probe, |
1025 | .remove = if_cs_detach, | 982 | .remove = if_cs_detach, |
1026 | .id_table = if_cs_ids, | 983 | .id_table = if_cs_ids, |