summaryrefslogtreecommitdiff
path: root/patches/collateral-evolutions/network/16-bluetooth/drivers_bluetooth_hci_ldisc.patch
blob: da96d9996ef4754031917b37c522da499cdef5a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--- a/drivers/bluetooth/hci_ldisc.c
+++ b/drivers/bluetooth/hci_ldisc.c
@@ -290,8 +290,13 @@ static int hci_uart_tty_open(struct tty_
 	/* FIXME: why is this needed. Note don't use ldisc_ref here as the
 	   open path is before the ldisc is referencable */
 
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,30))
 	if (tty->ldisc->ops->flush_buffer)
 		tty->ldisc->ops->flush_buffer(tty);
+#else
+	if (tty->ldisc.ops->flush_buffer)
+		tty->ldisc.ops->flush_buffer(tty);
+#endif
 	tty_driver_flush_buffer(tty);
 
 	return 0;
@@ -520,7 +525,11 @@ static int hci_uart_tty_ioctl(struct tty
 		return hu->hdev_flags;
 
 	default:
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27))
 		err = n_tty_ioctl_helper(tty, file, cmd, arg);
+#else
+		err = n_tty_ioctl(tty, file, cmd, arg);
+#endif
 		break;
 	}