Lines 33-38
Link Here
|
33 |
#define SNDRV_GET_ID |
33 |
#define SNDRV_GET_ID |
34 |
#include <sound/initval.h> |
34 |
#include <sound/initval.h> |
35 |
#include <linux/delay.h> |
35 |
#include <linux/delay.h> |
|
|
36 |
#include <asm/atomic.h> |
36 |
|
37 |
|
37 |
#define SNDRV_SERIAL_MAX_OUTS 16 /* min 16 */ |
38 |
#define SNDRV_SERIAL_MAX_OUTS 16 /* min 16 */ |
38 |
#define TX_BUF_SIZE 256 |
39 |
#define TX_BUF_SIZE 256 |
Lines 155-161
Link Here
|
155 |
retval = -EIO; |
156 |
retval = -EIO; |
156 |
goto __end; |
157 |
goto __end; |
157 |
} |
158 |
} |
158 |
if (tty->count > 1) { |
159 |
/* tty->count may have changed from int to atomic_t. */ |
|
|
160 |
/* There is no preprocessor test, so use an ugly cast as a */ |
161 |
/* temporary workaround. */ |
162 |
/* Warning: Assumes int and atomic_t are bit-identical! */ |
163 |
if (atomic_read((atomic_t *)&tty->count) > 1) { |
159 |
snd_printk(KERN_ERR "tty %s is already used", serial->sdev); |
164 |
snd_printk(KERN_ERR "tty %s is already used", serial->sdev); |
160 |
retval = -EBUSY; |
165 |
retval = -EBUSY; |
161 |
goto __end; |
166 |
goto __end; |