typedef struct bluecard_info_t {
struct pcmcia_device *p_dev;
- dev_node_t node;
struct hci_dev *hdev;
unsigned int iobase;
unsigned char reg;
- if (!info || !info->hdev) {
- BT_ERR("Call of irq %d for unknown device", irq);
+ if (!info || !info->hdev)
+ /* our irq handler is shared */
return IRQ_NONE;
- }
if (!test_bit(CARD_READY, &(info->hw_state)))
return IRQ_HANDLED;
info->hdev = hdev;
- hdev->type = HCI_PCCARD;
+ hdev->bus = HCI_PCCARD;
hdev->driver_data = info;
SET_HCIDEV_DEV(hdev, &info->p_dev->dev);
link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
link->io.NumPorts1 = 8;
- link->irq.Attributes = IRQ_TYPE_EXCLUSIVE | IRQ_HANDLE_PRESENT;
- link->irq.IRQInfo1 = IRQ_LEVEL_ID;
-
- link->irq.Handler = bluecard_interrupt;
- link->irq.Instance = info;
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO;
for (n = 0; n < 0x400; n += 0x40) {
link->io.BasePort1 = n ^ 0x300;
i = pcmcia_request_io(link, &link->io);
- if (i == CS_SUCCESS)
+ if (i == 0)
break;
}
- if (i != CS_SUCCESS) {
- cs_error(link, RequestIO, i);
+ if (i != 0)
goto failed;
- }
- i = pcmcia_request_irq(link, &link->irq);
- if (i != CS_SUCCESS) {
- cs_error(link, RequestIRQ, i);
- link->irq.AssignedIRQ = 0;
- }
+ i = pcmcia_request_irq(link, bluecard_interrupt);
+ if (i != 0)
+ goto failed;
i = pcmcia_request_configuration(link, &link->conf);
- if (i != CS_SUCCESS) {
- cs_error(link, RequestConfiguration, i);
+ if (i != 0)
goto failed;
- }
if (bluecard_open(info) != 0)
goto failed;
- strcpy(info->node.dev_name, info->hdev->name);
- link->dev_node = &info->node;
-
return 0;
failed: