Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[Bluetooth] Code cleanup for the HCI UART driver

This patch cleans up the Bluetooth HCI UART driver a bit.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>

authored by

Marcel Holtmann and committed by
David S. Miller
7785162c 62ae1591

+5 -8
+5 -8
drivers/bluetooth/hci_ldisc.c
··· 241 241 242 242 static void hci_uart_destruct(struct hci_dev *hdev) 243 243 { 244 - struct hci_uart *hu; 245 - 246 244 if (!hdev) 247 245 return; 248 246 249 247 BT_DBG("%s", hdev->name); 250 - 251 - hu = (struct hci_uart *) hdev->driver_data; 252 - kfree(hu); 248 + kfree(hdev->driver_data); 253 249 } 254 250 255 251 /* ------ LDISC part ------ */ ··· 268 272 return -EEXIST; 269 273 270 274 if (!(hu = kzalloc(sizeof(struct hci_uart), GFP_KERNEL))) { 271 - BT_ERR("Can't allocate controll structure"); 275 + BT_ERR("Can't allocate control structure"); 272 276 return -ENFILE; 273 277 } 274 278 ··· 356 360 * 357 361 * Return Value: None 358 362 */ 359 - static void hci_uart_tty_receive(struct tty_struct *tty, const __u8 *data, char *flags, int count) 363 + static void hci_uart_tty_receive(struct tty_struct *tty, const u8 *data, char *flags, int count) 360 364 { 361 365 struct hci_uart *hu = (void *)tty->disc_data; 362 366 ··· 371 375 hu->hdev->stat.byte_rx += count; 372 376 spin_unlock(&hu->rx_lock); 373 377 374 - if (test_and_clear_bit(TTY_THROTTLED,&tty->flags) && tty->driver->unthrottle) 378 + if (test_and_clear_bit(TTY_THROTTLED, &tty->flags) && 379 + tty->driver->unthrottle) 375 380 tty->driver->unthrottle(tty); 376 381 } 377 382