Skip to content

Commit 70a7808

Browse files
apanditholtmann
authored andcommitted
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: Abhishek Pandit-Subedi <[email protected]> Reviewed-by: Douglas Anderson <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
1 parent c453b10 commit 70a7808

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/bluetooth/btmrvl_main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -669,6 +669,7 @@ static int btmrvl_service_main_thread(void *data)
669669
int btmrvl_register_hdev(struct btmrvl_private *priv)
670670
{
671671
struct hci_dev *hdev = NULL;
672+
struct btmrvl_sdio_card *card = priv->btmrvl_dev.card;
672673
int ret;
673674

674675
hdev = hci_alloc_dev();
@@ -687,6 +688,7 @@ int btmrvl_register_hdev(struct btmrvl_private *priv)
687688
hdev->send = btmrvl_send_frame;
688689
hdev->setup = btmrvl_setup;
689690
hdev->set_bdaddr = btmrvl_set_bdaddr;
691+
SET_HCIDEV_DEV(hdev, &card->func->dev);
690692

691693
hdev->dev_type = priv->btmrvl_dev.dev_type;
692694

0 commit comments

Comments
 (0)