[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <DE21BFD5-3A79-4D64-9DB1-4A2DCDBBE359@holtmann.org>
Date: Thu, 27 Sep 2018 11:59:08 +0200
From: Marcel Holtmann <marcel@...tmann.org>
To: "Cho, Yu-Chen" <acho@...e.com>
Cc: linux-bluetooth@...r.kernel.org, linux-kernel@...r.kernel.org,
Johan Hedberg <johan.hedberg@...il.com>, jlee@...e.com
Subject: Re: [PATCH] btsdio: Do not bind to non-removable BCM43430
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@...e.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
Powered by blists - more mailing lists