linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Arnd Bergmann <arnd@arndb.de>,
	Marcel Holtmann <marcel@holtmann.org>,
	Gustavo Padovan <gustavo@padovan.org>,
	Johan Hedberg <johan.hedberg@gmail.com>
Cc: Loic Poulain <loic.poulain@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] Bluetooth: hci_bcm: fix build error without CONFIG_PM
Date: Wed, 11 Oct 2017 16:29:13 +0200	[thread overview]
Message-ID: <e76549b8-f4eb-f7a9-6614-23fb28e6f44a@redhat.com> (raw)
In-Reply-To: <20171011134640.3152236-1-arnd@arndb.de>

Hi,

On 11-10-17 15:46, Arnd Bergmann wrote:
> 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>

I had this on my TODO after the buildbot errors, thank you for fixing
this.

The fix looks good to me:

Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans

> ---
>   drivers/bluetooth/hci_bcm.c | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c
> index ab1455e63b92..089bd0473451 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);
> @@ -965,7 +967,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);
>   
> 

  parent reply	other threads:[~2017-10-11 14:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-11 13:46 [PATCH 1/2] Bluetooth: hci_bcm: fix build error without CONFIG_PM Arnd Bergmann
2017-10-11 13:47 ` [PATCH 2/2] Bluetooth: BT_HCIUART now depends on SERIAL_DEV_BUS Arnd Bergmann
2017-10-11 14:33   ` Hans de Goede
2017-10-11 18:10     ` Marcel Holtmann
2017-10-12  8:27       ` Hans de Goede
     [not found]         ` <0E9ED850-8F65-498C-A4EB-D3413E25CFF7@holtmann.org>
2017-10-13 10:09           ` Johan Hovold
2017-10-13 10:58             ` Hans de Goede
2017-10-11 14:29 ` Hans de Goede [this message]
2017-10-11 18:11 ` [PATCH 1/2] Bluetooth: hci_bcm: fix build error without CONFIG_PM Marcel Holtmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e76549b8-f4eb-f7a9-6614-23fb28e6f44a@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=gustavo@padovan.org \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loic.poulain@gmail.com \
    --cc=marcel@holtmann.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).