Commit dc42ad2c authored by Marcel Holtmann's avatar Marcel Holtmann

[Bluetooth] Use BT_ERR wherever possible

This patch neatens the code by using BT_ERR and so using the function
name in the macro to save code and rom space.

Patch from Joe Perches <joe@perches.com>
parent 7f9e1ee0
...@@ -226,7 +226,7 @@ static int bluecard_write(unsigned int iobase, unsigned int offset, __u8 *buf, i ...@@ -226,7 +226,7 @@ static int bluecard_write(unsigned int iobase, unsigned int offset, __u8 *buf, i
static void bluecard_write_wakeup(bluecard_info_t *info) static void bluecard_write_wakeup(bluecard_info_t *info)
{ {
if (!info) { if (!info) {
printk(KERN_WARNING "bluecard_cs: Call of write_wakeup for unknown device.\n"); BT_ERR("Unknown device");
return; return;
} }
...@@ -379,7 +379,7 @@ static void bluecard_receive(bluecard_info_t *info, unsigned int offset) ...@@ -379,7 +379,7 @@ static void bluecard_receive(bluecard_info_t *info, unsigned int offset)
int i, len; int i, len;
if (!info) { if (!info) {
printk(KERN_WARNING "bluecard_cs: Call of receive for unknown device.\n"); BT_ERR("Unknown device");
return; return;
} }
...@@ -397,7 +397,7 @@ static void bluecard_receive(bluecard_info_t *info, unsigned int offset) ...@@ -397,7 +397,7 @@ static void bluecard_receive(bluecard_info_t *info, unsigned int offset)
info->rx_state = RECV_WAIT_PACKET_TYPE; info->rx_state = RECV_WAIT_PACKET_TYPE;
info->rx_count = 0; info->rx_count = 0;
if (!(info->rx_skb = bt_skb_alloc(HCI_MAX_FRAME_SIZE, GFP_ATOMIC))) { if (!(info->rx_skb = bt_skb_alloc(HCI_MAX_FRAME_SIZE, GFP_ATOMIC))) {
printk(KERN_WARNING "bluecard_cs: Can't allocate mem for new packet.\n"); BT_ERR("Can't allocate mem for new packet");
return; return;
} }
} }
...@@ -439,7 +439,7 @@ static void bluecard_receive(bluecard_info_t *info, unsigned int offset) ...@@ -439,7 +439,7 @@ static void bluecard_receive(bluecard_info_t *info, unsigned int offset)
default: default:
/* unknown packet */ /* unknown packet */
printk(KERN_WARNING "bluecard_cs: Unknown HCI packet with type 0x%02x received.\n", info->rx_skb->pkt_type); BT_ERR("Unknown HCI packet with type 0x%02x received", info->rx_skb->pkt_type);
info->hdev->stat.err_rx++; info->hdev->stat.err_rx++;
kfree_skb(info->rx_skb); kfree_skb(info->rx_skb);
...@@ -506,7 +506,7 @@ static irqreturn_t bluecard_interrupt(int irq, void *dev_inst, struct pt_regs *r ...@@ -506,7 +506,7 @@ static irqreturn_t bluecard_interrupt(int irq, void *dev_inst, struct pt_regs *r
unsigned char reg; unsigned char reg;
if (!info) { if (!info) {
printk(KERN_WARNING "bluecard_cs: Call of irq %d for unknown device.\n", irq); BT_ERR("Call of irq %d for unknown device", irq);
return IRQ_NONE; return IRQ_NONE;
} }
...@@ -574,7 +574,7 @@ static int bluecard_hci_set_baud_rate(struct hci_dev *hdev, int baud) ...@@ -574,7 +574,7 @@ static int bluecard_hci_set_baud_rate(struct hci_dev *hdev, int baud)
unsigned char cmd[] = { HCI_COMMAND_PKT, 0x09, 0xfc, 0x01, 0x03 }; unsigned char cmd[] = { HCI_COMMAND_PKT, 0x09, 0xfc, 0x01, 0x03 };
if (!(skb = bt_skb_alloc(HCI_MAX_FRAME_SIZE, GFP_ATOMIC))) { if (!(skb = bt_skb_alloc(HCI_MAX_FRAME_SIZE, GFP_ATOMIC))) {
printk(KERN_WARNING "bluecard_cs: Can't allocate mem for new packet.\n"); BT_ERR("Can't allocate mem for new packet");
return -1; return -1;
} }
...@@ -664,7 +664,7 @@ static int bluecard_hci_send_frame(struct sk_buff *skb) ...@@ -664,7 +664,7 @@ static int bluecard_hci_send_frame(struct sk_buff *skb)
struct hci_dev *hdev = (struct hci_dev *)(skb->dev); struct hci_dev *hdev = (struct hci_dev *)(skb->dev);
if (!hdev) { if (!hdev) {
printk(KERN_WARNING "bluecard_cs: Frame for unknown HCI device (hdev=NULL)."); BT_ERR("Frame for unknown HCI device (hdev=NULL)");
return -ENODEV; return -ENODEV;
} }
...@@ -780,7 +780,7 @@ int bluecard_open(bluecard_info_t *info) ...@@ -780,7 +780,7 @@ int bluecard_open(bluecard_info_t *info)
/* Initialize and register HCI device */ /* Initialize and register HCI device */
hdev = hci_alloc_dev(); hdev = hci_alloc_dev();
if (!hdev) { if (!hdev) {
printk(KERN_WARNING "bluecard_cs: Can't allocate HCI device.\n"); BT_ERR("Can't allocate HCI device");
return -ENOMEM; return -ENOMEM;
} }
...@@ -799,7 +799,7 @@ int bluecard_open(bluecard_info_t *info) ...@@ -799,7 +799,7 @@ int bluecard_open(bluecard_info_t *info)
hdev->owner = THIS_MODULE; hdev->owner = THIS_MODULE;
if (hci_register_dev(hdev) < 0) { if (hci_register_dev(hdev) < 0) {
printk(KERN_WARNING "bluecard_cs: Can't register HCI device.\n"); BT_ERR("Can't register HCI device");
hci_free_dev(hdev); hci_free_dev(hdev);
return -ENODEV; return -ENODEV;
} }
...@@ -825,7 +825,7 @@ int bluecard_close(bluecard_info_t *info) ...@@ -825,7 +825,7 @@ int bluecard_close(bluecard_info_t *info)
outb(0x80, iobase + 0x30); outb(0x80, iobase + 0x30);
if (hci_unregister_dev(hdev) < 0) if (hci_unregister_dev(hdev) < 0)
printk(KERN_WARNING "bluecard_cs: Can't unregister HCI device %s.\n", hdev->name); BT_ERR("Can't unregister HCI device %s", hdev->name);
hci_free_dev(hdev); hci_free_dev(hdev);
......
...@@ -195,7 +195,7 @@ static void bt3c_write_wakeup(bt3c_info_t *info, int from) ...@@ -195,7 +195,7 @@ static void bt3c_write_wakeup(bt3c_info_t *info, int from)
unsigned long flags; unsigned long flags;
if (!info) { if (!info) {
printk(KERN_WARNING "bt3c_cs: Call of write_wakeup for unknown device.\n"); BT_ERR("Unknown device");
return; return;
} }
...@@ -222,7 +222,7 @@ static void bt3c_write_wakeup(bt3c_info_t *info, int from) ...@@ -222,7 +222,7 @@ static void bt3c_write_wakeup(bt3c_info_t *info, int from)
len = bt3c_write(iobase, 256, skb->data, skb->len); len = bt3c_write(iobase, 256, skb->data, skb->len);
if (len != skb->len) { if (len != skb->len) {
printk(KERN_WARNING "bt3c_cs: very strange\n"); BT_ERR("Very strange");
} }
kfree_skb(skb); kfree_skb(skb);
...@@ -241,7 +241,7 @@ static void bt3c_receive(bt3c_info_t *info) ...@@ -241,7 +241,7 @@ static void bt3c_receive(bt3c_info_t *info)
int size = 0, avail; int size = 0, avail;
if (!info) { if (!info) {
printk(KERN_WARNING "bt3c_cs: Call of receive for unknown device.\n"); BT_ERR("Unknown device");
return; return;
} }
...@@ -260,7 +260,7 @@ static void bt3c_receive(bt3c_info_t *info) ...@@ -260,7 +260,7 @@ static void bt3c_receive(bt3c_info_t *info)
info->rx_state = RECV_WAIT_PACKET_TYPE; info->rx_state = RECV_WAIT_PACKET_TYPE;
info->rx_count = 0; info->rx_count = 0;
if (!(info->rx_skb = bt_skb_alloc(HCI_MAX_FRAME_SIZE, GFP_ATOMIC))) { if (!(info->rx_skb = bt_skb_alloc(HCI_MAX_FRAME_SIZE, GFP_ATOMIC))) {
printk(KERN_WARNING "bt3c_cs: Can't allocate mem for new packet.\n"); BT_ERR("Can't allocate mem for new packet");
return; return;
} }
} }
...@@ -292,7 +292,7 @@ static void bt3c_receive(bt3c_info_t *info) ...@@ -292,7 +292,7 @@ static void bt3c_receive(bt3c_info_t *info)
default: default:
/* Unknown packet */ /* Unknown packet */
printk(KERN_WARNING "bt3c_cs: Unknown HCI packet with type 0x%02x received.\n", info->rx_skb->pkt_type); BT_ERR("Unknown HCI packet with type 0x%02x received", info->rx_skb->pkt_type);
info->hdev->stat.err_rx++; info->hdev->stat.err_rx++;
clear_bit(HCI_RUNNING, &(info->hdev->flags)); clear_bit(HCI_RUNNING, &(info->hdev->flags));
...@@ -362,7 +362,7 @@ static irqreturn_t bt3c_interrupt(int irq, void *dev_inst, struct pt_regs *regs) ...@@ -362,7 +362,7 @@ static irqreturn_t bt3c_interrupt(int irq, void *dev_inst, struct pt_regs *regs)
int iir; int iir;
if (!info) { if (!info) {
printk(KERN_WARNING "bt3c_cs: Call of irq %d for unknown device.\n", irq); BT_ERR("Call of irq %d for unknown device", irq);
return IRQ_NONE; return IRQ_NONE;
} }
...@@ -375,16 +375,16 @@ static irqreturn_t bt3c_interrupt(int irq, void *dev_inst, struct pt_regs *regs) ...@@ -375,16 +375,16 @@ static irqreturn_t bt3c_interrupt(int irq, void *dev_inst, struct pt_regs *regs)
int stat = bt3c_read(iobase, 0x7001); int stat = bt3c_read(iobase, 0x7001);
if ((stat & 0xff) == 0x7f) { if ((stat & 0xff) == 0x7f) {
printk(KERN_WARNING "bt3c_cs: STRANGE stat=%04x\n", stat); BT_ERR("Very strange (stat=0x%04x)", stat);
} else if ((stat & 0xff) != 0xff) { } else if ((stat & 0xff) != 0xff) {
if (stat & 0x0020) { if (stat & 0x0020) {
int stat = bt3c_read(iobase, 0x7002) & 0x10; int stat = bt3c_read(iobase, 0x7002) & 0x10;
printk(KERN_WARNING "bt3c_cs: antena %s\n", stat ? "OUT" : "IN"); BT_ERR("Antenna %s", stat ? "out" : "in");
} }
if (stat & 0x0001) if (stat & 0x0001)
bt3c_receive(info); bt3c_receive(info);
if (stat & 0x0002) { if (stat & 0x0002) {
//printk("bt3c_cs: ACK %04x\n", stat); //BT_ERR("Ack (stat=0x%04x)", stat);
clear_bit(XMIT_SENDING, &(info->tx_state)); clear_bit(XMIT_SENDING, &(info->tx_state));
bt3c_write_wakeup(info, 1); bt3c_write_wakeup(info, 1);
} }
...@@ -441,7 +441,7 @@ static int bt3c_hci_send_frame(struct sk_buff *skb) ...@@ -441,7 +441,7 @@ static int bt3c_hci_send_frame(struct sk_buff *skb)
struct hci_dev *hdev = (struct hci_dev *)(skb->dev); struct hci_dev *hdev = (struct hci_dev *)(skb->dev);
if (!hdev) { if (!hdev) {
printk(KERN_WARNING "bt3c_cs: Frame for unknown HCI device (hdev=NULL)."); BT_ERR("Frame for unknown HCI device (hdev=NULL)");
return -ENODEV; return -ENODEV;
} }
...@@ -499,7 +499,7 @@ static int bt3c_firmware_load(bt3c_info_t *info) ...@@ -499,7 +499,7 @@ static int bt3c_firmware_load(bt3c_info_t *info)
err = call_usermodehelper(FW_LOADER, argv, envp, 1); err = call_usermodehelper(FW_LOADER, argv, envp, 1);
if (err) if (err)
printk(KERN_WARNING "bt3c_cs: Failed to run \"%s pccard %s\" (errno=%d).\n", FW_LOADER, dev, err); BT_ERR("Failed to run \"%s pccard %s\" (errno=%d)", FW_LOADER, dev, err);
return err; return err;
} }
...@@ -536,7 +536,7 @@ int bt3c_open(bt3c_info_t *info) ...@@ -536,7 +536,7 @@ int bt3c_open(bt3c_info_t *info)
/* Initialize and register HCI device */ /* Initialize and register HCI device */
hdev = hci_alloc_dev(); hdev = hci_alloc_dev();
if (!hdev) { if (!hdev) {
printk(KERN_WARNING "bt3c_cs: Can't allocate HCI device.\n"); BT_ERR("Can't allocate HCI device");
return -ENOMEM; return -ENOMEM;
} }
...@@ -555,7 +555,7 @@ int bt3c_open(bt3c_info_t *info) ...@@ -555,7 +555,7 @@ int bt3c_open(bt3c_info_t *info)
hdev->owner = THIS_MODULE; hdev->owner = THIS_MODULE;
if (hci_register_dev(hdev) < 0) { if (hci_register_dev(hdev) < 0) {
printk(KERN_WARNING "bt3c_cs: Can't register HCI device.\n"); BT_ERR("Can't register HCI device");
hci_free_dev(hdev); hci_free_dev(hdev);
return -ENODEV; return -ENODEV;
} }
...@@ -571,7 +571,7 @@ int bt3c_close(bt3c_info_t *info) ...@@ -571,7 +571,7 @@ int bt3c_close(bt3c_info_t *info)
bt3c_hci_close(hdev); bt3c_hci_close(hdev);
if (hci_unregister_dev(hdev) < 0) if (hci_unregister_dev(hdev) < 0)
printk(KERN_WARNING "bt3c_cs: Can't unregister HCI device %s.\n", hdev->name); BT_ERR("Can't unregister HCI device %s", hdev->name);
hci_free_dev(hdev); hci_free_dev(hdev);
...@@ -769,7 +769,7 @@ void bt3c_config(dev_link_t *link) ...@@ -769,7 +769,7 @@ void bt3c_config(dev_link_t *link)
found_port: found_port:
if (i != CS_SUCCESS) { if (i != CS_SUCCESS) {
printk(KERN_NOTICE "bt3c_cs: No usable port range found. Giving up.\n"); BT_ERR("No usable port range found");
cs_error(link->handle, RequestIO, i); cs_error(link->handle, RequestIO, i);
goto failed; goto failed;
} }
......
...@@ -148,7 +148,7 @@ static int btuart_write(unsigned int iobase, int fifo_size, __u8 *buf, int len) ...@@ -148,7 +148,7 @@ static int btuart_write(unsigned int iobase, int fifo_size, __u8 *buf, int len)
static void btuart_write_wakeup(btuart_info_t *info) static void btuart_write_wakeup(btuart_info_t *info)
{ {
if (!info) { if (!info) {
printk(KERN_WARNING "btuart_cs: Call of write_wakeup for unknown device.\n"); BT_ERR("Unknown device");
return; return;
} }
...@@ -195,7 +195,7 @@ static void btuart_receive(btuart_info_t *info) ...@@ -195,7 +195,7 @@ static void btuart_receive(btuart_info_t *info)
int boguscount = 0; int boguscount = 0;
if (!info) { if (!info) {
printk(KERN_WARNING "btuart_cs: Call of receive for unknown device.\n"); BT_ERR("Unknown device");
return; return;
} }
...@@ -209,7 +209,7 @@ static void btuart_receive(btuart_info_t *info) ...@@ -209,7 +209,7 @@ static void btuart_receive(btuart_info_t *info)
info->rx_state = RECV_WAIT_PACKET_TYPE; info->rx_state = RECV_WAIT_PACKET_TYPE;
info->rx_count = 0; info->rx_count = 0;
if (!(info->rx_skb = bt_skb_alloc(HCI_MAX_FRAME_SIZE, GFP_ATOMIC))) { if (!(info->rx_skb = bt_skb_alloc(HCI_MAX_FRAME_SIZE, GFP_ATOMIC))) {
printk(KERN_WARNING "btuart_cs: Can't allocate mem for new packet.\n"); BT_ERR("Can't allocate mem for new packet");
return; return;
} }
} }
...@@ -238,7 +238,7 @@ static void btuart_receive(btuart_info_t *info) ...@@ -238,7 +238,7 @@ static void btuart_receive(btuart_info_t *info)
default: default:
/* Unknown packet */ /* Unknown packet */
printk(KERN_WARNING "btuart_cs: Unknown HCI packet with type 0x%02x received.\n", info->rx_skb->pkt_type); BT_ERR("Unknown HCI packet with type 0x%02x received", info->rx_skb->pkt_type);
info->hdev->stat.err_rx++; info->hdev->stat.err_rx++;
clear_bit(HCI_RUNNING, &(info->hdev->flags)); clear_bit(HCI_RUNNING, &(info->hdev->flags));
...@@ -309,7 +309,7 @@ static irqreturn_t btuart_interrupt(int irq, void *dev_inst, struct pt_regs *reg ...@@ -309,7 +309,7 @@ static irqreturn_t btuart_interrupt(int irq, void *dev_inst, struct pt_regs *reg
int iir, lsr; int iir, lsr;
if (!info) { if (!info) {
printk(KERN_WARNING "btuart_cs: Call of irq %d for unknown device.\n", irq); BT_ERR("Call of irq %d for unknown device", irq);
return IRQ_NONE; return IRQ_NONE;
} }
...@@ -325,7 +325,7 @@ static irqreturn_t btuart_interrupt(int irq, void *dev_inst, struct pt_regs *reg ...@@ -325,7 +325,7 @@ static irqreturn_t btuart_interrupt(int irq, void *dev_inst, struct pt_regs *reg
switch (iir) { switch (iir) {
case UART_IIR_RLSI: case UART_IIR_RLSI:
printk(KERN_NOTICE "btuart_cs: RLSI\n"); BT_ERR("RLSI");
break; break;
case UART_IIR_RDI: case UART_IIR_RDI:
/* Receive interrupt */ /* Receive interrupt */
...@@ -338,7 +338,7 @@ static irqreturn_t btuart_interrupt(int irq, void *dev_inst, struct pt_regs *reg ...@@ -338,7 +338,7 @@ static irqreturn_t btuart_interrupt(int irq, void *dev_inst, struct pt_regs *reg
} }
break; break;
default: default:
printk(KERN_NOTICE "btuart_cs: Unhandled IIR=%#x\n", iir); BT_ERR("Unhandled IIR=%#x", iir);
break; break;
} }
...@@ -365,7 +365,7 @@ static void btuart_change_speed(btuart_info_t *info, unsigned int speed) ...@@ -365,7 +365,7 @@ static void btuart_change_speed(btuart_info_t *info, unsigned int speed)
int divisor; int divisor;
if (!info) { if (!info) {
printk(KERN_WARNING "btuart_cs: Call of change speed for unknown device.\n"); BT_ERR("Unknown device");
return; return;
} }
...@@ -447,7 +447,7 @@ static int btuart_hci_send_frame(struct sk_buff *skb) ...@@ -447,7 +447,7 @@ static int btuart_hci_send_frame(struct sk_buff *skb)
struct hci_dev *hdev = (struct hci_dev *)(skb->dev); struct hci_dev *hdev = (struct hci_dev *)(skb->dev);
if (!hdev) { if (!hdev) {
printk(KERN_WARNING "btuart_cs: Frame for unknown HCI device (hdev=NULL)."); BT_ERR("Frame for unknown HCI device (hdev=NULL)");
return -ENODEV; return -ENODEV;
} }
...@@ -531,7 +531,7 @@ int btuart_open(btuart_info_t *info) ...@@ -531,7 +531,7 @@ int btuart_open(btuart_info_t *info)
/* Initialize and register HCI device */ /* Initialize and register HCI device */
hdev = hci_alloc_dev(); hdev = hci_alloc_dev();
if (!hdev) { if (!hdev) {
printk(KERN_WARNING "btuart_cs: Can't allocate HCI device.\n"); BT_ERR("Can't allocate HCI device");
return -ENOMEM; return -ENOMEM;
} }
...@@ -550,7 +550,7 @@ int btuart_open(btuart_info_t *info) ...@@ -550,7 +550,7 @@ int btuart_open(btuart_info_t *info)
hdev->owner = THIS_MODULE; hdev->owner = THIS_MODULE;
if (hci_register_dev(hdev) < 0) { if (hci_register_dev(hdev) < 0) {
printk(KERN_WARNING "btuart_cs: Can't register HCI device.\n"); BT_ERR("Can't register HCI device");
hci_free_dev(hdev); hci_free_dev(hdev);
return -ENODEV; return -ENODEV;
} }
...@@ -578,7 +578,7 @@ int btuart_close(btuart_info_t *info) ...@@ -578,7 +578,7 @@ int btuart_close(btuart_info_t *info)
spin_unlock_irqrestore(&(info->lock), flags); spin_unlock_irqrestore(&(info->lock), flags);
if (hci_unregister_dev(hdev) < 0) if (hci_unregister_dev(hdev) < 0)
printk(KERN_WARNING "btuart_cs: Can't unregister HCI device %s.\n", hdev->name); BT_ERR("Can't unregister HCI device %s", hdev->name);
hci_free_dev(hdev); hci_free_dev(hdev);
...@@ -777,7 +777,7 @@ void btuart_config(dev_link_t *link) ...@@ -777,7 +777,7 @@ void btuart_config(dev_link_t *link)
found_port: found_port:
if (i != CS_SUCCESS) { if (i != CS_SUCCESS) {
printk(KERN_NOTICE "btuart_cs: No usable port range found. Giving up.\n"); BT_ERR("No usable port range found");
cs_error(link->handle, RequestIO, i); cs_error(link->handle, RequestIO, i);
goto failed; goto failed;
} }
......
...@@ -150,7 +150,7 @@ static int dtl1_write(unsigned int iobase, int fifo_size, __u8 *buf, int len) ...@@ -150,7 +150,7 @@ static int dtl1_write(unsigned int iobase, int fifo_size, __u8 *buf, int len)
static void dtl1_write_wakeup(dtl1_info_t *info) static void dtl1_write_wakeup(dtl1_info_t *info)
{ {
if (!info) { if (!info) {
printk(KERN_WARNING "dtl1_cs: Call of write_wakeup for unknown device.\n"); BT_ERR("Unknown device");
return; return;
} }
...@@ -201,9 +201,9 @@ static void dtl1_control(dtl1_info_t *info, struct sk_buff *skb) ...@@ -201,9 +201,9 @@ static void dtl1_control(dtl1_info_t *info, struct sk_buff *skb)
u8 flowmask = *(u8 *)skb->data; u8 flowmask = *(u8 *)skb->data;
int i; int i;
printk(KERN_INFO "dtl1_cs: Nokia control data = "); printk(KERN_INFO "Bluetooth: Nokia control data =");
for (i = 0; i < skb->len; i++) { for (i = 0; i < skb->len; i++) {
printk("%02x ", skb->data[i]); printk(" %02x", skb->data[i]);
} }
printk("\n"); printk("\n");
...@@ -226,7 +226,7 @@ static void dtl1_receive(dtl1_info_t *info) ...@@ -226,7 +226,7 @@ static void dtl1_receive(dtl1_info_t *info)
int boguscount = 0; int boguscount = 0;
if (!info) { if (!info) {
printk(KERN_WARNING "dtl1_cs: Call of receive for unknown device.\n"); BT_ERR("Unknown device");
return; return;
} }
...@@ -238,7 +238,7 @@ static void dtl1_receive(dtl1_info_t *info) ...@@ -238,7 +238,7 @@ static void dtl1_receive(dtl1_info_t *info)
/* Allocate packet */ /* Allocate packet */
if (info->rx_skb == NULL) if (info->rx_skb == NULL)
if (!(info->rx_skb = bt_skb_alloc(HCI_MAX_FRAME_SIZE, GFP_ATOMIC))) { if (!(info->rx_skb = bt_skb_alloc(HCI_MAX_FRAME_SIZE, GFP_ATOMIC))) {
printk(KERN_WARNING "dtl1_cs: Can't allocate mem for new packet.\n"); BT_ERR("Can't allocate mem for new packet");
info->rx_state = RECV_WAIT_NSH; info->rx_state = RECV_WAIT_NSH;
info->rx_count = NSHL; info->rx_count = NSHL;
return; return;
...@@ -283,7 +283,7 @@ static void dtl1_receive(dtl1_info_t *info) ...@@ -283,7 +283,7 @@ static void dtl1_receive(dtl1_info_t *info)
break; break;
default: default:
/* unknown packet */ /* unknown packet */
printk(KERN_WARNING "dtl1_cs: Unknown HCI packet with type 0x%02x received.\n", info->rx_skb->pkt_type); BT_ERR("Unknown HCI packet with type 0x%02x received", info->rx_skb->pkt_type);
kfree_skb(info->rx_skb); kfree_skb(info->rx_skb);
break; break;
} }
...@@ -313,7 +313,7 @@ static irqreturn_t dtl1_interrupt(int irq, void *dev_inst, struct pt_regs *regs) ...@@ -313,7 +313,7 @@ static irqreturn_t dtl1_interrupt(int irq, void *dev_inst, struct pt_regs *regs)
int iir, lsr; int iir, lsr;
if (!info) { if (!info) {
printk(KERN_WARNING "dtl1_cs: Call of irq %d for unknown device.\n", irq); BT_ERR("Call of irq %d for unknown device", irq);
return IRQ_NONE; return IRQ_NONE;
} }
...@@ -329,7 +329,7 @@ static irqreturn_t dtl1_interrupt(int irq, void *dev_inst, struct pt_regs *regs) ...@@ -329,7 +329,7 @@ static irqreturn_t dtl1_interrupt(int irq, void *dev_inst, struct pt_regs *regs)
switch (iir) { switch (iir) {
case UART_IIR_RLSI: case UART_IIR_RLSI:
printk(KERN_NOTICE "dtl1_cs: RLSI\n"); BT_ERR("RLSI");
break; break;
case UART_IIR_RDI: case UART_IIR_RDI:
/* Receive interrupt */ /* Receive interrupt */
...@@ -342,7 +342,7 @@ static irqreturn_t dtl1_interrupt(int irq, void *dev_inst, struct pt_regs *regs) ...@@ -342,7 +342,7 @@ static irqreturn_t dtl1_interrupt(int irq, void *dev_inst, struct pt_regs *regs)
} }
break; break;
default: default:
printk(KERN_NOTICE "dtl1_cs: Unhandled IIR=%#x\n", iir); BT_ERR("Unhandled IIR=%#x", iir);
break; break;
} }
...@@ -410,7 +410,7 @@ static int dtl1_hci_send_frame(struct sk_buff *skb) ...@@ -410,7 +410,7 @@ static int dtl1_hci_send_frame(struct sk_buff *skb)
nsh_t nsh; nsh_t nsh;
if (!hdev) { if (!hdev) {
printk(KERN_WARNING "dtl1_cs: Frame for unknown HCI device (hdev=NULL)."); BT_ERR("Frame for unknown HCI device (hdev=NULL)");
return -ENODEV; return -ENODEV;
} }
...@@ -510,7 +510,7 @@ int dtl1_open(dtl1_info_t *info) ...@@ -510,7 +510,7 @@ int dtl1_open(dtl1_info_t *info)
/* Initialize and register HCI device */ /* Initialize and register HCI device */
hdev = hci_alloc_dev(); hdev = hci_alloc_dev();
if (!hdev) { if (!hdev) {
printk(KERN_WARNING "dtl1_cs: Can't allocate HCI device.\n"); BT_ERR("Can't allocate HCI device");
return -ENOMEM; return -ENOMEM;
} }
...@@ -529,7 +529,7 @@ int dtl1_open(dtl1_info_t *info) ...@@ -529,7 +529,7 @@ int dtl1_open(dtl1_info_t *info)
hdev->owner = THIS_MODULE; hdev->owner = THIS_MODULE;
if (hci_register_dev(hdev) < 0) { if (hci_register_dev(hdev) < 0) {
printk(KERN_WARNING "dtl1_cs: Can't register HCI device.\n"); BT_ERR("Can't register HCI device");
hci_free_dev(hdev); hci_free_dev(hdev);
return -ENODEV; return -ENODEV;
} }
...@@ -557,7 +557,7 @@ int dtl1_close(dtl1_info_t *info) ...@@ -557,7 +557,7 @@ int dtl1_close(dtl1_info_t *info)
spin_unlock_irqrestore(&(info->lock), flags); spin_unlock_irqrestore(&(info->lock), flags);
if (hci_unregister_dev(hdev) < 0) if (hci_unregister_dev(hdev) < 0)
printk(KERN_WARNING "dtl1_cs: Can't unregister HCI device %s.\n", hdev->name); BT_ERR("Can't unregister HCI device %s", hdev->name);
hci_free_dev(hdev); hci_free_dev(hdev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment