From: Marcel Holtmann <marcel@holtmann.org>
To: "Cho, Yu-Chen" <acho@suse.com>
Cc: linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org,
Johan Hedberg <johan.hedberg@gmail.com>,
jlee@suse.com
Subject: Re: [PATCH] btsdio: Do not bind to non-removable BCM43430
Date: Thu, 27 Sep 2018 11:59:08 +0200 [thread overview]
Message-ID: <DE21BFD5-3A79-4D64-9DB1-4A2DCDBBE359@holtmann.org> (raw)
In-Reply-To: <20180927095455.32247-1-acho@suse.com>
Hi Yu-Chen,
> BCM43430 devices soldered onto the PCB (non-removable)
> use an UART connection for bluetooth.
> But also advertise btsdio support on their 3th sdio function.
>
> Signed-off-by: Cho, Yu-Chen <acho@suse.com>
> ---
> drivers/bluetooth/btsdio.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/bluetooth/btsdio.c b/drivers/bluetooth/btsdio.c
> index 20142bc77554..84d23d786ce5 100644
> --- a/drivers/bluetooth/btsdio.c
> +++ b/drivers/bluetooth/btsdio.c
> @@ -297,7 +297,8 @@ static int btsdio_probe(struct sdio_func *func,
> * uart connection for bluetooth, ignore the BT SDIO interface.
> */
> if (func->vendor == SDIO_VENDOR_ID_BROADCOM &&
> - func->device == SDIO_DEVICE_ID_BROADCOM_43341 &&
> + (func->device == SDIO_DEVICE_ID_BROADCOM_43341 ||
> + func->device == SDIO_DEVICE_ID_BROADCOM_43430) &&
> !mmc_card_is_removable(func->card->host))
> return -ENODEV;
This will turn quickly unreadable. Can we turn the func->device test into a switch statement.
if (!mmc_card_is_rem.. && func->vendor == SDIO_ID..) {
switch (func->device) {
case SDIO_DEV..
return -ENODEV;
}
Regards
Marcel
next prev parent reply other threads:[~2018-09-27 9:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-27 9:54 [PATCH] btsdio: Do not bind to non-removable BCM43430 Cho, Yu-Chen
2018-09-27 9:59 ` Marcel Holtmann [this message]
2018-10-02 9:46 ` [PATCH v2] " Cho, Yu-Chen
2018-10-02 9:57 ` Cho, Yu-Chen
2018-10-03 7:00 ` 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=DE21BFD5-3A79-4D64-9DB1-4A2DCDBBE359@holtmann.org \
--to=marcel@holtmann.org \
--cc=acho@suse.com \
--cc=jlee@suse.com \
--cc=johan.hedberg@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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).