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
39211e86
Commit
39211e86
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] cdrom cleanup
switched to devfs_remove(), killed gratitious devfs_handle_t variables.
parent
fb5d30ed
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
18 deletions
+13
-18
drivers/cdrom/aztcd.c
drivers/cdrom/aztcd.c
+6
-7
drivers/cdrom/sbpcd.c
drivers/cdrom/sbpcd.c
+3
-4
drivers/cdrom/sonycd535.c
drivers/cdrom/sonycd535.c
+4
-7
No files found.
drivers/cdrom/aztcd.c
View file @
39211e86
...
@@ -1907,16 +1907,14 @@ static int __init aztcd_init(void)
...
@@ -1907,16 +1907,14 @@ static int __init aztcd_init(void)
goto
err_out
;
goto
err_out
;
}
}
}
}
devfs_register
(
NULL
,
"aztcd"
,
DEVFS_FL_DEFAULT
,
MAJOR_NR
,
0
,
S_IFBLK
|
S_IRUGO
|
S_IWUGO
,
&
azt_fops
,
NULL
);
azt_disk
=
alloc_disk
(
1
);
azt_disk
=
alloc_disk
(
1
);
if
(
!
azt_disk
)
if
(
!
azt_disk
)
goto
err_out
2
;
goto
err_out
;
if
(
register_blkdev
(
MAJOR_NR
,
"aztcd"
,
&
azt_fops
)
!=
0
)
{
if
(
register_blkdev
(
MAJOR_NR
,
"aztcd"
,
&
azt_fops
)
!=
0
)
{
printk
(
KERN_WARNING
"aztcd: Unable to get major %d for Aztech"
printk
(
KERN_WARNING
"aztcd: Unable to get major %d for Aztech"
" CD-ROM
\n
"
,
MAJOR_NR
);
" CD-ROM
\n
"
,
MAJOR_NR
);
ret
=
-
EIO
;
ret
=
-
EIO
;
goto
err_out
3
;
goto
err_out
2
;
}
}
blk_init_queue
(
&
azt_queue
,
do_aztcd_request
,
&
aztSpin
);
blk_init_queue
(
&
azt_queue
,
do_aztcd_request
,
&
aztSpin
);
blk_queue_hardsect_size
(
&
azt_queue
,
2048
);
blk_queue_hardsect_size
(
&
azt_queue
,
2048
);
...
@@ -1926,15 +1924,16 @@ static int __init aztcd_init(void)
...
@@ -1926,15 +1924,16 @@ static int __init aztcd_init(void)
sprintf
(
azt_disk
->
disk_name
,
"aztcd"
);
sprintf
(
azt_disk
->
disk_name
,
"aztcd"
);
azt_disk
->
queue
=
&
azt_queue
;
azt_disk
->
queue
=
&
azt_queue
;
add_disk
(
azt_disk
);
add_disk
(
azt_disk
);
devfs_register
(
NULL
,
"aztcd"
,
DEVFS_FL_DEFAULT
,
azt_disk
->
major
,
azt_disk
->
first_minor
,
S_IFBLK
|
S_IRUGO
|
S_IWUGO
,
azt_disk
->
fops
,
NULL
);
azt_invalidate_buffers
();
azt_invalidate_buffers
();
aztPresent
=
1
;
aztPresent
=
1
;
aztCloseDoor
();
aztCloseDoor
();
return
(
0
);
return
(
0
);
err_out3:
put_disk
(
azt_disk
);
err_out2:
err_out2:
devfs_remove
(
"aztcd"
);
put_disk
(
azt_disk
);
err_out:
err_out:
if
((
azt_port
==
0x1f0
)
||
(
azt_port
==
0x170
))
{
if
((
azt_port
==
0x1f0
)
||
(
azt_port
==
0x170
))
{
SWITCH_IDE_MASTER
;
SWITCH_IDE_MASTER
;
...
...
drivers/cdrom/sbpcd.c
View file @
39211e86
...
@@ -5637,8 +5637,6 @@ static int __init config_spea(void)
...
@@ -5637,8 +5637,6 @@ static int __init config_spea(void)
* Called once at boot or load time.
* Called once at boot or load time.
*/
*/
static
devfs_handle_t
devfs_handle
;
/* FIXME: cleanups after failed allocations are too ugly for words */
/* FIXME: cleanups after failed allocations are too ugly for words */
#ifdef MODULE
#ifdef MODULE
int
__init
__sbpcd_init
(
void
)
int
__init
__sbpcd_init
(
void
)
...
@@ -5808,7 +5806,7 @@ int __init sbpcd_init(void)
...
@@ -5808,7 +5806,7 @@ int __init sbpcd_init(void)
}
}
blk_init_queue
(
&
sbpcd_queue
,
do_sbpcd_request
,
&
sbpcd_lock
);
blk_init_queue
(
&
sbpcd_queue
,
do_sbpcd_request
,
&
sbpcd_lock
);
devfs_
handle
=
devfs_
mk_dir
(
NULL
,
"sbp"
,
NULL
);
devfs_mk_dir
(
NULL
,
"sbp"
,
NULL
);
for
(
j
=
0
;
j
<
NR_SBPCD
;
j
++
)
for
(
j
=
0
;
j
<
NR_SBPCD
;
j
++
)
{
{
...
@@ -5902,12 +5900,12 @@ void sbpcd_exit(void)
...
@@ -5902,12 +5900,12 @@ void sbpcd_exit(void)
}
}
release_region
(
CDo_command
,
4
);
release_region
(
CDo_command
,
4
);
blk_cleanup_queue
(
&
sbpcd_queue
);
blk_cleanup_queue
(
&
sbpcd_queue
);
devfs_unregister
(
devfs_handle
);
for
(
j
=
0
;
j
<
NR_SBPCD
;
j
++
)
for
(
j
=
0
;
j
<
NR_SBPCD
;
j
++
)
{
{
if
(
D_S
[
j
].
drv_id
==-
1
)
continue
;
if
(
D_S
[
j
].
drv_id
==-
1
)
continue
;
del_gendisk
(
D_S
[
j
].
disk
);
del_gendisk
(
D_S
[
j
].
disk
);
put_disk
(
D_S
[
j
].
disk
);
put_disk
(
D_S
[
j
].
disk
);
devfs_remove
(
"sbp/c0t%d"
,
j
);
vfree
(
D_S
[
j
].
sbp_buf
);
vfree
(
D_S
[
j
].
sbp_buf
);
if
(
D_S
[
j
].
sbp_audsiz
>
0
)
vfree
(
D_S
[
j
].
aud_buf
);
if
(
D_S
[
j
].
sbp_audsiz
>
0
)
vfree
(
D_S
[
j
].
aud_buf
);
if
((
unregister_cdrom
(
D_S
[
j
].
sbpcd_infop
)
==
-
EINVAL
))
if
((
unregister_cdrom
(
D_S
[
j
].
sbpcd_infop
)
==
-
EINVAL
))
...
@@ -5917,6 +5915,7 @@ void sbpcd_exit(void)
...
@@ -5917,6 +5915,7 @@ void sbpcd_exit(void)
}
}
vfree
(
D_S
[
j
].
sbpcd_infop
);
vfree
(
D_S
[
j
].
sbpcd_infop
);
}
}
devfs_remove
(
"sbp"
);
msg
(
DBG_INF
,
"%s module released.
\n
"
,
major_name
);
msg
(
DBG_INF
,
"%s module released.
\n
"
,
major_name
);
}
}
...
...
drivers/cdrom/sonycd535.c
View file @
39211e86
...
@@ -1445,7 +1445,6 @@ static int __init sony535_init(void)
...
@@ -1445,7 +1445,6 @@ static int __init sony535_init(void)
int
got_result
=
0
;
int
got_result
=
0
;
int
tmp_irq
;
int
tmp_irq
;
int
i
;
int
i
;
devfs_handle_t
sony_devfs_handle
;
int
err
;
int
err
;
/* Setting the base I/O address to 0 will disable it. */
/* Setting the base I/O address to 0 will disable it. */
...
@@ -1547,11 +1546,6 @@ static int __init sony535_init(void)
...
@@ -1547,11 +1546,6 @@ static int __init sony535_init(void)
printk
(
"IRQ%d, "
,
tmp_irq
);
printk
(
"IRQ%d, "
,
tmp_irq
);
printk
(
"using %d byte buffer
\n
"
,
sony_buffer_size
);
printk
(
"using %d byte buffer
\n
"
,
sony_buffer_size
);
sony_devfs_handle
=
devfs_register
(
NULL
,
CDU535_HANDLE
,
DEVFS_FL_DEFAULT
,
MAJOR_NR
,
0
,
S_IFBLK
|
S_IRUGO
|
S_IWUGO
,
&
cdu_fops
,
NULL
);
if
(
register_blkdev
(
MAJOR_NR
,
CDU535_HANDLE
,
&
cdu_fops
))
{
if
(
register_blkdev
(
MAJOR_NR
,
CDU535_HANDLE
,
&
cdu_fops
))
{
printk
(
"Unable to get major %d for %s
\n
"
,
printk
(
"Unable to get major %d for %s
\n
"
,
MAJOR_NR
,
CDU535_MESSAGE_NAME
);
MAJOR_NR
,
CDU535_MESSAGE_NAME
);
...
@@ -1595,6 +1589,10 @@ static int __init sony535_init(void)
...
@@ -1595,6 +1589,10 @@ static int __init sony535_init(void)
}
}
cdu_disk
->
queue
=
&
sonycd535_queue
;
cdu_disk
->
queue
=
&
sonycd535_queue
;
add_disk
(
cdu_disk
);
add_disk
(
cdu_disk
);
devfs_register
(
NULL
,
CDU535_HANDLE
,
DEVFS_FL_DEFAULT
,
cdu_disk
->
major
,
cdu_disk
->
first_minor
,
S_IFBLK
|
S_IRUGO
|
S_IWUGO
,
cdu_disk
->
fops
,
NULL
);
return
0
;
return
0
;
out7:
out7:
...
@@ -1613,7 +1611,6 @@ static int __init sony535_init(void)
...
@@ -1613,7 +1611,6 @@ static int __init sony535_init(void)
blk_cleanup_queue
(
&
sonycd535_queue
);
blk_cleanup_queue
(
&
sonycd535_queue
);
unregister_blkdev
(
MAJOR_NR
,
CDU535_HANDLE
);
unregister_blkdev
(
MAJOR_NR
,
CDU535_HANDLE
);
out1:
out1:
devfs_unregister
(
sony_devfs_handle
);
if
(
sony535_irq_used
)
if
(
sony535_irq_used
)
free_irq
(
sony535_irq_used
,
NULL
);
free_irq
(
sony535_irq_used
,
NULL
);
return
err
;
return
err
;
...
...
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