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
71dd8909
Commit
71dd8909
authored
Sep 21, 2002
by
Alexander Viro
Committed by
Linus Torvalds
Sep 21, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] gendisk for sonycd
sonycd switched to use of gendisk; missing initcall restored
parent
5d94ee49
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
11 deletions
+17
-11
drivers/cdrom/sonycd535.c
drivers/cdrom/sonycd535.c
+17
-11
No files found.
drivers/cdrom/sonycd535.c
View file @
71dd8909
...
...
@@ -1448,18 +1448,25 @@ cdu_release(struct inode *inode,
static
struct
block_device_operations
cdu_fops
=
{
owner:
THIS_MODULE
,
open:
cdu_open
,
release:
cdu_release
,
ioctl:
cdu_ioctl
,
check_media_change:
cdu535_check_media_change
,
.
owner
=
THIS_MODULE
,
.
open
=
cdu_open
,
.
release
=
cdu_release
,
.
ioctl
=
cdu_ioctl
,
.
check_media_change
=
cdu535_check_media_change
,
};
static
struct
gendisk
cdu_disk
=
{
.
major
=
MAJOR_NR
,
.
first_minor
=
0
,
.
minor_shift
=
0
,
.
fops
=
&
cdu_fops
,
.
major_name
=
"cdu"
/*
* Initialize the driver.
*/
int
__init
sony535_init
(
void
)
static
int
__init
sony535_init
(
void
)
{
struct
s535_sony_drive_config
drive_config
;
Byte
cmd_buff
[
3
];
...
...
@@ -1648,7 +1655,7 @@ sony535_init(void)
return
-
EIO
;
}
register_disk
(
NULL
,
mk_kdev
(
MAJOR_NR
,
0
),
1
,
&
cdu_fops
,
0
);
add_disk
(
&
cdu_disk
);
return
0
;
}
...
...
@@ -1688,7 +1695,7 @@ __setup("sonycd535=", sonycd535_setup);
#endif
/* MODULE */
void
__exit
sony535_exit
(
void
)
s
tatic
s
ony535_exit
(
void
)
{
int
i
;
...
...
@@ -1700,15 +1707,14 @@ sony535_exit(void)
kfree
(
sony_toc
);
devfs_find_and_unregister
(
NULL
,
CDU535_HANDLE
,
0
,
0
,
DEVFS_SPECIAL_BLK
,
0
);
del_gendisk
(
&
cdu_disk
);
if
(
unregister_blkdev
(
MAJOR_NR
,
CDU535_HANDLE
)
==
-
EINVAL
)
printk
(
"Uh oh, couldn't unregister "
CDU535_HANDLE
"
\n
"
);
else
printk
(
KERN_INFO
CDU535_HANDLE
" module released
\n
"
);
}
#ifdef MODULE
module_init
(
sony535_init
);
#endif
module_exit
(
sony535_exit
);
...
...
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