]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
Bluetooth: btmrvl: add setup handler
authorAmitkumar Karwar <akarwar@marvell.com>
Tue, 1 Oct 2013 19:19:14 +0000 (12:19 -0700)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 2 Oct 2013 07:36:16 +0000 (00:36 -0700)
Move initialization code to hdev's setup handler.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/btmrvl_main.c
drivers/bluetooth/btmrvl_sdio.c

index a4da7c830b1218021d5f3a888fa0de3330407865..e0ae1f4ea4062eb53f8d891c61d79c59c5a2eaf4 100644 (file)
@@ -432,6 +432,21 @@ static int btmrvl_open(struct hci_dev *hdev)
        return 0;
 }
 
+static int btmrvl_setup(struct hci_dev *hdev)
+{
+       struct btmrvl_private *priv = hci_get_drvdata(hdev);
+
+       btmrvl_send_module_cfg_cmd(priv, MODULE_BRINGUP_REQ);
+
+       priv->btmrvl_dev.psmode = 1;
+       btmrvl_enable_ps(priv);
+
+       priv->btmrvl_dev.gpio_gap = 0xffff;
+       btmrvl_send_hscfg_cmd(priv);
+
+       return 0;
+}
+
 /*
  * This function handles the event generated by firmware, rx data
  * received from firmware, and tx data sent from kernel.
@@ -525,8 +540,7 @@ int btmrvl_register_hdev(struct btmrvl_private *priv)
        hdev->flush = btmrvl_flush;
        hdev->send = btmrvl_send_frame;
        hdev->ioctl = btmrvl_ioctl;
-
-       btmrvl_send_module_cfg_cmd(priv, MODULE_BRINGUP_REQ);
+       hdev->setup = btmrvl_setup;
 
        hdev->dev_type = priv->btmrvl_dev.dev_type;
 
index 00da6df9f71edfcd6f92acbe70129af5ec62e0bf..5b70bcb38a5ec81e1cab96029e24222e85c7a704 100644 (file)
@@ -1046,12 +1046,6 @@ static int btmrvl_sdio_probe(struct sdio_func *func,
                goto disable_host_int;
        }
 
-       priv->btmrvl_dev.psmode = 1;
-       btmrvl_enable_ps(priv);
-
-       priv->btmrvl_dev.gpio_gap = 0xffff;
-       btmrvl_send_hscfg_cmd(priv);
-
        return 0;
 
 disable_host_int: