Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci-2.6.23
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci-2.6.23
Commits
619e666b
Commit
619e666b
authored
Mar 23, 2005
by
gregkh@suse.de
Committed by
Greg Kroah-Hartman
Jun 20, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] class: convert sound/* to use the new class api instead of class_simple
Signed-off-by:
Greg Kroah-Hartman
<
gregkh@suse.de
>
parent
8561b10f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
18 deletions
+17
-18
sound/core/sound.c
sound/core/sound.c
+3
-3
sound/oss/soundcard.c
sound/oss/soundcard.c
+9
-10
sound/sound_core.c
sound/sound_core.c
+5
-5
No files found.
sound/core/sound.c
View file @
619e666b
...
@@ -64,7 +64,7 @@ static struct list_head snd_minors_hash[SNDRV_CARDS];
...
@@ -64,7 +64,7 @@ static struct list_head snd_minors_hash[SNDRV_CARDS];
static
DECLARE_MUTEX
(
sound_mutex
);
static
DECLARE_MUTEX
(
sound_mutex
);
extern
struct
class
_simple
*
sound_class
;
extern
struct
class
*
sound_class
;
#ifdef CONFIG_KMOD
#ifdef CONFIG_KMOD
...
@@ -231,7 +231,7 @@ int snd_register_device(int type, snd_card_t * card, int dev, snd_minor_t * reg,
...
@@ -231,7 +231,7 @@ int snd_register_device(int type, snd_card_t * card, int dev, snd_minor_t * reg,
devfs_mk_cdev
(
MKDEV
(
major
,
minor
),
S_IFCHR
|
device_mode
,
"snd/%s"
,
name
);
devfs_mk_cdev
(
MKDEV
(
major
,
minor
),
S_IFCHR
|
device_mode
,
"snd/%s"
,
name
);
if
(
card
)
if
(
card
)
device
=
card
->
dev
;
device
=
card
->
dev
;
class_
simple_device_add
(
sound_class
,
MKDEV
(
major
,
minor
),
device
,
name
);
class_
device_create
(
sound_class
,
MKDEV
(
major
,
minor
),
device
,
"%s"
,
name
);
up
(
&
sound_mutex
);
up
(
&
sound_mutex
);
return
0
;
return
0
;
...
@@ -263,7 +263,7 @@ int snd_unregister_device(int type, snd_card_t * card, int dev)
...
@@ -263,7 +263,7 @@ int snd_unregister_device(int type, snd_card_t * card, int dev)
if
(
strncmp
(
mptr
->
name
,
"controlC"
,
8
)
||
card
->
number
>=
cards_limit
)
/* created in sound.c */
if
(
strncmp
(
mptr
->
name
,
"controlC"
,
8
)
||
card
->
number
>=
cards_limit
)
/* created in sound.c */
devfs_remove
(
"snd/%s"
,
mptr
->
name
);
devfs_remove
(
"snd/%s"
,
mptr
->
name
);
class_
simple_device_remove
(
MKDEV
(
major
,
minor
));
class_
device_destroy
(
sound_class
,
MKDEV
(
major
,
minor
));
list_del
(
&
mptr
->
list
);
list_del
(
&
mptr
->
list
);
up
(
&
sound_mutex
);
up
(
&
sound_mutex
);
...
...
sound/oss/soundcard.c
View file @
619e666b
...
@@ -73,7 +73,7 @@ static char dma_alloc_map[MAX_DMA_CHANNELS];
...
@@ -73,7 +73,7 @@ static char dma_alloc_map[MAX_DMA_CHANNELS];
unsigned
long
seq_time
=
0
;
/* Time for /dev/sequencer */
unsigned
long
seq_time
=
0
;
/* Time for /dev/sequencer */
extern
struct
class
_simple
*
sound_class
;
extern
struct
class
*
sound_class
;
/*
/*
* Table for configurable mixer volume handling
* Table for configurable mixer volume handling
...
@@ -567,7 +567,7 @@ static int __init oss_init(void)
...
@@ -567,7 +567,7 @@ static int __init oss_init(void)
devfs_mk_cdev
(
MKDEV
(
SOUND_MAJOR
,
dev_list
[
i
].
minor
),
devfs_mk_cdev
(
MKDEV
(
SOUND_MAJOR
,
dev_list
[
i
].
minor
),
S_IFCHR
|
dev_list
[
i
].
mode
,
S_IFCHR
|
dev_list
[
i
].
mode
,
"sound/%s"
,
dev_list
[
i
].
name
);
"sound/%s"
,
dev_list
[
i
].
name
);
class_
simple_device_add
(
sound_class
,
class_
device_create
(
sound_class
,
MKDEV
(
SOUND_MAJOR
,
dev_list
[
i
].
minor
),
MKDEV
(
SOUND_MAJOR
,
dev_list
[
i
].
minor
),
NULL
,
"%s"
,
dev_list
[
i
].
name
);
NULL
,
"%s"
,
dev_list
[
i
].
name
);
...
@@ -579,10 +579,9 @@ static int __init oss_init(void)
...
@@ -579,10 +579,9 @@ static int __init oss_init(void)
dev_list
[
i
].
minor
+
(
j
*
0x10
)),
dev_list
[
i
].
minor
+
(
j
*
0x10
)),
S_IFCHR
|
dev_list
[
i
].
mode
,
S_IFCHR
|
dev_list
[
i
].
mode
,
"sound/%s%d"
,
dev_list
[
i
].
name
,
j
);
"sound/%s%d"
,
dev_list
[
i
].
name
,
j
);
class_
simple_device_add
(
sound_class
,
class_
device_create
(
sound_class
,
MKDEV
(
SOUND_MAJOR
,
dev_list
[
i
].
minor
+
(
j
*
0x10
)),
MKDEV
(
SOUND_MAJOR
,
dev_list
[
i
].
minor
+
(
j
*
0x10
)),
NULL
,
NULL
,
"%s%d"
,
dev_list
[
i
].
name
,
j
);
"%s%d"
,
dev_list
[
i
].
name
,
j
);
}
}
}
}
...
@@ -598,12 +597,12 @@ static void __exit oss_cleanup(void)
...
@@ -598,12 +597,12 @@ static void __exit oss_cleanup(void)
for
(
i
=
0
;
i
<
sizeof
(
dev_list
)
/
sizeof
*
dev_list
;
i
++
)
{
for
(
i
=
0
;
i
<
sizeof
(
dev_list
)
/
sizeof
*
dev_list
;
i
++
)
{
devfs_remove
(
"sound/%s"
,
dev_list
[
i
].
name
);
devfs_remove
(
"sound/%s"
,
dev_list
[
i
].
name
);
class_
simple_device_remove
(
MKDEV
(
SOUND_MAJOR
,
dev_list
[
i
].
minor
));
class_
device_destroy
(
sound_class
,
MKDEV
(
SOUND_MAJOR
,
dev_list
[
i
].
minor
));
if
(
!
dev_list
[
i
].
num
)
if
(
!
dev_list
[
i
].
num
)
continue
;
continue
;
for
(
j
=
1
;
j
<
*
dev_list
[
i
].
num
;
j
++
)
{
for
(
j
=
1
;
j
<
*
dev_list
[
i
].
num
;
j
++
)
{
devfs_remove
(
"sound/%s%d"
,
dev_list
[
i
].
name
,
j
);
devfs_remove
(
"sound/%s%d"
,
dev_list
[
i
].
name
,
j
);
class_
simple_device_remove
(
MKDEV
(
SOUND_MAJOR
,
dev_list
[
i
].
minor
+
(
j
*
0x10
)));
class_
device_destroy
(
sound_class
,
MKDEV
(
SOUND_MAJOR
,
dev_list
[
i
].
minor
+
(
j
*
0x10
)));
}
}
}
}
...
...
sound/sound_core.c
View file @
619e666b
...
@@ -65,7 +65,7 @@ extern int msnd_classic_init(void);
...
@@ -65,7 +65,7 @@ extern int msnd_classic_init(void);
extern
int
msnd_pinnacle_init
(
void
);
extern
int
msnd_pinnacle_init
(
void
);
#endif
#endif
struct
class
_simple
*
sound_class
;
struct
class
*
sound_class
;
EXPORT_SYMBOL
(
sound_class
);
EXPORT_SYMBOL
(
sound_class
);
/*
/*
...
@@ -174,7 +174,7 @@ static int sound_insert_unit(struct sound_unit **list, struct file_operations *f
...
@@ -174,7 +174,7 @@ static int sound_insert_unit(struct sound_unit **list, struct file_operations *f
devfs_mk_cdev
(
MKDEV
(
SOUND_MAJOR
,
s
->
unit_minor
),
devfs_mk_cdev
(
MKDEV
(
SOUND_MAJOR
,
s
->
unit_minor
),
S_IFCHR
|
mode
,
s
->
name
);
S_IFCHR
|
mode
,
s
->
name
);
class_
simple_device_add
(
sound_class
,
MKDEV
(
SOUND_MAJOR
,
s
->
unit_minor
),
class_
device_create
(
sound_class
,
MKDEV
(
SOUND_MAJOR
,
s
->
unit_minor
),
NULL
,
s
->
name
+
6
);
NULL
,
s
->
name
+
6
);
return
r
;
return
r
;
...
@@ -198,7 +198,7 @@ static void sound_remove_unit(struct sound_unit **list, int unit)
...
@@ -198,7 +198,7 @@ static void sound_remove_unit(struct sound_unit **list, int unit)
spin_unlock
(
&
sound_loader_lock
);
spin_unlock
(
&
sound_loader_lock
);
if
(
p
)
{
if
(
p
)
{
devfs_remove
(
p
->
name
);
devfs_remove
(
p
->
name
);
class_
simple_device_remove
(
MKDEV
(
SOUND_MAJOR
,
p
->
unit_minor
));
class_
device_destroy
(
sound_class
,
MKDEV
(
SOUND_MAJOR
,
p
->
unit_minor
));
kfree
(
p
);
kfree
(
p
);
}
}
}
}
...
@@ -562,7 +562,7 @@ static void __exit cleanup_soundcore(void)
...
@@ -562,7 +562,7 @@ static void __exit cleanup_soundcore(void)
empty */
empty */
unregister_chrdev
(
SOUND_MAJOR
,
"sound"
);
unregister_chrdev
(
SOUND_MAJOR
,
"sound"
);
devfs_remove
(
"sound"
);
devfs_remove
(
"sound"
);
class_
simple_
destroy
(
sound_class
);
class_destroy
(
sound_class
);
}
}
static
int
__init
init_soundcore
(
void
)
static
int
__init
init_soundcore
(
void
)
...
@@ -572,7 +572,7 @@ static int __init init_soundcore(void)
...
@@ -572,7 +572,7 @@ static int __init init_soundcore(void)
return
-
EBUSY
;
return
-
EBUSY
;
}
}
devfs_mk_dir
(
"sound"
);
devfs_mk_dir
(
"sound"
);
sound_class
=
class_
simple_
create
(
THIS_MODULE
,
"sound"
);
sound_class
=
class_create
(
THIS_MODULE
,
"sound"
);
if
(
IS_ERR
(
sound_class
))
if
(
IS_ERR
(
sound_class
))
return
PTR_ERR
(
sound_class
);
return
PTR_ERR
(
sound_class
);
...
...
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