Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm...
[linux-2.6-microblaze.git] / drivers / bluetooth / hci_h5.c
index ec0fa77..3455cec 100644 (file)
@@ -511,10 +511,10 @@ static void h5_reset_rx(struct h5 *h5)
        clear_bit(H5_RX_ESC, &h5->flags);
 }
 
-static int h5_recv(struct hci_uart *hu, void *data, int count)
+static int h5_recv(struct hci_uart *hu, const void *data, int count)
 {
        struct h5 *h5 = hu->priv;
-       unsigned char *ptr = data;
+       const unsigned char *ptr = data;
 
        BT_DBG("%s pending %zu count %d", hu->hdev->name, h5->rx_pending,
               count);
@@ -743,8 +743,9 @@ static int h5_flush(struct hci_uart *hu)
        return 0;
 }
 
-static struct hci_uart_proto h5p = {
+static const struct hci_uart_proto h5p = {
        .id             = HCI_UART_3WIRE,
+       .name           = "Three-wire (H5)",
        .open           = h5_open,
        .close          = h5_close,
        .recv           = h5_recv,
@@ -755,14 +756,7 @@ static struct hci_uart_proto h5p = {
 
 int __init h5_init(void)
 {
-       int err = hci_uart_register_proto(&h5p);
-
-       if (!err)
-               BT_INFO("HCI Three-wire UART (H5) protocol initialized");
-       else
-               BT_ERR("HCI Three-wire UART (H5) protocol init failed");
-
-       return err;
+       return hci_uart_register_proto(&h5p);
 }
 
 int __exit h5_deinit(void)