Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
a1365a10
Commit
a1365a10
authored
Oct 12, 2003
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OSS: fix up MOD_INC and MOD_DEC usages to remove compiler warnings.
parent
0fe75b7e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
24 deletions
+7
-24
sound/oss/ad1889.c
sound/oss/ad1889.c
+2
-4
sound/oss/cs4281/cs4281m.c
sound/oss/cs4281/cs4281m.c
+3
-8
sound/oss/cs46xx.c
sound/oss/cs46xx.c
+0
-6
sound/oss/swarm_cs4297a.c
sound/oss/swarm_cs4297a.c
+2
-6
No files found.
sound/oss/ad1889.c
View file @
a1365a10
...
...
@@ -763,18 +763,17 @@ static int ad1889_open(struct inode *inode, struct file *file)
ad1889_set_wav_rate
(
ad1889_dev
,
44100
);
ad1889_set_wav_fmt
(
ad1889_dev
,
AFMT_S16_LE
);
AD1889_WRITEW
(
ad1889_dev
,
AD_DSWADA
,
0x0404
);
/* attenuation */
MOD_INC_USE_COUNT
;
return
0
;
}
static
int
ad1889_release
(
struct
inode
*
inode
,
struct
file
*
file
)
{
/* if we have state free it here */
MOD_DEC_USE_COUNT
;
return
0
;
}
static
struct
file_operations
ad1889_fops
=
{
.
owner
=
THIS_MODULE
,
.
llseek
=
no_llseek
,
.
read
=
ad1889_read
,
.
write
=
ad1889_write
,
...
...
@@ -792,13 +791,11 @@ static int ad1889_mixer_open(struct inode *inode, struct file *file)
return
-
ENODEV
;
file
->
private_data
=
ad1889_dev
->
ac97_codec
;
MOD_INC_USE_COUNT
;
return
0
;
}
static
int
ad1889_mixer_release
(
struct
inode
*
inode
,
struct
file
*
file
)
{
MOD_DEC_USE_COUNT
;
return
0
;
}
...
...
@@ -810,6 +807,7 @@ static int ad1889_mixer_ioctl(struct inode *inode, struct file *file,
}
static
struct
file_operations
ad1889_mixer_fops
=
{
.
owner
=
THIS_MODULE
,
.
llseek
=
no_llseek
,
.
ioctl
=
ad1889_mixer_ioctl
,
.
open
=
ad1889_mixer_open
,
...
...
sound/oss/cs4281/cs4281m.c
View file @
a1365a10
...
...
@@ -2588,7 +2588,6 @@ static int cs4281_open_mixdev(struct inode *inode, struct file *file)
}
VALIDATE_STATE
(
s
);
file
->
private_data
=
s
;
MOD_INC_USE_COUNT
;
CS_DBGOUT
(
CS_FUNCTION
|
CS_OPEN
,
4
,
printk
(
KERN_INFO
"cs4281: cs4281_open_mixdev()- 0
\n
"
));
...
...
@@ -2603,7 +2602,6 @@ static int cs4281_release_mixdev(struct inode *inode, struct file *file)
(
struct
cs4281_state
*
)
file
->
private_data
;
VALIDATE_STATE
(
s
);
MOD_DEC_USE_COUNT
;
return
0
;
}
...
...
@@ -2620,6 +2618,7 @@ static int cs4281_ioctl_mixdev(struct inode *inode, struct file *file,
// Mixer file operations struct.
// ******************************************************************************************
static
/*const */
struct
file_operations
cs4281_mixer_fops
=
{
.
owner
=
THIS_MODULE
,
.
llseek
=
no_llseek
,
.
ioctl
=
cs4281_ioctl_mixdev
,
.
open
=
cs4281_open_mixdev
,
...
...
@@ -3607,7 +3606,6 @@ static int cs4281_release(struct inode *inode, struct file *file)
s
->
open_mode
&=
~
FMODE_WRITE
;
up
(
&
s
->
open_sem_dac
);
wake_up
(
&
s
->
open_wait_dac
);
MOD_DEC_USE_COUNT
;
}
if
(
file
->
f_mode
&
FMODE_READ
)
{
drain_adc
(
s
,
file
->
f_flags
&
O_NONBLOCK
);
...
...
@@ -3617,7 +3615,6 @@ static int cs4281_release(struct inode *inode, struct file *file)
s
->
open_mode
&=
~
FMODE_READ
;
up
(
&
s
->
open_sem_adc
);
wake_up
(
&
s
->
open_wait_adc
);
MOD_DEC_USE_COUNT
;
}
return
0
;
}
...
...
@@ -3697,7 +3694,6 @@ static int cs4281_open(struct inode *inode, struct file *file)
s
->
dma_adc
.
ossfragshift
=
s
->
dma_adc
.
ossmaxfrags
=
s
->
dma_adc
.
subdivision
=
0
;
up
(
&
s
->
open_sem_adc
);
MOD_INC_USE_COUNT
;
if
(
prog_dmabuf_adc
(
s
))
{
CS_DBGOUT
(
CS_OPEN
|
CS_ERROR
,
2
,
printk
(
KERN_ERR
...
...
@@ -3718,7 +3714,6 @@ static int cs4281_open(struct inode *inode, struct file *file)
s
->
dma_dac
.
ossfragshift
=
s
->
dma_dac
.
ossmaxfrags
=
s
->
dma_dac
.
subdivision
=
0
;
up
(
&
s
->
open_sem_dac
);
MOD_INC_USE_COUNT
;
if
(
prog_dmabuf_dac
(
s
))
{
CS_DBGOUT
(
CS_OPEN
|
CS_ERROR
,
2
,
printk
(
KERN_ERR
...
...
@@ -3738,6 +3733,7 @@ static int cs4281_open(struct inode *inode, struct file *file)
// Wave (audio) file operations struct.
// ******************************************************************************************
static
/*const */
struct
file_operations
cs4281_audio_fops
=
{
.
owner
=
THIS_MODULE
,
.
llseek
=
no_llseek
,
.
read
=
cs4281_read
,
.
write
=
cs4281_write
,
...
...
@@ -4029,7 +4025,6 @@ static int cs4281_midi_open(struct inode *inode, struct file *file)
f_mode
<<
FMODE_MIDI_SHIFT
)
&
(
FMODE_MIDI_READ
|
FMODE_MIDI_WRITE
);
up
(
&
s
->
open_sem
);
MOD_INC_USE_COUNT
;
return
0
;
}
...
...
@@ -4080,7 +4075,6 @@ static int cs4281_midi_release(struct inode *inode, struct file *file)
spin_unlock_irqrestore
(
&
s
->
lock
,
flags
);
up
(
&
s
->
open_sem
);
wake_up
(
&
s
->
open_wait
);
MOD_DEC_USE_COUNT
;
return
0
;
}
...
...
@@ -4088,6 +4082,7 @@ static int cs4281_midi_release(struct inode *inode, struct file *file)
// Midi file operations struct.
// ******************************************************************************************
static
/*const */
struct
file_operations
cs4281_midi_fops
=
{
.
owner
=
THIS_MODULE
,
.
llseek
=
no_llseek
,
.
read
=
cs4281_midi_read
,
.
write
=
cs4281_midi_write
,
...
...
sound/oss/cs46xx.c
View file @
a1365a10
...
...
@@ -1890,7 +1890,6 @@ static int cs_midi_open(struct inode *inode, struct file *file)
spin_unlock_irqrestore
(
&
card
->
midi
.
lock
,
flags
);
card
->
midi
.
open_mode
|=
(
file
->
f_mode
&
(
FMODE_READ
|
FMODE_WRITE
));
up
(
&
card
->
midi
.
open_sem
);
MOD_INC_USE_COUNT
;
/* for 2.2 */
return
0
;
}
...
...
@@ -1926,7 +1925,6 @@ static int cs_midi_release(struct inode *inode, struct file *file)
card
->
midi
.
open_mode
&=
(
~
(
file
->
f_mode
&
(
FMODE_READ
|
FMODE_WRITE
)));
up
(
&
card
->
midi
.
open_sem
);
wake_up
(
&
card
->
midi
.
open_wait
);
MOD_DEC_USE_COUNT
;
/* for 2.2 */
return
0
;
}
...
...
@@ -3370,7 +3368,6 @@ static int cs_open(struct inode *inode, struct file *file)
if
((
ret
=
prog_dmabuf
(
state
)))
return
ret
;
}
MOD_INC_USE_COUNT
;
/* for 2.2 */
CS_DBGOUT
(
CS_OPEN
|
CS_FUNCTION
,
2
,
printk
(
"cs46xx: cs_open()- 0
\n
"
)
);
return
0
;
}
...
...
@@ -3457,7 +3454,6 @@ static int cs_release(struct inode *inode, struct file *file)
}
CS_DBGOUT
(
CS_FUNCTION
|
CS_RELEASE
,
2
,
printk
(
"cs46xx: cs_release()- 0
\n
"
)
);
MOD_DEC_USE_COUNT
;
/* For 2.2 */
return
0
;
}
...
...
@@ -4105,7 +4101,6 @@ static int cs_open_mixdev(struct inode *inode, struct file *file)
}
card
->
amplifier_ctrl
(
card
,
1
);
CS_INC_USE_COUNT
(
&
card
->
mixer_use_cnt
);
MOD_INC_USE_COUNT
;
/* for 2.2 */
CS_DBGOUT
(
CS_FUNCTION
|
CS_OPEN
,
4
,
printk
(
KERN_INFO
"cs46xx: cs_open_mixdev()- 0
\n
"
));
return
0
;
...
...
@@ -4136,7 +4131,6 @@ static int cs_release_mixdev(struct inode *inode, struct file *file)
return
-
ENODEV
;
}
match:
MOD_DEC_USE_COUNT
;
/* for 2.2 */
if
(
!
CS_DEC_AND_TEST
(
&
card
->
mixer_use_cnt
))
{
CS_DBGOUT
(
CS_FUNCTION
|
CS_RELEASE
,
4
,
...
...
sound/oss/swarm_cs4297a.c
View file @
a1365a10
...
...
@@ -1557,7 +1557,6 @@ static int cs4297a_open_mixdev(struct inode *inode, struct file *file)
}
VALIDATE_STATE
(
s
);
file
->
private_data
=
s
;
MOD_INC_USE_COUNT
;
CS_DBGOUT
(
CS_FUNCTION
|
CS_OPEN
,
4
,
printk
(
KERN_INFO
"cs4297a: cs4297a_open_mixdev()- 0
\n
"
));
...
...
@@ -1572,7 +1571,6 @@ static int cs4297a_release_mixdev(struct inode *inode, struct file *file)
(
struct
cs4297a_state
*
)
file
->
private_data
;
VALIDATE_STATE
(
s
);
MOD_DEC_USE_COUNT
;
return
0
;
}
...
...
@@ -1589,6 +1587,7 @@ static int cs4297a_ioctl_mixdev(struct inode *inode, struct file *file,
// Mixer file operations struct.
// ******************************************************************************************
static
/*const */
struct
file_operations
cs4297a_mixer_fops
=
{
.
owner
=
THIS_MODULE
,
.
llseek
=
cs4297a_llseek
,
.
ioctl
=
cs4297a_ioctl_mixdev
,
.
open
=
cs4297a_open_mixdev
,
...
...
@@ -2368,7 +2367,6 @@ static int cs4297a_release(struct inode *inode, struct file *file)
s
->
open_mode
&=
~
FMODE_WRITE
;
up
(
&
s
->
open_sem_dac
);
wake_up
(
&
s
->
open_wait_dac
);
MOD_DEC_USE_COUNT
;
}
if
(
file
->
f_mode
&
FMODE_READ
)
{
drain_adc
(
s
,
file
->
f_flags
&
O_NONBLOCK
);
...
...
@@ -2378,7 +2376,6 @@ static int cs4297a_release(struct inode *inode, struct file *file)
s
->
open_mode
&=
~
FMODE_READ
;
up
(
&
s
->
open_sem_adc
);
wake_up
(
&
s
->
open_wait_adc
);
MOD_DEC_USE_COUNT
;
}
return
0
;
}
...
...
@@ -2469,7 +2466,6 @@ static int cs4297a_open(struct inode *inode, struct file *file)
s
->
dma_adc
.
ossfragshift
=
s
->
dma_adc
.
ossmaxfrags
=
s
->
dma_adc
.
subdivision
=
0
;
up
(
&
s
->
open_sem_adc
);
MOD_INC_USE_COUNT
;
if
(
prog_dmabuf_adc
(
s
))
{
CS_DBGOUT
(
CS_OPEN
|
CS_ERROR
,
2
,
printk
(
KERN_ERR
...
...
@@ -2488,7 +2484,6 @@ static int cs4297a_open(struct inode *inode, struct file *file)
s
->
dma_dac
.
ossfragshift
=
s
->
dma_dac
.
ossmaxfrags
=
s
->
dma_dac
.
subdivision
=
0
;
up
(
&
s
->
open_sem_dac
);
MOD_INC_USE_COUNT
;
if
(
prog_dmabuf_dac
(
s
))
{
CS_DBGOUT
(
CS_OPEN
|
CS_ERROR
,
2
,
printk
(
KERN_ERR
...
...
@@ -2507,6 +2502,7 @@ static int cs4297a_open(struct inode *inode, struct file *file)
// Wave (audio) file operations struct.
// ******************************************************************************************
static
/*const */
struct
file_operations
cs4297a_audio_fops
=
{
.
owner
=
THIS_MODULE
,
.
llseek
=
cs4297a_llseek
,
.
read
=
cs4297a_read
,
.
write
=
cs4297a_write
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment