From: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
To: Ian Molton <ian@mnementh.co.uk>
Cc: linux-bluetooth@vger.kernel.org, marcel@holtmann.org, ohad@bencohen.org
Subject: Re: [PATCH 2/3] bluetooth: Nokia: Use new hci_uart_unregister_device() function.
Date: Sat, 8 Jul 2017 16:52:13 +0200 [thread overview]
Message-ID: <20170708145213.c2ido62qit2lctmq@earth> (raw)
In-Reply-To: <20170708142949.13496-3-ian@mnementh.co.uk>
[-- Attachment #1: Type: text/plain, Size: 1079 bytes --]
Hi,
On Sat, Jul 08, 2017 at 03:29:48PM +0100, Ian Molton wrote:
> Simplify _remove() path for hci_nokia.c
>
> Signed-off-by: Ian Molton <ian@mnementh.co.uk>
> ---
> drivers/bluetooth/hci_nokia.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/bluetooth/hci_nokia.c b/drivers/bluetooth/hci_nokia.c
> index 6dbb1f6ff6bd..1a465dd2970e 100644
> --- a/drivers/bluetooth/hci_nokia.c
> +++ b/drivers/bluetooth/hci_nokia.c
> @@ -770,11 +770,7 @@ static void nokia_bluetooth_serdev_remove(struct serdev_device *serdev)
> struct hci_uart *hu = &btdev->hu;
> struct hci_dev *hdev = hu->hdev;
>
> -
> - hci_unregister_dev(hdev);
> - hci_free_dev(hdev);
> -
> - cancel_work_sync(&hu->write_work);
> + hci_uart_unregister_device(hdev);
>
> hu->proto->close(hu);
> }
I think "hu->proto->close(hu)" should also be moved into the
helper function. Also I suggest to use hci_uart instead of hci_dev
as parameter for hci_uart_unregister_device, which matches the
related hci_uart_register_device.
-- Sebastian
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2017-07-08 14:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-08 14:29 Further _remove() cleanup for hci_uart drivers Ian Molton
2017-07-08 14:29 ` [PATCH 1/3] bluetooth: Introduce hci_uart_unregister_device() Ian Molton
2017-07-08 14:29 ` [PATCH 2/3] bluetooth: Nokia: Use new hci_uart_unregister_device() function Ian Molton
2017-07-08 14:52 ` Sebastian Reichel [this message]
2017-07-08 14:58 ` Ian Molton
2017-07-08 14:29 ` [PATCH 3/3] bluetooth: hci_ll: " Ian Molton
-- strict thread matches above, loose matches on Subject: below --
2017-07-08 16:37 PATCH (No really this time) - Fix hci_serdev drivers _remove() path Ian Molton
2017-07-08 16:37 ` [PATCH 2/3] bluetooth: Nokia: Use new hci_uart_unregister_device() function Ian Molton
2017-07-08 19:31 ` Sebastian Reichel
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=20170708145213.c2ido62qit2lctmq@earth \
--to=sebastian.reichel@collabora.co.uk \
--cc=ian@mnementh.co.uk \
--cc=linux-bluetooth@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=ohad@bencohen.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