diff options
Diffstat (limited to 'drivers/bluetooth/bt3c_cs.c')
-rw-r--r-- | drivers/bluetooth/bt3c_cs.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/bluetooth/bt3c_cs.c b/drivers/bluetooth/bt3c_cs.c index 80861f4f35e3..b94ac2f9f7ba 100644 --- a/drivers/bluetooth/bt3c_cs.c +++ b/drivers/bluetooth/bt3c_cs.c | |||
@@ -195,7 +195,7 @@ static void bt3c_write_wakeup(bt3c_info_t *info) | |||
195 | register struct sk_buff *skb; | 195 | register struct sk_buff *skb; |
196 | register int len; | 196 | register int len; |
197 | 197 | ||
198 | if (!(info->p_dev->state & DEV_PRESENT)) | 198 | if (!pcmcia_dev_present(info->p_dev)) |
199 | break; | 199 | break; |
200 | 200 | ||
201 | 201 | ||
@@ -668,7 +668,6 @@ static int bt3c_probe(struct pcmcia_device *link) | |||
668 | link->conf.Attributes = CONF_ENABLE_IRQ; | 668 | link->conf.Attributes = CONF_ENABLE_IRQ; |
669 | link->conf.IntType = INT_MEMORY_AND_IO; | 669 | link->conf.IntType = INT_MEMORY_AND_IO; |
670 | 670 | ||
671 | link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; | ||
672 | return bt3c_config(link); | 671 | return bt3c_config(link); |
673 | } | 672 | } |
674 | 673 | ||
@@ -677,9 +676,7 @@ static void bt3c_detach(struct pcmcia_device *link) | |||
677 | { | 676 | { |
678 | bt3c_info_t *info = link->priv; | 677 | bt3c_info_t *info = link->priv; |
679 | 678 | ||
680 | if (link->state & DEV_CONFIG) | 679 | bt3c_release(link); |
681 | bt3c_release(link); | ||
682 | |||
683 | kfree(info); | 680 | kfree(info); |
684 | } | 681 | } |
685 | 682 | ||
@@ -733,9 +730,6 @@ static int bt3c_config(struct pcmcia_device *link) | |||
733 | link->conf.ConfigBase = parse.config.base; | 730 | link->conf.ConfigBase = parse.config.base; |
734 | link->conf.Present = parse.config.rmask[0]; | 731 | link->conf.Present = parse.config.rmask[0]; |
735 | 732 | ||
736 | /* Configure card */ | ||
737 | link->state |= DEV_CONFIG; | ||
738 | |||
739 | /* First pass: look for a config entry that looks normal. */ | 733 | /* First pass: look for a config entry that looks normal. */ |
740 | tuple.TupleData = (cisdata_t *)buf; | 734 | tuple.TupleData = (cisdata_t *)buf; |
741 | tuple.TupleOffset = 0; | 735 | tuple.TupleOffset = 0; |
@@ -805,7 +799,6 @@ found_port: | |||
805 | 799 | ||
806 | strcpy(info->node.dev_name, info->hdev->name); | 800 | strcpy(info->node.dev_name, info->hdev->name); |
807 | link->dev_node = &info->node; | 801 | link->dev_node = &info->node; |
808 | link->state &= ~DEV_CONFIG_PENDING; | ||
809 | 802 | ||
810 | return 0; | 803 | return 0; |
811 | 804 | ||
@@ -822,8 +815,7 @@ static void bt3c_release(struct pcmcia_device *link) | |||
822 | { | 815 | { |
823 | bt3c_info_t *info = link->priv; | 816 | bt3c_info_t *info = link->priv; |
824 | 817 | ||
825 | if (link->state & DEV_PRESENT) | 818 | bt3c_close(info); |
826 | bt3c_close(info); | ||
827 | 819 | ||
828 | pcmcia_disable_device(link); | 820 | pcmcia_disable_device(link); |
829 | } | 821 | } |