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
ec4258f9
Commit
ec4258f9
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 swim_iop
swim_iop switched to use of gendisk
parent
db5ea6e9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
drivers/block/swim_iop.c
drivers/block/swim_iop.c
+12
-3
No files found.
drivers/block/swim_iop.c
View file @
ec4258f9
...
...
@@ -83,7 +83,8 @@ static int floppy_count;
static
struct
floppy_state
floppy_states
[
MAX_FLOPPIES
];
static
int
floppy_sizes
[
2
]
=
{
2880
,
2880
};
static
struct
gendisk
disks
[
2
];
static
char
names
[
2
][
4
];
static
spinlock_t
swim_iop_lock
=
SPIN_LOCK_UNLOCKED
;
...
...
@@ -152,8 +153,6 @@ int swimiop_init(void)
}
blk_init_queue
(
BLK_DEFAULT_QUEUE
(
MAJOR_NR
),
do_fd_request
,
&
swim_iop_lock
);
blk_size
[
MAJOR_NR
]
=
floppy_sizes
;
printk
(
"SWIM-IOP: %s by Joshua M. Thompson (funaho@jurai.org)
\n
"
,
DRIVER_VERSION
);
...
...
@@ -193,6 +192,16 @@ int swimiop_init(void)
printk
(
"SWIM-IOP: detected %d installed drives.
\n
"
,
floppy_count
);
do_floppy
=
NULL
;
for
(
i
=
0
;
i
<
floppy_count
;
i
++
)
{
struct
gendisk
*
disk
=
disks
+
i
;
disk
->
major
=
MAJOR_NR
;
disk
->
first_minor
=
i
;
disk
->
fops
=
&
floppy_fops
;
sprintf
(
names
[
i
],
"fd%d"
,
i
);
disk
->
major_name
=
names
[
i
];
set_capacity
(
disk
,
2880
*
2
);
add_disk
(
disk
);
}
return
0
;
}
...
...
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