]> git.pld-linux.org Git - packages/btsco.git/blob - btsco-2.6.27.patch
- release 42
[packages/btsco.git] / btsco-2.6.27.patch
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
5                  *  change the socket */
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);
9 +#else
10                 kill_proc(bt_sco->thread_pid, SIGINT, 1);
11 +#endif
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.
20                  */
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));
25                 }
26                 fput(sock->file);
27 @@ -1132,12 +1136,16 @@ static void snd_card_bt_private_free(str
28  
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);
33 +#else
34         kill_proc(bt_sco->thread_pid, SIGTERM, 1);
35 +#endif
36         wait_for_completion(&bt_sco->thread_done);
37         dprintk("private_free, thread exited\n");
38  
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));
43  
44                 sockfd_put(((struct socket *)bt_sco->sco_sock));
This page took 0.159802 seconds and 3 git commands to generate.