msp34xx.c (138935) | msp34xx.c (172836) |
---|---|
1/*- 2 * Copyright (c) 1997-2001 Gerd Knorr <kraxel@bytesex.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 1997-2001 Gerd Knorr <kraxel@bytesex.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/sys/dev/bktr/msp34xx.c 138935 2004-12-16 23:19:57Z julian $ | 26 * $FreeBSD: head/sys/dev/bktr/msp34xx.c 172836 2007-10-20 23:23:23Z julian $ |
27 */ 28 29/* 30 * programming the msp34* sound processor family 31 * 32 * (c) 1997-2001 Gerd Knorr <kraxel@bytesex.org> 33 * 34 * what works and what doesn't: --- 859 unchanged lines hidden (view full) --- 894done: 895 dprintk("msp3400: thread: exit\n"); 896 msp->active = 0; 897 898 msp->kthread = NULL; 899 wakeup(&msp->kthread); 900 mtx_unlock(&Giant); 901 | 27 */ 28 29/* 30 * programming the msp34* sound processor family 31 * 32 * (c) 1997-2001 Gerd Knorr <kraxel@bytesex.org> 33 * 34 * what works and what doesn't: --- 859 unchanged lines hidden (view full) --- 894done: 895 dprintk("msp3400: thread: exit\n"); 896 msp->active = 0; 897 898 msp->kthread = NULL; 899 wakeup(&msp->kthread); 900 mtx_unlock(&Giant); 901 |
902 kthread_exit(0); | 902 kproc_exit(0); |
903} 904 905/* ----------------------------------------------------------------------- */ 906/* this one uses the automatic sound standard detection of newer */ 907/* msp34xx chip versions */ 908 909static struct MODES { 910 int retval; --- 210 unchanged lines hidden (view full) --- 1121done: 1122 dprintk("msp3410: thread: exit\n"); 1123 msp->active = 0; 1124 1125 msp->kthread = NULL; 1126 wakeup(&msp->kthread); 1127 mtx_unlock(&Giant); 1128 | 903} 904 905/* ----------------------------------------------------------------------- */ 906/* this one uses the automatic sound standard detection of newer */ 907/* msp34xx chip versions */ 908 909static struct MODES { 910 int retval; --- 210 unchanged lines hidden (view full) --- 1121done: 1122 dprintk("msp3410: thread: exit\n"); 1123 msp->active = 0; 1124 1125 msp->kthread = NULL; 1126 wakeup(&msp->kthread); 1127 mtx_unlock(&Giant); 1128 |
1129 kthread_exit(0); | 1129 kproc_exit(0); |
1130} 1131 1132int msp_attach(bktr_ptr_t bktr) 1133{ 1134 struct msp3400c *msp; 1135 int rev1,rev2,i; 1136 int err; 1137 char buf[20]; --- 54 unchanged lines hidden (view full) --- 1192 if (bootverbose) { 1193 printf("%s: msp34xx: init: chip=%s", bktr_name(bktr), buf); 1194 if (msp->nicam) 1195 printf(", has NICAM support"); 1196 printf("\n"); 1197 } 1198 1199 /* startup control thread */ | 1130} 1131 1132int msp_attach(bktr_ptr_t bktr) 1133{ 1134 struct msp3400c *msp; 1135 int rev1,rev2,i; 1136 int err; 1137 char buf[20]; --- 54 unchanged lines hidden (view full) --- 1192 if (bootverbose) { 1193 printf("%s: msp34xx: init: chip=%s", bktr_name(bktr), buf); 1194 if (msp->nicam) 1195 printf(", has NICAM support"); 1196 printf("\n"); 1197 } 1198 1199 /* startup control thread */ |
1200 err = kthread_create(msp->simple ? msp3410d_thread : msp3400c_thread, | 1200 err = kproc_create(msp->simple ? msp3410d_thread : msp3400c_thread, |
1201 bktr, &msp->kthread, (RFFDG | RFPROC), 0, 1202 msp->threaddesc); 1203 if (err) { | 1201 bktr, &msp->kthread, (RFFDG | RFPROC), 0, 1202 msp->threaddesc); 1203 if (err) { |
1204 printf("%s: Error returned by kthread_create: %d", bktr_name(bktr), err); | 1204 printf("%s: Error returned by kproc_create: %d", bktr_name(bktr), err); |
1205 free(msp->threaddesc, M_DEVBUF); 1206 free(msp, M_DEVBUF); 1207 bktr->msp3400c_info = NULL; 1208 return ENXIO; 1209 } 1210 wakeup(msp->kthread); 1211 1212 /* done */ --- 53 unchanged lines hidden --- | 1205 free(msp->threaddesc, M_DEVBUF); 1206 free(msp, M_DEVBUF); 1207 bktr->msp3400c_info = NULL; 1208 return ENXIO; 1209 } 1210 wakeup(msp->kthread); 1211 1212 /* done */ --- 53 unchanged lines hidden --- |