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
118ecb9e
Commit
118ecb9e
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 pcd
pcd switched to use of gendisk
parent
67cba4d4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
drivers/block/paride/pcd.c
drivers/block/paride/pcd.c
+16
-1
No files found.
drivers/block/paride/pcd.c
View file @
118ecb9e
...
...
@@ -224,6 +224,7 @@ struct pcd_unit {
int
present
;
/* does this unit exist ? */
char
*
name
;
/* pcd0, pcd1, etc */
struct
cdrom_device_info
info
;
/* uniform cdrom interface */
struct
gendisk
disk
;
};
struct
pcd_unit
pcd
[
PCD_UNITS
];
...
...
@@ -282,6 +283,7 @@ static void pcd_init_units(void)
pcd_drive_count
=
0
;
for
(
unit
=
0
,
cd
=
pcd
;
unit
<
PCD_UNITS
;
unit
++
,
cd
++
)
{
struct
gendisk
*
disk
=
&
cd
->
disk
;
cd
->
pi
=
&
cd
->
pia
;
cd
->
present
=
0
;
cd
->
last_sense
=
0
;
...
...
@@ -298,6 +300,11 @@ static void pcd_init_units(void)
cd
->
info
.
speed
=
0
;
cd
->
info
.
capacity
=
1
;
cd
->
info
.
mask
=
0
;
disk
->
major
=
major
;
disk
->
first_minor
=
unit
;
disk
->
minor_shift
=
0
;
disk
->
major_name
=
cd
->
name
;
disk
->
fops
=
&
pcd_bdops
;
}
}
...
...
@@ -925,8 +932,15 @@ static int __init pcd_init(void)
for
(
unit
=
0
,
cd
=
pcd
;
unit
<
PCD_UNITS
;
unit
++
,
cd
++
)
{
if
(
cd
->
present
)
{
struct
gendisk
*
disk
=
&
cd
->
disk
;
register_cdrom
(
&
cd
->
info
);
devfs_plain_cdrom
(
&
cd
->
info
,
&
pcd_bdops
);
devfs_plain_cdrom
(
&
cd
->
info
,
disk
->
fops
);
add_gendisk
(
disk
);
register_disk
(
disk
,
mk_kdev
(
disk
->
major
,
disk
->
first_minor
),
1
<<
disk
->
minor_shift
,
disk
->
fops
,
0
);
}
}
...
...
@@ -942,6 +956,7 @@ static void __exit pcd_exit(void)
for
(
unit
=
0
,
cd
=
pcd
;
unit
<
PCD_UNITS
;
unit
++
,
cd
++
)
{
if
(
cd
->
present
)
{
del_gendisk
(
&
cd
->
disk
);
pi_release
(
cd
->
pi
);
unregister_cdrom
(
&
cd
->
info
);
}
...
...
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