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
2093dc7f
Commit
2093dc7f
authored
Dec 03, 2002
by
Alexander Viro
Committed by
Linus Torvalds
Dec 03, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] sound cleanup
switched to devfs_remove(), killed gratitious devfs_handle_t variable.
parent
c7dac7a9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
sound/sound_core.c
sound/sound_core.c
+6
-8
No files found.
sound/sound_core.c
View file @
2093dc7f
...
@@ -149,13 +149,11 @@ static spinlock_t sound_loader_lock = SPIN_LOCK_UNLOCKED;
...
@@ -149,13 +149,11 @@ static spinlock_t sound_loader_lock = SPIN_LOCK_UNLOCKED;
* list. Acquires locks as needed
* list. Acquires locks as needed
*/
*/
static
devfs_handle_t
devfs_handle
;
static
int
sound_insert_unit
(
struct
sound_unit
**
list
,
struct
file_operations
*
fops
,
int
index
,
int
low
,
int
top
,
const
char
*
name
,
umode_t
mode
)
static
int
sound_insert_unit
(
struct
sound_unit
**
list
,
struct
file_operations
*
fops
,
int
index
,
int
low
,
int
top
,
const
char
*
name
,
umode_t
mode
)
{
{
int
r
;
int
r
;
struct
sound_unit
*
s
=
(
struct
sound_unit
*
)
kmalloc
(
sizeof
(
struct
sound_unit
),
GFP_KERNEL
);
struct
sound_unit
*
s
=
(
struct
sound_unit
*
)
kmalloc
(
sizeof
(
struct
sound_unit
),
GFP_KERNEL
);
char
name_buf
[
16
];
char
name_buf
[
32
];
if
(
s
==
NULL
)
if
(
s
==
NULL
)
return
-
ENOMEM
;
return
-
ENOMEM
;
...
@@ -171,10 +169,10 @@ static int sound_insert_unit(struct sound_unit **list, struct file_operations *f
...
@@ -171,10 +169,10 @@ static int sound_insert_unit(struct sound_unit **list, struct file_operations *f
}
}
if
(
r
<
SOUND_STEP
)
if
(
r
<
SOUND_STEP
)
sprintf
(
name_buf
,
"%s"
,
name
);
sprintf
(
name_buf
,
"
sound/
%s"
,
name
);
else
else
sprintf
(
name_buf
,
"%s%d"
,
name
,
r
/
SOUND_STEP
);
sprintf
(
name_buf
,
"
sound/
%s%d"
,
name
,
r
/
SOUND_STEP
);
s
->
de
=
devfs_register
(
devfs_handle
,
name_buf
,
s
->
de
=
devfs_register
(
NULL
,
name_buf
,
DEVFS_FL_NONE
,
SOUND_MAJOR
,
s
->
unit_minor
,
DEVFS_FL_NONE
,
SOUND_MAJOR
,
s
->
unit_minor
,
S_IFCHR
|
mode
,
fops
,
NULL
);
S_IFCHR
|
mode
,
fops
,
NULL
);
return
r
;
return
r
;
...
@@ -560,7 +558,7 @@ static void __exit cleanup_soundcore(void)
...
@@ -560,7 +558,7 @@ static void __exit cleanup_soundcore(void)
/* We have nothing to really do here - we know the lists must be
/* We have nothing to really do here - we know the lists must be
empty */
empty */
unregister_chrdev
(
SOUND_MAJOR
,
"sound"
);
unregister_chrdev
(
SOUND_MAJOR
,
"sound"
);
devfs_
unregister
(
devfs_handle
);
devfs_
remove
(
"sound"
);
}
}
static
int
__init
init_soundcore
(
void
)
static
int
__init
init_soundcore
(
void
)
...
@@ -569,7 +567,7 @@ static int __init init_soundcore(void)
...
@@ -569,7 +567,7 @@ static int __init init_soundcore(void)
printk
(
KERN_ERR
"soundcore: sound device already in use.
\n
"
);
printk
(
KERN_ERR
"soundcore: sound device already in use.
\n
"
);
return
-
EBUSY
;
return
-
EBUSY
;
}
}
devfs_
handle
=
devfs_
mk_dir
(
NULL
,
"sound"
,
NULL
);
devfs_mk_dir
(
NULL
,
"sound"
,
NULL
);
return
0
;
return
0
;
}
}
...
...
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