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
0b88527b
Commit
0b88527b
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] acsi_slm cleanup
switched to explicit devfs_register()/devfs_remove()
parent
356df99b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
drivers/block/acsi_slm.c
drivers/block/acsi_slm.c
+12
-6
No files found.
drivers/block/acsi_slm.c
View file @
0b88527b
...
...
@@ -993,11 +993,10 @@ int attach_slm( int target, int lun )
return
(
1
);
}
static
devfs_handle_t
devfs_handle
;
int
slm_init
(
void
)
{
int
i
;
if
(
register_chrdev
(
MAJOR_NR
,
"slm"
,
&
slm_fops
))
{
printk
(
KERN_ERR
"Unable to get major %d for ACSI SLM
\n
"
,
MAJOR_NR
);
return
-
EBUSY
;
...
...
@@ -1011,10 +1010,14 @@ int slm_init( void )
BufferP
=
SLMBuffer
;
SLMState
=
IDLE
;
devfs_handle
=
devfs_mk_dir
(
NULL
,
"slm"
,
NULL
);
devfs_register_series
(
devfs_handle
,
"%u"
,
MAX_SLM
,
DEVFS_FL_DEFAULT
,
MAJOR_NR
,
0
,
S_IFCHR
|
S_IRUSR
|
S_IWUSR
,
devfs_mk_dir
(
NULL
,
"slm"
,
NULL
);
for
(
i
=
0
;
i
<
MAX_SLM
;
i
++
)
{
char
name
[
16
];
sprintf
(
name
,
"slm/%d"
,
i
);
devfs_register
(
NULL
,
name
,
DEVFS_FL_DEFAULT
,
MAJOR_NR
,
i
,
S_IFCHR
|
S_IRUSR
|
S_IWUSR
,
&
slm_fops
,
NULL
);
}
return
0
;
}
...
...
@@ -1037,7 +1040,10 @@ int init_module(void)
void
cleanup_module
(
void
)
{
devfs_unregister
(
devfs_handle
);
int
i
;
for
(
i
=
0
;
i
<
MAX_SLM
;
i
++
)
devfs_remove
(
"slm/%d"
,
i
);
devfs_remove
(
"slm"
);
if
(
unregister_chrdev
(
MAJOR_NR
,
"slm"
)
!=
0
)
printk
(
KERN_ERR
"acsi_slm: cleanup_module failed
\n
"
);
atari_stram_free
(
SLMBuffer
);
...
...
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