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
Kirill Smelkov
linux
Commits
0043c64d
Commit
0043c64d
authored
Jul 27, 2002
by
Richard Gooch
Browse files
Options
Browse Files
Download
Plain Diff
Merge atnf.csiro.au:/workaholix1/kernel/v2.5/linus
into atnf.csiro.au:/workaholix1/kernel/v2.5/rgooch-2.5
parents
771101bc
5dcb5df1
Changes
23
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
100 additions
and
85 deletions
+100
-85
Documentation/filesystems/devfs/ChangeLog
Documentation/filesystems/devfs/ChangeLog
+9
-0
drivers/block/cpqarray.c
drivers/block/cpqarray.c
+1
-1
drivers/cdrom/aztcd.c
drivers/cdrom/aztcd.c
+1
-2
drivers/cdrom/gscd.c
drivers/cdrom/gscd.c
+1
-2
drivers/cdrom/optcd.c
drivers/cdrom/optcd.c
+1
-2
drivers/cdrom/sjcd.c
drivers/cdrom/sjcd.c
+1
-2
drivers/cdrom/sonycd535.c
drivers/cdrom/sonycd535.c
+2
-2
drivers/char/ftape/zftape/zftape-init.c
drivers/char/ftape/zftape/zftape-init.c
+6
-6
drivers/char/tpqic02.c
drivers/char/tpqic02.c
+16
-24
drivers/char/tty_io.c
drivers/char/tty_io.c
+2
-4
drivers/char/vc_screen.c
drivers/char/vc_screen.c
+4
-4
drivers/isdn/capi/capi.c
drivers/isdn/capi/capi.c
+1
-1
drivers/md/md.c
drivers/md/md.c
+3
-2
drivers/s390/char/tubfs.c
drivers/s390/char/tubfs.c
+6
-9
drivers/sbus/audio/audio.c
drivers/sbus/audio/audio.c
+2
-4
drivers/usb/input/hiddev.c
drivers/usb/input/hiddev.c
+5
-2
fs/block_dev.c
fs/block_dev.c
+5
-4
fs/devfs/base.c
fs/devfs/base.c
+14
-1
include/linux/devfs_fs_kernel.h
include/linux/devfs_fs_kernel.h
+10
-0
init/do_mounts.c
init/do_mounts.c
+3
-2
sound/core/info.c
sound/core/info.c
+2
-2
sound/core/sound.c
sound/core/sound.c
+2
-2
sound/oss/soundcard.c
sound/oss/soundcard.c
+3
-7
No files found.
Documentation/filesystems/devfs/ChangeLog
View file @
0043c64d
...
...
@@ -1941,3 +1941,12 @@ Changes for patch v214
- Updated README from master HTML file
- Fixed devfs entry leak in <devfs_readdir> when *readdir fails
===============================================================================
Changes for patch v215
- Created <devfs_find_and_unregister>
- Switched many functions from <devfs_find_handle> to
<devfs_find_and_unregister>
- Switched many functions from <devfs_find_handle> to <devfs_get_handle>
drivers/block/cpqarray.c
View file @
0043c64d
...
...
@@ -336,7 +336,7 @@ void cleanup_module(void)
del_gendisk
(
&
ida_gendisk
[
i
]);
}
devfs_
unregister
(
devfs_find_handle
(
NULL
,
"ida"
,
0
,
0
,
0
,
0
)
);
devfs_
find_and_unregister
(
NULL
,
"ida"
,
0
,
0
,
0
,
0
);
remove_proc_entry
(
"cpqarray"
,
proc_root_driver
);
kfree
(
ida
);
kfree
(
ida_sizes
);
...
...
drivers/cdrom/aztcd.c
View file @
0043c64d
...
...
@@ -1957,8 +1957,7 @@ int __init aztcd_init(void)
void
__exit
aztcd_exit
(
void
)
{
devfs_unregister
(
devfs_find_handle
(
NULL
,
"aztcd"
,
0
,
0
,
DEVFS_SPECIAL_BLK
,
0
));
devfs_find_and_unregister
(
NULL
,
"aztcd"
,
0
,
0
,
DEVFS_SPECIAL_BLK
,
0
);
if
((
devfs_unregister_blkdev
(
MAJOR_NR
,
"aztcd"
)
==
-
EINVAL
))
{
printk
(
"What's that: can't unregister aztcd
\n
"
);
return
;
...
...
drivers/cdrom/gscd.c
View file @
0043c64d
...
...
@@ -933,8 +933,7 @@ void __exit exit_gscd(void)
{
CLEAR_TIMER
;
devfs_unregister
(
devfs_find_handle
(
NULL
,
"gscd"
,
0
,
0
,
DEVFS_SPECIAL_BLK
,
0
));
devfs_find_and_unregister
(
NULL
,
"gscd"
,
0
,
0
,
DEVFS_SPECIAL_BLK
,
0
);
if
((
devfs_unregister_blkdev
(
MAJOR_NR
,
"gscd"
)
==
-
EINVAL
))
{
printk
(
"What's that: can't unregister GoldStar-module
\n
"
);
return
;
...
...
drivers/cdrom/optcd.c
View file @
0043c64d
...
...
@@ -2051,8 +2051,7 @@ int __init optcd_init(void)
void
__exit
optcd_exit
(
void
)
{
devfs_unregister
(
devfs_find_handle
(
NULL
,
"optcd"
,
0
,
0
,
DEVFS_SPECIAL_BLK
,
0
));
devfs_find_and_unregister
(
NULL
,
"optcd"
,
0
,
0
,
DEVFS_SPECIAL_BLK
,
0
);
if
(
devfs_unregister_blkdev
(
MAJOR_NR
,
"optcd"
)
==
-
EINVAL
)
{
printk
(
KERN_ERR
"optcd: what's that: can't unregister
\n
"
);
return
;
...
...
drivers/cdrom/sjcd.c
View file @
0043c64d
...
...
@@ -1802,8 +1802,7 @@ static int sjcd_cleanup(void)
void
__exit
sjcd_exit
(
void
)
{
devfs_unregister
(
devfs_find_handle
(
NULL
,
"sjcd"
,
0
,
0
,
DEVFS_SPECIAL_BLK
,
0
));
devfs_find_and_unregister
(
NULL
,
"sjcd"
,
0
,
0
,
DEVFS_SPECIAL_BLK
,
0
);
if
(
sjcd_cleanup
())
printk
(
"SJCD: module: cannot be removed.
\n
"
);
else
...
...
drivers/cdrom/sonycd535.c
View file @
0043c64d
...
...
@@ -1700,8 +1700,8 @@ sony535_exit(void)
kfree
(
sony_buffer
);
kfree
(
last_sony_subcode
);
kfree
(
sony_toc
);
devfs_
unregister
(
devfs_find_handle
(
NULL
,
CDU535_HANDLE
,
0
,
0
,
DEVFS_SPECIAL_BLK
,
0
)
);
devfs_
find_and_unregister
(
NULL
,
CDU535_HANDLE
,
0
,
0
,
DEVFS_SPECIAL_BLK
,
0
);
if
(
devfs_unregister_blkdev
(
MAJOR_NR
,
CDU535_HANDLE
)
==
-
EINVAL
)
printk
(
"Uh oh, couldn't unregister "
CDU535_HANDLE
"
\n
"
);
else
...
...
drivers/char/ftape/zftape/zftape-init.c
View file @
0043c64d
...
...
@@ -426,17 +426,17 @@ void cleanup_module(void)
}
for
(
i
=
0
;
i
<
4
;
i
++
)
{
sprintf
(
devname
,
"qft%i"
,
i
);
devfs_
unregister
(
devfs_find_handle
(
NULL
,
devname
,
QIC117_TAPE_MAJOR
,
i
,
DEVFS_SPECIAL_CHR
,
0
)
);
devfs_
find_and_unregister
(
NULL
,
devname
,
QIC117_TAPE_MAJOR
,
i
,
DEVFS_SPECIAL_CHR
,
0
);
sprintf
(
devname
,
"nqft%i"
,
i
);
devfs_
unregister
(
devfs_find_handle
(
NULL
,
devname
,
QIC117_TAPE_MAJOR
,
i
+
4
,
DEVFS_SPECIAL_CHR
,
0
)
);
devfs_
find_and_unregister
(
NULL
,
devname
,
QIC117_TAPE_MAJOR
,
i
+
4
,
DEVFS_SPECIAL_CHR
,
0
);
sprintf
(
devname
,
"zqft%i"
,
i
);
devfs_
unregister
(
devfs_find_handle
(
NULL
,
devname
,
QIC117_TAPE_MAJOR
,
i
+
16
,
DEVFS_SPECIAL_CHR
,
0
)
);
devfs_
find_and_unregister
(
NULL
,
devname
,
QIC117_TAPE_MAJOR
,
i
+
16
,
DEVFS_SPECIAL_CHR
,
0
);
sprintf
(
devname
,
"nzqft%i"
,
i
);
devfs_
unregister
(
devfs_find_handle
(
NULL
,
devname
,
QIC117_TAPE_MAJOR
,
i
+
20
,
DEVFS_SPECIAL_CHR
,
0
)
);
devfs_
find_and_unregister
(
NULL
,
devname
,
QIC117_TAPE_MAJOR
,
i
+
20
,
DEVFS_SPECIAL_CHR
,
0
);
sprintf
(
devname
,
"rawqft%i"
,
i
);
devfs_
unregister
(
devfs_find_handle
(
NULL
,
devname
,
QIC117_TAPE_MAJOR
,
i
+
32
,
DEVFS_SPECIAL_CHR
,
0
)
);
devfs_
find_and_unregister
(
NULL
,
devname
,
QIC117_TAPE_MAJOR
,
i
+
32
,
DEVFS_SPECIAL_CHR
,
0
);
sprintf
(
devname
,
"nrawqft%i"
,
i
);
devfs_
unregister
(
devfs_find_handle
(
NULL
,
devname
,
QIC117_TAPE_MAJOR
,
i
+
36
,
DEVFS_SPECIAL_CHR
,
0
)
);
devfs_
find_and_unregister
(
NULL
,
devname
,
QIC117_TAPE_MAJOR
,
i
+
36
,
DEVFS_SPECIAL_CHR
,
0
);
}
zft_uninit_mem
();
/* release remaining memory, if any */
printk
(
KERN_INFO
"zftape successfully unloaded.
\n
"
);
...
...
drivers/char/tpqic02.c
View file @
0043c64d
...
...
@@ -2931,30 +2931,22 @@ void cleanup_module(void)
qic02_release_resources
();
}
devfs_unregister_chrdev
(
QIC02_TAPE_MAJOR
,
TPQIC02_NAME
);
devfs_unregister
(
devfs_find_handle
(
NULL
,
"ntpqic11"
,
QIC02_TAPE_MAJOR
,
2
,
DEVFS_SPECIAL_CHR
,
0
));
devfs_unregister
(
devfs_find_handle
(
NULL
,
"tpqic11"
,
QIC02_TAPE_MAJOR
,
3
,
DEVFS_SPECIAL_CHR
,
0
));
devfs_unregister
(
devfs_find_handle
(
NULL
,
"ntpqic24"
,
QIC02_TAPE_MAJOR
,
4
,
DEVFS_SPECIAL_CHR
,
0
));
devfs_unregister
(
devfs_find_handle
(
NULL
,
"tpqic24"
,
QIC02_TAPE_MAJOR
,
5
,
DEVFS_SPECIAL_CHR
,
0
));
devfs_unregister
(
devfs_find_handle
(
NULL
,
"ntpqic120"
,
QIC02_TAPE_MAJOR
,
6
,
DEVFS_SPECIAL_CHR
,
0
));
devfs_unregister
(
devfs_find_handle
(
NULL
,
"tpqic120"
,
QIC02_TAPE_MAJOR
,
7
,
DEVFS_SPECIAL_CHR
,
0
));
devfs_unregister
(
devfs_find_handle
(
NULL
,
"ntpqic150"
,
QIC02_TAPE_MAJOR
,
8
,
DEVFS_SPECIAL_CHR
,
0
));
devfs_unregister
(
devfs_find_handle
(
NULL
,
"tpqic150"
,
QIC02_TAPE_MAJOR
,
9
,
DEVFS_SPECIAL_CHR
,
0
));
devfs_find_and_unregister
(
NULL
,
"ntpqic11"
,
QIC02_TAPE_MAJOR
,
2
,
DEVFS_SPECIAL_CHR
,
0
);
devfs_find_and_unregister
(
NULL
,
"tpqic11"
,
QIC02_TAPE_MAJOR
,
3
,
DEVFS_SPECIAL_CHR
,
0
);
devfs_find_and_unregister
(
NULL
,
"ntpqic24"
,
QIC02_TAPE_MAJOR
,
4
,
DEVFS_SPECIAL_CHR
,
0
);
devfs_find_and_unregister
(
NULL
,
"tpqic24"
,
QIC02_TAPE_MAJOR
,
5
,
DEVFS_SPECIAL_CHR
,
0
);
devfs_find_and_unregister
(
NULL
,
"ntpqic120"
,
QIC02_TAPE_MAJOR
,
6
,
DEVFS_SPECIAL_CHR
,
0
);
devfs_find_and_unregister
(
NULL
,
"tpqic120"
,
QIC02_TAPE_MAJOR
,
7
,
DEVFS_SPECIAL_CHR
,
0
);
devfs_find_and_unregister
(
NULL
,
"ntpqic150"
,
QIC02_TAPE_MAJOR
,
8
,
DEVFS_SPECIAL_CHR
,
0
);
devfs_find_and_unregister
(
NULL
,
"tpqic150"
,
QIC02_TAPE_MAJOR
,
9
,
DEVFS_SPECIAL_CHR
,
0
);
}
int
init_module
(
void
)
...
...
drivers/char/tty_io.c
View file @
0043c64d
...
...
@@ -2047,14 +2047,12 @@ void tty_register_devfs (struct tty_driver *driver, unsigned int flags, unsigned
void
tty_unregister_devfs
(
struct
tty_driver
*
driver
,
unsigned
minor
)
{
#ifdef CONFIG_DEVFS_FS
void
*
handle
;
int
idx
=
minor
-
driver
->
minor_start
;
char
buf
[
32
];
sprintf
(
buf
,
driver
->
name
,
idx
+
driver
->
name_base
);
handle
=
devfs_find_handle
(
NULL
,
buf
,
driver
->
major
,
minor
,
DEVFS_SPECIAL_CHR
,
0
);
devfs_unregister
(
handle
);
devfs_find_and_unregister
(
NULL
,
buf
,
driver
->
major
,
minor
,
DEVFS_SPECIAL_CHR
,
0
);
#endif
/* CONFIG_DEVFS_FS */
}
...
...
drivers/char/vc_screen.c
View file @
0043c64d
...
...
@@ -480,10 +480,10 @@ void vcs_make_devfs (unsigned int index, int unregister)
sprintf
(
name
,
"a%u"
,
index
+
1
);
if
(
unregister
)
{
devfs_
unregister
(
devfs_find_handle
(
devfs_handle
,
name
+
1
,
0
,
0
,
DEVFS_SPECIAL_CHR
,
0
)
);
devfs_
unregister
(
devfs_find_handle
(
devfs_handle
,
name
,
0
,
0
,
DEVFS_SPECIAL_CHR
,
0
)
);
devfs_
find_and_unregister
(
devfs_handle
,
name
+
1
,
0
,
0
,
DEVFS_SPECIAL_CHR
,
0
);
devfs_
find_and_unregister
(
devfs_handle
,
name
,
0
,
0
,
DEVFS_SPECIAL_CHR
,
0
);
}
else
{
...
...
drivers/isdn/capi/capi.c
View file @
0043c64d
...
...
@@ -1527,7 +1527,7 @@ static void __exit capi_exit(void)
proc_exit
();
devfs_unregister_chrdev
(
capi_major
,
"capi20"
);
devfs_
unregister
(
devfs_find_handle
(
NULL
,
"isdn/capi20"
,
capi_major
,
0
,
DEVFS_SPECIAL_CHR
,
0
)
);
devfs_
find_and_unregister
(
NULL
,
"isdn/capi20"
,
capi_major
,
0
,
DEVFS_SPECIAL_CHR
,
0
);
#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
capinc_tty_exit
();
...
...
drivers/md/md.c
View file @
0043c64d
...
...
@@ -3412,12 +3412,13 @@ void __init md_setup_drive(void)
*
p
++
=
0
;
dev
=
name_to_kdev_t
(
devname
);
handle
=
devfs_
find
_handle
(
NULL
,
devname
,
major
(
dev
),
minor
(
dev
),
DEVFS_SPECIAL_BLK
,
1
);
handle
=
devfs_
get
_handle
(
NULL
,
devname
,
major
(
dev
),
minor
(
dev
),
DEVFS_SPECIAL_BLK
,
1
);
if
(
handle
!=
0
)
{
unsigned
major
,
minor
;
devfs_get_maj_min
(
handle
,
&
major
,
&
minor
);
dev
=
mk_kdev
(
major
,
minor
);
devfs_put
(
handle
);
}
if
(
kdev_none
(
dev
))
{
printk
(
KERN_WARNING
"md: Unknown device name: %s
\n
"
,
devname
);
...
...
drivers/s390/char/tubfs.c
View file @
0043c64d
...
...
@@ -54,18 +54,15 @@ void fs3270_devfs_register(tub_t *tubp)
void
fs3270_devfs_unregister
(
tub_t
*
tubp
)
{
char
name
[
16
];
devfs_handle_t
handle
;
sprintf
(
name
,
"tub%.4x"
,
tubp
->
devno
);
handle
=
devfs_find_handle
(
fs3270_devfs_dir
,
name
,
IBM_FS3270_MAJOR
,
tubp
->
minor
,
DEVFS_SPECIAL_CHR
,
0
);
devfs_unregister
(
handle
);
devfs_find_and_unregister
(
fs3270_devfs_dir
,
name
,
IBM_FS3270_MAJOR
,
tubp
->
minor
,
DEVFS_SPECIAL_CHR
,
0
);
sprintf
(
name
,
"tty%.4x"
,
tubp
->
devno
);
handle
=
devfs_find_handle
(
fs3270_devfs_dir
,
name
,
IBM_TTY3270_MAJOR
,
tubp
->
minor
,
DEVFS_SPECIAL_CHR
,
0
);
devfs_unregister
(
handle
);
devfs_find_and_unregister
(
fs3270_devfs_dir
,
name
,
IBM_TTY3270_MAJOR
,
tubp
->
minor
,
DEVFS_SPECIAL_CHR
,
0
);
}
#endif
...
...
drivers/sbus/audio/audio.c
View file @
0043c64d
...
...
@@ -2077,7 +2077,6 @@ int register_sparcaudio_driver(struct sparcaudio_driver *drv, int duplex)
int
unregister_sparcaudio_driver
(
struct
sparcaudio_driver
*
drv
,
int
duplex
)
{
devfs_handle_t
de
;
int
i
;
char
name_buf
[
32
];
...
...
@@ -2104,9 +2103,8 @@ int unregister_sparcaudio_driver(struct sparcaudio_driver *drv, int duplex)
/* Unregister ourselves with devfs */
for
(
i
=
0
;
i
<
sizeof
(
dev_list
)
/
sizeof
(
*
dev_list
);
i
++
)
{
sparcaudio_mkname
(
name_buf
,
dev_list
[
i
].
name
,
drv
->
index
);
de
=
devfs_find_handle
(
devfs_handle
,
name_buf
,
0
,
0
,
DEVFS_SPECIAL_CHR
,
0
);
devfs_unregister
(
de
);
devfs_find_and_unregister
(
devfs_handle
,
name_buf
,
0
,
0
,
DEVFS_SPECIAL_CHR
,
0
);
}
MOD_DEC_USE_COUNT
;
...
...
drivers/usb/input/hiddev.c
View file @
0043c64d
...
...
@@ -765,8 +765,11 @@ static /* const */ struct usb_driver hiddev_driver = {
int
__init
hiddev_init
(
void
)
{
hiddev_devfs_handle
=
devfs_mk_dir
(
devfs_find_handle
(
NULL
,
"usb"
,
0
,
0
,
0
,
0
),
"hid"
,
NULL
);
devfs_handle_t
de
;
de
=
devfs_get_handle
(
NULL
,
"usb"
,
0
,
0
,
0
,
0
);
hiddev_devfs_handle
=
devfs_mk_dir
(
de
,
"hid"
,
NULL
);
devfs_put
(
de
);
usb_register
(
&
hiddev_driver
);
return
0
;
}
...
...
fs/block_dev.c
View file @
0043c64d
...
...
@@ -489,11 +489,12 @@ int check_disk_change(kdev_t dev)
if
(
bdops
==
NULL
)
{
devfs_handle_t
de
;
de
=
devfs_
find_handle
(
NULL
,
NULL
,
i
,
minor
(
dev
),
DEVFS_SPECIAL_BLK
,
0
);
de
=
devfs_
get_handle
(
NULL
,
NULL
,
i
,
minor
(
dev
),
DEVFS_SPECIAL_BLK
,
0
);
if
(
de
)
{
bdops
=
devfs_get_ops
(
de
);
devfs_put_ops
(
de
);
/* We're running in owner module */
bdops
=
devfs_get_ops
(
de
);
devfs_put_ops
(
de
);
/* We're running in owner module */
devfs_put
(
de
);
}
}
if
(
bdops
==
NULL
)
...
...
fs/devfs/base.c
View file @
0043c64d
...
...
@@ -639,6 +639,9 @@
20020722 Richard Gooch <rgooch@atnf.csiro.au>
Fixed devfs entry leak in <devfs_readdir> when *readdir fails.
v1.18
20020725 Richard Gooch <rgooch@atnf.csiro.au>
Created <devfs_find_and_unregister>.
v1.19
*/
#include <linux/types.h>
#include <linux/errno.h>
...
...
@@ -671,7 +674,7 @@
#include <asm/bitops.h>
#include <asm/atomic.h>
#define DEVFS_VERSION "1.1
8 (20020722
)"
#define DEVFS_VERSION "1.1
9 (20020725
)"
#define DEVFS_NAME "devfs"
...
...
@@ -1881,6 +1884,16 @@ devfs_handle_t devfs_get_handle (devfs_handle_t dir, const char *name,
return
_devfs_find_entry
(
dir
,
name
,
major
,
minor
,
type
,
traverse_symlinks
);
}
/* End Function devfs_get_handle */
void
devfs_find_and_unregister
(
devfs_handle_t
dir
,
const
char
*
name
,
unsigned
int
major
,
unsigned
int
minor
,
char
type
,
int
traverse_symlinks
)
{
devfs_handle_t
de
=
devfs_get_handle
(
dir
,
name
,
major
,
minor
,
type
,
traverse_symlinks
);
devfs_unregister
(
de
);
devfs_put
(
de
);
}
/* Compatibility function. Will be removed in sometime in 2.5 */
...
...
include/linux/devfs_fs_kernel.h
View file @
0043c64d
...
...
@@ -74,6 +74,9 @@ extern devfs_handle_t devfs_mk_dir (devfs_handle_t dir, const char *name,
extern
devfs_handle_t
devfs_get_handle
(
devfs_handle_t
dir
,
const
char
*
name
,
unsigned
int
major
,
unsigned
int
minor
,
char
type
,
int
traverse_symlinks
);
extern
void
devfs_find_and_unregister
(
devfs_handle_t
dir
,
const
char
*
name
,
unsigned
int
major
,
unsigned
int
minor
,
char
type
,
int
traverse_symlinks
);
extern
devfs_handle_t
devfs_find_handle
(
devfs_handle_t
dir
,
const
char
*
name
,
unsigned
int
major
,
unsigned
int
minor
,
char
type
,
int
traverse_symlinks
);
...
...
@@ -164,6 +167,13 @@ static inline devfs_handle_t devfs_get_handle (devfs_handle_t dir,
{
return
NULL
;
}
static
inline
void
devfs_find_and_unregister
(
devfs_handle_t
dir
,
const
char
*
name
,
unsigned
int
major
,
unsigned
int
minor
,
char
type
,
int
traverse_symlinks
)
{
}
static
inline
devfs_handle_t
devfs_find_handle
(
devfs_handle_t
dir
,
const
char
*
name
,
unsigned
int
major
,
...
...
init/do_mounts.c
View file @
0043c64d
...
...
@@ -356,11 +356,12 @@ static int __init create_dev(char *name, dev_t dev, char *devfs_name)
if
(
!
do_devfs
)
return
sys_mknod
(
name
,
S_IFBLK
|
0600
,
dev
);
handle
=
devfs_
find
_handle
(
NULL
,
!
dev
?
devfs_name
:
NULL
,
MAJOR
(
dev
),
MINOR
(
dev
),
DEVFS_SPECIAL_BLK
,
1
);
handle
=
devfs_
get
_handle
(
NULL
,
!
dev
?
devfs_name
:
NULL
,
MAJOR
(
dev
),
MINOR
(
dev
),
DEVFS_SPECIAL_BLK
,
1
);
if
(
!
handle
)
return
-
1
;
n
=
devfs_generate_path
(
handle
,
path
+
5
,
sizeof
(
path
)
-
5
);
devfs_put
(
handle
);
if
(
n
<
0
)
return
-
1
;
return
sys_symlink
(
path
+
n
+
5
,
name
);
...
...
sound/core/info.c
View file @
0043c64d
...
...
@@ -973,10 +973,10 @@ void snd_info_free_device(snd_info_entry_t * entry)
sprintf
(
dname
,
"snd/%s"
,
entry
->
name
);
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0)
master
=
devfs_find_handle
(
NULL
,
dname
,
strlen
(
dname
),
0
,
0
,
DEVFS_SPECIAL_CHR
,
0
);
devfs_unregister
(
master
);
#else
master
=
devfs_find_handle
(
NULL
,
dname
,
0
,
0
,
DEVFS_SPECIAL_CHR
,
0
);
devfs_find_and_unregister
(
NULL
,
dname
,
0
,
0
,
DEVFS_SPECIAL_CHR
,
0
);
#endif
devfs_unregister
(
master
);
}
#endif
snd_info_free_entry
(
entry
);
...
...
sound/core/sound.c
View file @
0043c64d
...
...
@@ -368,10 +368,10 @@ static void __exit alsa_sound_exit(void)
sprintf
(
controlname
,
"snd/controlC%d"
,
controlnum
);
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0)
master
=
devfs_find_handle
(
NULL
,
controlname
,
strlen
(
controlname
),
0
,
0
,
DEVFS_SPECIAL_CHR
,
0
);
devfs_unregister
(
master
);
#else
master
=
devfs_find_handle
(
NULL
,
controlname
,
0
,
0
,
DEVFS_SPECIAL_CHR
,
0
);
devfs_find_and_unregister
(
NULL
,
controlname
,
0
,
0
,
DEVFS_SPECIAL_CHR
,
0
);
#endif
devfs_unregister
(
master
);
}
#endif
...
...
sound/oss/soundcard.c
View file @
0043c64d
...
...
@@ -566,13 +566,9 @@ static void soundcard_register_devfs (int do_register)
SOUND_MAJOR
,
dev_list
[
i
].
minor
+
(
j
*
0x10
),
S_IFCHR
|
dev_list
[
i
].
mode
,
&
oss_sound_fops
,
NULL
);
else
{
devfs_handle_t
de
;
de
=
devfs_find_handle
(
NULL
,
name_buf
,
0
,
0
,
DEVFS_SPECIAL_CHR
,
0
);
devfs_unregister
(
de
);
}
else
devfs_find_and_unregister
(
NULL
,
name_buf
,
0
,
0
,
DEVFS_SPECIAL_CHR
,
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