1 --- btsco-0.5/kernel/btsco.c.orig 2008-11-05 15:37:14.107515140 +0100
2 +++ btsco-0.5/kernel/btsco.c 2008-11-05 15:37:14.110848272 +0100
3 @@ -719,9 +719,13 @@ static int snd_card_bt_ioctl(struct snd_
4 /* Interrupt any socket operations, so that we may
6 mutex_lock(&bt_sco->sock_sem);
7 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
8 + kill_pid(find_vpid(bt_sco->thread_pid), SIGINT, 1);
10 kill_proc(bt_sco->thread_pid, SIGINT, 1);
12 if (bt_sco->sco_sock) {
13 - dprintk("Disposing of previous socket count %d\n",
14 + dprintk("Disposing of previous socket count %ld\n",
15 file_count(bt_sco->sco_sock->file));
16 /* Extra brackets needed here since sockfd_put is a poorly implemented macro */
17 sockfd_put(((struct socket *)bt_sco->sco_sock));
18 @@ -1112,7 +1116,7 @@ static int snd_card_bt_sco_thread(void *
19 the driver process keeps one, and the app has the socket open.
21 if (file_count(sock->file) != 3) {
22 - dprintk("file_count is %d (expected 3)\n",
23 + dprintk("file_count is %ld (expected 3)\n",
24 file_count(sock->file));
27 @@ -1132,12 +1136,16 @@ static void snd_card_bt_private_free(str
29 dprintk("private_free, killing thread\n");
30 bt_sco->thread_exit = 1;
31 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
32 + kill_pid(find_vpid(bt_sco->thread_pid), SIGTERM, 1);
34 kill_proc(bt_sco->thread_pid, SIGTERM, 1);
36 wait_for_completion(&bt_sco->thread_done);
37 dprintk("private_free, thread exited\n");
39 if (bt_sco->sco_sock) {
40 - dprintk("shutdown: freeing socket count %d\n",
41 + dprintk("shutdown: freeing socket count %ld\n",
42 file_count(bt_sco->sco_sock->file));
44 sockfd_put(((struct socket *)bt_sco->sco_sock));