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
7827cc75
Commit
7827cc75
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] md cleanup
switched to devfs_remove(), killed gratitious devfs_handle_t variable.
parent
2d403771
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
drivers/md/md.c
drivers/md/md.c
+8
-8
No files found.
drivers/md/md.c
View file @
7827cc75
...
...
@@ -105,7 +105,6 @@ static mdk_thread_t *md_recovery_thread;
sector_t
md_size
[
MAX_MD_DEVS
];
static
struct
block_device_operations
md_fops
;
static
devfs_handle_t
devfs_handle
;
static
struct
gendisk
*
disks
[
MAX_MD_DEVS
];
...
...
@@ -3102,14 +3101,13 @@ int __init md_init(void)
printk
(
KERN_ALERT
"md: Unable to get major %d for md
\n
"
,
MAJOR_NR
);
return
(
-
1
);
}
devfs_
handle
=
devfs_
mk_dir
(
NULL
,
"md"
,
NULL
);
devfs_mk_dir
(
NULL
,
"md"
,
NULL
);
blk_register_region
(
MKDEV
(
MAJOR_NR
,
0
),
MAX_MD_DEVS
,
THIS_MODULE
,
md_probe
,
NULL
,
NULL
);
for
(
minor
=
0
;
minor
<
MAX_MD_DEVS
;
++
minor
)
{
char
devname
[
128
];
sprintf
(
devname
,
"%u"
,
minor
);
devfs_register
(
devfs_handle
,
devname
,
DEVFS_FL_DEFAULT
,
MAJOR_NR
,
minor
,
char
name
[
16
];
sprintf
(
name
,
"md/%d"
,
minor
);
devfs_register
(
NULL
,
name
,
DEVFS_FL_DEFAULT
,
MAJOR_NR
,
minor
,
S_IFBLK
|
S_IRUSR
|
S_IWUSR
,
&
md_fops
,
NULL
);
}
...
...
@@ -3176,7 +3174,9 @@ static __exit void md_exit(void)
int
i
;
blk_unregister_region
(
MKDEV
(
MAJOR_NR
,
0
),
MAX_MD_DEVS
);
md_unregister_thread
(
md_recovery_thread
);
devfs_unregister
(
devfs_handle
);
for
(
i
=
0
;
i
<
MAX_MD_DEVS
;
i
++
)
devfs_remove
(
"md/%d"
,
i
);
devfs_remove
(
"md"
);
unregister_blkdev
(
MAJOR_NR
,
"md"
);
unregister_reboot_notifier
(
&
md_notifier
);
...
...
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