summaryrefslogtreecommitdiff
path: root/drivers/bluetooth
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2017-10-11 15:46:21 +0200
committerMarcel Holtmann <marcel@holtmann.org>2017-10-11 20:09:37 +0200
commit81a1905382a380beeba201ce41276afd9035dc64 (patch)
treeca5d1786297dd296ff951d9098e5a4274ba9ab55 /drivers/bluetooth
parent18a39b9ab27026b5ba55f135648635ed3a870e44 (diff)
Bluetooth: hci_bcm: fix build error without CONFIG_PM
This was introduced by the rework adding PM support: drivers/bluetooth/hci_bcm.c: In function 'bcm_device_exists': drivers/bluetooth/hci_bcm.c:156:22: error: 'struct bcm_device' has no member named 'hu' if (device && device->hu && device->hu->serdev) ^~ The pointer is not available otherwise, so I'm enclosing all references in an #ifdef here. Fixes: 8a92056837fd ("Bluetooth: hci_bcm: Add (runtime)pm support to the serdev driver") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r--drivers/bluetooth/hci_bcm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c
index 16c2eaaaf72b..c69da0e8b79f 100644
--- a/drivers/bluetooth/hci_bcm.c
+++ b/drivers/bluetooth/hci_bcm.c
@@ -152,9 +152,11 @@ static bool bcm_device_exists(struct bcm_device *device)
{
struct list_head *p;
+#ifdef CONFIG_PM
/* Devices using serdev always exist */
if (device && device->hu && device->hu->serdev)
return true;
+#endif
list_for_each(p, &bcm_device_list) {
struct bcm_device *dev = list_entry(p, struct bcm_device, list);
@@ -973,7 +975,9 @@ static int bcm_serdev_probe(struct serdev_device *serdev)
return -ENOMEM;
bcmdev->dev = &serdev->dev;
+#ifdef CONFIG_PM
bcmdev->hu = &bcmdev->serdev_hu;
+#endif
bcmdev->serdev_hu.serdev = serdev;
serdev_device_set_drvdata(serdev, bcmdev);