diff options
author | Philippe Langlais <philippe.langlais@linaro.org> | 2012-04-19 16:11:04 +0200 |
---|---|---|
committer | Philippe Langlais <philippe.langlais@stericsson.com> | 2012-05-22 11:05:59 +0200 |
commit | c6edd75a89500109ee7a6baf929ac8748b077124 (patch) | |
tree | 6be7308f1e17cb19950eb880adadfca79277ab9a /drivers/staging/cg2900/bluetooth/btcg2900.c | |
parent | ba08cf9a2e31b5b2f5949eb2536f0ff78b11214a (diff) |
cg2900: bluetooth: Porting onto new 3.4 API
Now, there is a FIXME, due to destruct() ops removing.
Signed-off-by: Philippe Langlais <philippe.langlais@linaro.org>
Diffstat (limited to 'drivers/staging/cg2900/bluetooth/btcg2900.c')
-rw-r--r-- | drivers/staging/cg2900/bluetooth/btcg2900.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/staging/cg2900/bluetooth/btcg2900.c b/drivers/staging/cg2900/bluetooth/btcg2900.c index cfeeb4a23c9..cebd5872222 100644 --- a/drivers/staging/cg2900/bluetooth/btcg2900.c +++ b/drivers/staging/cg2900/bluetooth/btcg2900.c @@ -540,7 +540,7 @@ static int btcg2900_open(struct hci_dev *hdev) return -EINVAL; } - info = (struct btcg2900_info *)hdev->driver_data; + info = hci_get_drvdata(hdev); if (!info) { BT_ERR(NAME "NULL supplied for driver_data"); return -EINVAL; @@ -626,7 +626,7 @@ static int btcg2900_close(struct hci_dev *hdev) return -EINVAL; } - info = (struct btcg2900_info *)hdev->driver_data; + info = hci_get_drvdata(hdev); if (!info) { BT_ERR(NAME "NULL supplied for driver_data"); return -EINVAL; @@ -689,7 +689,7 @@ static int btcg2900_send(struct sk_buff *skb) return -EINVAL; } - info = (struct btcg2900_info *)hdev->driver_data; + info = hci_get_drvdata(hdev); if (!info) { BT_ERR(NAME "NULL supplied for info"); return -EINVAL; @@ -733,7 +733,7 @@ static void btcg2900_destruct(struct hci_dev *hdev) BT_DBG("btcg2900_destruct"); - info = hdev->driver_data; + info = hci_get_drvdata(hdev); if (!info) { BT_ERR(NAME "NULL supplied for info"); return; @@ -849,12 +849,13 @@ static int register_bluetooth(struct btcg2900_info *info) SET_HCIDEV_DEV(info->hdev, info->parent); info->hdev->bus = pf_data->channel_data.bt_bus; - info->hdev->driver_data = info; - info->hdev->owner = THIS_MODULE; + hci_set_drvdata(info->hdev, info); info->hdev->open = btcg2900_open; info->hdev->close = btcg2900_close; info->hdev->send = btcg2900_send; - info->hdev->destruct = btcg2900_destruct; + /* FIXME no more destruct move this management somewhere + * info->hdev->destruct = btcg2900_destruct; + */ err = hci_register_dev(info->hdev); if (err) { @@ -1048,7 +1049,7 @@ static int remove_common(struct platform_device *pdev, goto finished; BT_INFO("Unregistering CG2900"); - info->hdev->driver_data = NULL; + hci_set_drvdata(info->hdev, NULL); hci_unregister_dev(info->hdev); hci_free_dev(info->hdev); info->hdev = NULL; |