Skip to content

Commit 81a1905

Browse files
arndbholtmann
authored andcommitted
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: 8a92056 ("Bluetooth: hci_bcm: Add (runtime)pm support to the serdev driver") Signed-off-by: Arnd Bergmann <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
1 parent 18a39b9 commit 81a1905

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/bluetooth/hci_bcm.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,11 @@ static bool bcm_device_exists(struct bcm_device *device)
152152
{
153153
struct list_head *p;
154154

155+
#ifdef CONFIG_PM
155156
/* Devices using serdev always exist */
156157
if (device && device->hu && device->hu->serdev)
157158
return true;
159+
#endif
158160

159161
list_for_each(p, &bcm_device_list) {
160162
struct bcm_device *dev = list_entry(p, struct bcm_device, list);
@@ -973,7 +975,9 @@ static int bcm_serdev_probe(struct serdev_device *serdev)
973975
return -ENOMEM;
974976

975977
bcmdev->dev = &serdev->dev;
978+
#ifdef CONFIG_PM
976979
bcmdev->hu = &bcmdev->serdev_hu;
980+
#endif
977981
bcmdev->serdev_hu.serdev = serdev;
978982
serdev_device_set_drvdata(serdev, bcmdev);
979983

0 commit comments

Comments
 (0)