]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: hci_uart: Restore hci_dev->flush callback on open()
authorHans de Goede <hdegoede@redhat.com>
Sun, 27 May 2018 19:04:51 +0000 (21:04 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 30 May 2018 06:46:17 +0000 (08:46 +0200)
commit2ae939c9c04aa2e524ea4b915a32cd4465b16ba7
tree24e60ae102719943d15a3030ef34fef681b8be02
parenteb20101517fca512dd997d6e881a0e8470751ecb
Bluetooth: hci_uart: Restore hci_dev->flush callback on open()

For reasons explained in detail in commit c83007456d92 ("hci_ldisc:
fix null pointer deref") the hci_uart_close() functions sets
hci_dev->flush to NULL.

But the device may be re-opened after a close, this commit restores the
hci_dev->flush callback on open().

Note this commit also moves the nearly empty defition of hci_uart_open()
a bit down in the file to avoid the need for forward declaring
hci_uart_flush().

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/hci_ldisc.c
drivers/bluetooth/hci_serdev.c