Commit 70a7808b authored by Abhishek Pandit-Subedi's avatar Abhishek Pandit-Subedi Committed by Marcel Holtmann

Bluetooth: btmrvl_sdio: Set parent dev to hdev

Set the correct parent dev when registering hdev. This allows userspace
tools to find the parent device (for example, to set the power/wakeup
property).

Before this change, the path was /sys/devices/virtual/bluetooth/hci0
and after this change, it looks more like:
/sys/bus/mmc/devices/mmc1:0001/mmc1:0001:2/bluetooth/hci0
Signed-off-by: default avatarAbhishek Pandit-Subedi <abhishekpandit@chromium.org>
Reviewed-by: default avatarDouglas Anderson <dianders@chromium.org>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent c453b10c
...@@ -669,6 +669,7 @@ static int btmrvl_service_main_thread(void *data) ...@@ -669,6 +669,7 @@ static int btmrvl_service_main_thread(void *data)
int btmrvl_register_hdev(struct btmrvl_private *priv) int btmrvl_register_hdev(struct btmrvl_private *priv)
{ {
struct hci_dev *hdev = NULL; struct hci_dev *hdev = NULL;
struct btmrvl_sdio_card *card = priv->btmrvl_dev.card;
int ret; int ret;
hdev = hci_alloc_dev(); hdev = hci_alloc_dev();
...@@ -687,6 +688,7 @@ int btmrvl_register_hdev(struct btmrvl_private *priv) ...@@ -687,6 +688,7 @@ int btmrvl_register_hdev(struct btmrvl_private *priv)
hdev->send = btmrvl_send_frame; hdev->send = btmrvl_send_frame;
hdev->setup = btmrvl_setup; hdev->setup = btmrvl_setup;
hdev->set_bdaddr = btmrvl_set_bdaddr; hdev->set_bdaddr = btmrvl_set_bdaddr;
SET_HCIDEV_DEV(hdev, &card->func->dev);
hdev->dev_type = priv->btmrvl_dev.dev_type; hdev->dev_type = priv->btmrvl_dev.dev_type;
......
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