diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/core/oss/pcm_oss.c | 2 | ||||
-rw-r--r-- | sound/oss/au1550_ac97.c | 2 | ||||
-rw-r--r-- | sound/oss/dmasound/dmasound.h | 4 | ||||
-rw-r--r-- | sound/oss/dmasound/dmasound_atari.c | 4 | ||||
-rw-r--r-- | sound/oss/dmasound/dmasound_core.c | 10 | ||||
-rw-r--r-- | sound/oss/msnd.h | 2 | ||||
-rw-r--r-- | sound/oss/sound_config.h | 20 | ||||
-rw-r--r-- | sound/oss/swarm_cs4297a.c | 2 | ||||
-rw-r--r-- | sound/oss/vwsnd.c | 2 |
9 files changed, 20 insertions, 28 deletions
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c index 1af62b8b86c6..e17836680f49 100644 --- a/sound/core/oss/pcm_oss.c +++ b/sound/core/oss/pcm_oss.c | |||
@@ -2283,7 +2283,7 @@ static int snd_pcm_oss_open_file(struct file *file, | |||
2283 | int idx, err; | 2283 | int idx, err; |
2284 | struct snd_pcm_oss_file *pcm_oss_file; | 2284 | struct snd_pcm_oss_file *pcm_oss_file; |
2285 | struct snd_pcm_substream *substream; | 2285 | struct snd_pcm_substream *substream; |
2286 | unsigned int f_mode = file->f_mode; | 2286 | fmode_t f_mode = file->f_mode; |
2287 | 2287 | ||
2288 | if (rpcm_oss_file) | 2288 | if (rpcm_oss_file) |
2289 | *rpcm_oss_file = NULL; | 2289 | *rpcm_oss_file = NULL; |
diff --git a/sound/oss/au1550_ac97.c b/sound/oss/au1550_ac97.c index 23018a7c063a..81e1f443d094 100644 --- a/sound/oss/au1550_ac97.c +++ b/sound/oss/au1550_ac97.c | |||
@@ -93,7 +93,7 @@ static struct au1550_state { | |||
93 | spinlock_t lock; | 93 | spinlock_t lock; |
94 | struct mutex open_mutex; | 94 | struct mutex open_mutex; |
95 | struct mutex sem; | 95 | struct mutex sem; |
96 | mode_t open_mode; | 96 | fmode_t open_mode; |
97 | wait_queue_head_t open_wait; | 97 | wait_queue_head_t open_wait; |
98 | 98 | ||
99 | struct dmabuf { | 99 | struct dmabuf { |
diff --git a/sound/oss/dmasound/dmasound.h b/sound/oss/dmasound/dmasound.h index d978b0096564..1cb13fe56ec4 100644 --- a/sound/oss/dmasound/dmasound.h +++ b/sound/oss/dmasound/dmasound.h | |||
@@ -129,7 +129,7 @@ typedef struct { | |||
129 | int (*mixer_ioctl)(u_int, u_long); /* optional */ | 129 | int (*mixer_ioctl)(u_int, u_long); /* optional */ |
130 | int (*write_sq_setup)(void); /* optional */ | 130 | int (*write_sq_setup)(void); /* optional */ |
131 | int (*read_sq_setup)(void); /* optional */ | 131 | int (*read_sq_setup)(void); /* optional */ |
132 | int (*sq_open)(mode_t); /* optional */ | 132 | int (*sq_open)(fmode_t); /* optional */ |
133 | int (*state_info)(char *, size_t); /* optional */ | 133 | int (*state_info)(char *, size_t); /* optional */ |
134 | void (*abort_read)(void); /* optional */ | 134 | void (*abort_read)(void); /* optional */ |
135 | int min_dsp_speed; | 135 | int min_dsp_speed; |
@@ -235,7 +235,7 @@ struct sound_queue { | |||
235 | */ | 235 | */ |
236 | int active; | 236 | int active; |
237 | wait_queue_head_t action_queue, open_queue, sync_queue; | 237 | wait_queue_head_t action_queue, open_queue, sync_queue; |
238 | int open_mode; | 238 | fmode_t open_mode; |
239 | int busy, syncing, xruns, died; | 239 | int busy, syncing, xruns, died; |
240 | }; | 240 | }; |
241 | 241 | ||
diff --git a/sound/oss/dmasound/dmasound_atari.c b/sound/oss/dmasound/dmasound_atari.c index 285239d64b82..4d45bd63718b 100644 --- a/sound/oss/dmasound/dmasound_atari.c +++ b/sound/oss/dmasound/dmasound_atari.c | |||
@@ -143,7 +143,7 @@ static int AtaMixerIoctl(u_int cmd, u_long arg); | |||
143 | static int TTMixerIoctl(u_int cmd, u_long arg); | 143 | static int TTMixerIoctl(u_int cmd, u_long arg); |
144 | static int FalconMixerIoctl(u_int cmd, u_long arg); | 144 | static int FalconMixerIoctl(u_int cmd, u_long arg); |
145 | static int AtaWriteSqSetup(void); | 145 | static int AtaWriteSqSetup(void); |
146 | static int AtaSqOpen(mode_t mode); | 146 | static int AtaSqOpen(fmode_t mode); |
147 | static int TTStateInfo(char *buffer, size_t space); | 147 | static int TTStateInfo(char *buffer, size_t space); |
148 | static int FalconStateInfo(char *buffer, size_t space); | 148 | static int FalconStateInfo(char *buffer, size_t space); |
149 | 149 | ||
@@ -1461,7 +1461,7 @@ static int AtaWriteSqSetup(void) | |||
1461 | return 0 ; | 1461 | return 0 ; |
1462 | } | 1462 | } |
1463 | 1463 | ||
1464 | static int AtaSqOpen(mode_t mode) | 1464 | static int AtaSqOpen(fmode_t mode) |
1465 | { | 1465 | { |
1466 | write_sq_ignore_int = 1; | 1466 | write_sq_ignore_int = 1; |
1467 | return 0 ; | 1467 | return 0 ; |
diff --git a/sound/oss/dmasound/dmasound_core.c b/sound/oss/dmasound/dmasound_core.c index 95fc5c681755..b8239f3168fb 100644 --- a/sound/oss/dmasound/dmasound_core.c +++ b/sound/oss/dmasound/dmasound_core.c | |||
@@ -212,7 +212,7 @@ static int irq_installed; | |||
212 | #endif /* MODULE */ | 212 | #endif /* MODULE */ |
213 | 213 | ||
214 | /* control over who can modify resources shared between play/record */ | 214 | /* control over who can modify resources shared between play/record */ |
215 | static mode_t shared_resource_owner; | 215 | static fmode_t shared_resource_owner; |
216 | static int shared_resources_initialised; | 216 | static int shared_resources_initialised; |
217 | 217 | ||
218 | /* | 218 | /* |
@@ -668,7 +668,7 @@ static inline void sq_init_waitqueue(struct sound_queue *sq) | |||
668 | 668 | ||
669 | #if 0 /* blocking open() */ | 669 | #if 0 /* blocking open() */ |
670 | static inline void sq_wake_up(struct sound_queue *sq, struct file *file, | 670 | static inline void sq_wake_up(struct sound_queue *sq, struct file *file, |
671 | mode_t mode) | 671 | fmode_t mode) |
672 | { | 672 | { |
673 | if (file->f_mode & mode) { | 673 | if (file->f_mode & mode) { |
674 | sq->busy = 0; /* CHECK: IS THIS OK??? */ | 674 | sq->busy = 0; /* CHECK: IS THIS OK??? */ |
@@ -677,7 +677,7 @@ static inline void sq_wake_up(struct sound_queue *sq, struct file *file, | |||
677 | } | 677 | } |
678 | #endif | 678 | #endif |
679 | 679 | ||
680 | static int sq_open2(struct sound_queue *sq, struct file *file, mode_t mode, | 680 | static int sq_open2(struct sound_queue *sq, struct file *file, fmode_t mode, |
681 | int numbufs, int bufsize) | 681 | int numbufs, int bufsize) |
682 | { | 682 | { |
683 | int rc = 0; | 683 | int rc = 0; |
@@ -891,10 +891,10 @@ static int sq_release(struct inode *inode, struct file *file) | |||
891 | is the owner - if we have problems. | 891 | is the owner - if we have problems. |
892 | */ | 892 | */ |
893 | 893 | ||
894 | static int shared_resources_are_mine(mode_t md) | 894 | static int shared_resources_are_mine(fmode_t md) |
895 | { | 895 | { |
896 | if (shared_resource_owner) | 896 | if (shared_resource_owner) |
897 | return (shared_resource_owner & md ) ; | 897 | return (shared_resource_owner & md) != 0; |
898 | else { | 898 | else { |
899 | shared_resource_owner = md ; | 899 | shared_resource_owner = md ; |
900 | return 1 ; | 900 | return 1 ; |
diff --git a/sound/oss/msnd.h b/sound/oss/msnd.h index 61b3955481c5..c8be47ec2b7e 100644 --- a/sound/oss/msnd.h +++ b/sound/oss/msnd.h | |||
@@ -211,7 +211,7 @@ typedef struct multisound_dev { | |||
211 | 211 | ||
212 | /* State variables */ | 212 | /* State variables */ |
213 | enum { msndClassic, msndPinnacle } type; | 213 | enum { msndClassic, msndPinnacle } type; |
214 | mode_t mode; | 214 | fmode_t mode; |
215 | unsigned long flags; | 215 | unsigned long flags; |
216 | #define F_RESETTING 0 | 216 | #define F_RESETTING 0 |
217 | #define F_HAVEDIGITAL 1 | 217 | #define F_HAVEDIGITAL 1 |
diff --git a/sound/oss/sound_config.h b/sound/oss/sound_config.h index 1a00a3210616..55271fbe7f49 100644 --- a/sound/oss/sound_config.h +++ b/sound/oss/sound_config.h | |||
@@ -110,24 +110,16 @@ struct channel_info { | |||
110 | #define OPEN_WRITE PCM_ENABLE_OUTPUT | 110 | #define OPEN_WRITE PCM_ENABLE_OUTPUT |
111 | #define OPEN_READWRITE (OPEN_READ|OPEN_WRITE) | 111 | #define OPEN_READWRITE (OPEN_READ|OPEN_WRITE) |
112 | 112 | ||
113 | #if OPEN_READ == FMODE_READ && OPEN_WRITE == FMODE_WRITE | ||
114 | |||
115 | static inline int translate_mode(struct file *file) | ||
116 | { | ||
117 | return file->f_mode; | ||
118 | } | ||
119 | |||
120 | #else | ||
121 | |||
122 | static inline int translate_mode(struct file *file) | 113 | static inline int translate_mode(struct file *file) |
123 | { | 114 | { |
124 | return ((file->f_mode & FMODE_READ) ? OPEN_READ : 0) | | 115 | if (OPEN_READ == (__force int)FMODE_READ && |
125 | ((file->f_mode & FMODE_WRITE) ? OPEN_WRITE : 0); | 116 | OPEN_WRITE == (__force int)FMODE_WRITE) |
117 | return (__force int)(file->f_mode & (FMODE_READ | FMODE_WRITE)); | ||
118 | else | ||
119 | return ((file->f_mode & FMODE_READ) ? OPEN_READ : 0) | | ||
120 | ((file->f_mode & FMODE_WRITE) ? OPEN_WRITE : 0); | ||
126 | } | 121 | } |
127 | 122 | ||
128 | #endif | ||
129 | |||
130 | |||
131 | #include "sound_calls.h" | 123 | #include "sound_calls.h" |
132 | #include "dev_table.h" | 124 | #include "dev_table.h" |
133 | 125 | ||
diff --git a/sound/oss/swarm_cs4297a.c b/sound/oss/swarm_cs4297a.c index 044453a4ee5b..41562ecde5bb 100644 --- a/sound/oss/swarm_cs4297a.c +++ b/sound/oss/swarm_cs4297a.c | |||
@@ -295,7 +295,7 @@ struct cs4297a_state { | |||
295 | struct mutex open_mutex; | 295 | struct mutex open_mutex; |
296 | struct mutex open_sem_adc; | 296 | struct mutex open_sem_adc; |
297 | struct mutex open_sem_dac; | 297 | struct mutex open_sem_dac; |
298 | mode_t open_mode; | 298 | fmode_t open_mode; |
299 | wait_queue_head_t open_wait; | 299 | wait_queue_head_t open_wait; |
300 | wait_queue_head_t open_wait_adc; | 300 | wait_queue_head_t open_wait_adc; |
301 | wait_queue_head_t open_wait_dac; | 301 | wait_queue_head_t open_wait_dac; |
diff --git a/sound/oss/vwsnd.c b/sound/oss/vwsnd.c index dcbb3f739e61..78b8acc7c3b9 100644 --- a/sound/oss/vwsnd.c +++ b/sound/oss/vwsnd.c | |||
@@ -1509,7 +1509,7 @@ typedef struct vwsnd_dev { | |||
1509 | struct mutex open_mutex; | 1509 | struct mutex open_mutex; |
1510 | struct mutex io_mutex; | 1510 | struct mutex io_mutex; |
1511 | struct mutex mix_mutex; | 1511 | struct mutex mix_mutex; |
1512 | mode_t open_mode; | 1512 | fmode_t open_mode; |
1513 | wait_queue_head_t open_wait; | 1513 | wait_queue_head_t open_wait; |
1514 | 1514 | ||
1515 | lithium_t lith; | 1515 | lithium_t lith; |