aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth/btuart_cs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/bluetooth/btuart_cs.c')
-rw-r--r--drivers/bluetooth/btuart_cs.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/bluetooth/btuart_cs.c b/drivers/bluetooth/btuart_cs.c
index 658a1373699e..9ce4c93467e5 100644
--- a/drivers/bluetooth/btuart_cs.c
+++ b/drivers/bluetooth/btuart_cs.c
@@ -152,7 +152,7 @@ static void btuart_write_wakeup(btuart_info_t *info)
152 152
153 clear_bit(XMIT_WAKEUP, &(info->tx_state)); 153 clear_bit(XMIT_WAKEUP, &(info->tx_state));
154 154
155 if (!(info->p_dev->state & DEV_PRESENT)) 155 if (!pcmcia_dev_present(info->p_dev))
156 return; 156 return;
157 157
158 if (!(skb = skb_dequeue(&(info->txq)))) 158 if (!(skb = skb_dequeue(&(info->txq))))
@@ -599,7 +599,6 @@ static int btuart_probe(struct pcmcia_device *link)
599 link->conf.Attributes = CONF_ENABLE_IRQ; 599 link->conf.Attributes = CONF_ENABLE_IRQ;
600 link->conf.IntType = INT_MEMORY_AND_IO; 600 link->conf.IntType = INT_MEMORY_AND_IO;
601 601
602 link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
603 return btuart_config(link); 602 return btuart_config(link);
604} 603}
605 604
@@ -608,9 +607,7 @@ static void btuart_detach(struct pcmcia_device *link)
608{ 607{
609 btuart_info_t *info = link->priv; 608 btuart_info_t *info = link->priv;
610 609
611 if (link->state & DEV_CONFIG) 610 btuart_release(link);
612 btuart_release(link);
613
614 kfree(info); 611 kfree(info);
615} 612}
616 613
@@ -664,9 +661,6 @@ static int btuart_config(struct pcmcia_device *link)
664 link->conf.ConfigBase = parse.config.base; 661 link->conf.ConfigBase = parse.config.base;
665 link->conf.Present = parse.config.rmask[0]; 662 link->conf.Present = parse.config.rmask[0];
666 663
667 /* Configure card */
668 link->state |= DEV_CONFIG;
669
670 /* First pass: look for a config entry that looks normal. */ 664 /* First pass: look for a config entry that looks normal. */
671 tuple.TupleData = (cisdata_t *) buf; 665 tuple.TupleData = (cisdata_t *) buf;
672 tuple.TupleOffset = 0; 666 tuple.TupleOffset = 0;
@@ -737,7 +731,6 @@ found_port:
737 731
738 strcpy(info->node.dev_name, info->hdev->name); 732 strcpy(info->node.dev_name, info->hdev->name);
739 link->dev_node = &info->node; 733 link->dev_node = &info->node;
740 link->state &= ~DEV_CONFIG_PENDING;
741 734
742 return 0; 735 return 0;
743 736
@@ -754,8 +747,7 @@ static void btuart_release(struct pcmcia_device *link)
754{ 747{
755 btuart_info_t *info = link->priv; 748 btuart_info_t *info = link->priv;
756 749
757 if (link->state & DEV_PRESENT) 750 btuart_close(info);
758 btuart_close(info);
759 751
760 pcmcia_disable_device(link); 752 pcmcia_disable_device(link);
761} 753}