spin_lock(&(info->lock));
-@@ -621,7 +642,11 @@ static int bluecard_hci_flush(struct hci
- static int bluecard_hci_open(struct hci_dev *hdev)
- {
- bluecard_info_t *info = hci_get_drvdata(hdev);
+@@ -629,7 +650,11 @@ static int bluecard_hci_open(struct hci_
+ return 0;
+
+ if (test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state))) {
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
- unsigned int iobase = info->p_dev->resource[0]->start;
+ unsigned int iobase = info->p_dev->resource[0]->start;
+#else
-+ unsigned int iobase = info->p_dev->io.BasePort1;
++ unsigned int iobase = info->p_dev->io.BasePort1;
+#endif
- if (test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state)))
- bluecard_hci_set_baud_rate(hdev, DEFAULT_BAUD_RATE);
-@@ -641,7 +666,11 @@ static int bluecard_hci_open(struct hci_
- static int bluecard_hci_close(struct hci_dev *hdev)
- {
- bluecard_info_t *info = hci_get_drvdata(hdev);
+ /* Enable LED */
+ outb(0x08 | 0x20, iobase + 0x30);
+@@ -649,7 +674,11 @@ static int bluecard_hci_close(struct hci
+ bluecard_hci_flush(hdev);
+
+ if (test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state))) {
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
- unsigned int iobase = info->p_dev->resource[0]->start;
+ unsigned int iobase = info->p_dev->resource[0]->start;
+#else
-+ unsigned int iobase = info->p_dev->io.BasePort1;
++ unsigned int iobase = info->p_dev->io.BasePort1;
+#endif
- if (!test_and_clear_bit(HCI_RUNNING, &(hdev->flags)))
- return 0;
-@@ -703,7 +732,11 @@ static int bluecard_hci_ioctl(struct hci
+ /* Disable LED */
+ outb(0x00, iobase + 0x30);
+@@ -705,7 +734,11 @@ static int bluecard_hci_ioctl(struct hci
static int bluecard_open(bluecard_info_t *info)
{
struct hci_dev *hdev;
unsigned char id;
-@@ -819,7 +852,11 @@ static int bluecard_open(bluecard_info_t
+@@ -821,7 +854,11 @@ static int bluecard_open(bluecard_info_t
static int bluecard_close(bluecard_info_t *info)
{
struct hci_dev *hdev = info->hdev;
if (!hdev)
-@@ -854,7 +891,18 @@ static int bluecard_probe(struct pcmcia_
+@@ -856,7 +893,18 @@ static int bluecard_probe(struct pcmcia_
info->p_dev = link;
link->priv = info;
return bluecard_config(link);
}
-@@ -874,15 +922,30 @@ static int bluecard_config(struct pcmcia
+@@ -876,15 +924,30 @@ static int bluecard_config(struct pcmcia
bluecard_info_t *info = link->priv;
int i, n;
if (i == 0)
break;
}
-@@ -890,9 +953,15 @@ static int bluecard_config(struct pcmcia
+@@ -892,9 +955,15 @@ static int bluecard_config(struct pcmcia
if (i != 0)
goto failed;
i = pcmcia_enable_device(link);
if (i != 0)
-@@ -930,7 +999,13 @@ MODULE_DEVICE_TABLE(pcmcia, bluecard_ids
+@@ -932,7 +1001,13 @@ MODULE_DEVICE_TABLE(pcmcia, bluecard_ids
static struct pcmcia_driver bluecard_driver = {
.owner = THIS_MODULE,
static int dtl1_config(struct pcmcia_device *link)
{
-@@ -589,13 +655,23 @@ static int dtl1_config(struct pcmcia_dev
- int i;
+@@ -589,14 +655,24 @@ static int dtl1_config(struct pcmcia_dev
+ int ret;
/* Look for a generic full-sized window */
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
+#else
+ link->io.NumPorts1 = 8;
+#endif
- if (pcmcia_loop_config(link, dtl1_confcheck, NULL) < 0)
+ ret = pcmcia_loop_config(link, dtl1_confcheck, NULL);
+ if (ret)
goto failed;
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
- i = pcmcia_request_irq(link, dtl1_interrupt);
- if (i != 0)
+ ret = pcmcia_request_irq(link, dtl1_interrupt);
+ if (ret)
goto failed;
+#else
-+ i = pcmcia_request_irq(link, &link->irq);
-+ if (i != 0)
++ ret = pcmcia_request_irq(link, &link->irq);
++ if (ret != 0)
+ link->irq.AssignedIRQ = 0;
+#endif
- i = pcmcia_enable_device(link);
- if (i != 0)
-@@ -622,7 +698,13 @@ MODULE_DEVICE_TABLE(pcmcia, dtl1_ids);
+ ret = pcmcia_enable_device(link);
+ if (ret)
+@@ -624,7 +700,13 @@ MODULE_DEVICE_TABLE(pcmcia, dtl1_ids);
static struct pcmcia_driver dtl1_driver = {
.owner = THIS_MODULE,