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
103ba0b8
Commit
103ba0b8
authored
Jul 11, 2003
by
Alan Cox
Committed by
Steve French
Jul 11, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] clean up floppy98 a bit
parent
f5ccc046
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
17 deletions
+23
-17
drivers/block/floppy98.c
drivers/block/floppy98.c
+23
-17
No files found.
drivers/block/floppy98.c
View file @
103ba0b8
...
...
@@ -4064,21 +4064,32 @@ static struct block_device_operations floppy_fops = {
static
char
*
table
[]
=
{
""
,
#if 0
"d360",
"d360",
#else
"h1232"
,
"h1232"
,
#endif
"h1200"
,
"u360"
,
"u720"
,
"h360"
,
"h720"
,
"u1440"
,
"u2880"
,
"CompaQ"
,
"h1440"
,
"u1680"
,
"h410"
,
"u820"
,
"h1476"
,
"u1722"
,
"h420"
,
"u830"
,
"h1494"
,
"u1743"
,
"h880"
,
"u1040"
,
"u1120"
,
"h1600"
,
"u1760"
,
"u1920"
,
"u3200"
,
"u3520"
,
"u3840"
,
"u1840"
,
"u800"
,
"u1600"
,
"h1200"
,
"u360"
,
"u720"
,
"h360"
,
"h720"
,
"u1440"
,
"u2880"
,
"CompaQ"
,
"h1440"
,
"u1680"
,
"h410"
,
"u820"
,
"h1476"
,
"u1722"
,
"h420"
,
"u830"
,
"h1494"
,
"u1743"
,
"h880"
,
"u1040"
,
"u1120"
,
"h1600"
,
"u1760"
,
"u1920"
,
"u3200"
,
"u3520"
,
"u3840"
,
"u1840"
,
"u800"
,
"u1600"
,
NULL
};
static
int
t360
[]
=
{
1
,
0
},
t1200
[]
=
{
2
,
5
,
6
,
10
,
12
,
14
,
16
,
18
,
20
,
23
,
0
},
t3in
[]
=
{
8
,
9
,
26
,
27
,
28
,
7
,
11
,
15
,
19
,
24
,
25
,
29
,
31
,
3
,
4
,
13
,
17
,
21
,
22
,
30
,
0
};
static
int
*
table_sup
[]
=
{
NULL
,
t360
,
t1200
,
t3in
+
5
+
8
,
t3in
+
5
,
t3in
,
t3in
};
static
int
t360
[]
=
{
1
,
0
};
static
int
t1200
[]
=
{
2
,
5
,
6
,
10
,
12
,
14
,
16
,
18
,
20
,
23
,
0
};
static
int
t3in
[]
=
{
8
,
9
,
26
,
27
,
28
,
7
,
11
,
15
,
19
,
24
,
25
,
29
,
31
,
3
,
4
,
13
,
17
,
21
,
22
,
30
,
0
};
static
int
*
table_sup
[]
=
{
NULL
,
t360
,
t1200
,
t3in
+
5
+
8
,
t3in
+
5
,
t3in
,
t3in
};
static
void
__init
register_devfs_entries
(
int
drive
)
{
...
...
@@ -4402,7 +4413,7 @@ int __init floppy_init(void)
return
0
;
out1:
del_timer
(
&
fd_timeout
);
del_timer
_sync
(
&
fd_timeout
);
out2:
blk_unregister_region
(
MKDEV
(
FLOPPY_MAJOR
,
0
),
256
);
unregister_blkdev
(
FLOPPY_MAJOR
,
"fd"
);
...
...
@@ -4430,11 +4441,9 @@ static int floppy_grab_irq_and_dma(void)
return
0
;
}
spin_unlock_irqrestore
(
&
floppy_usage_lock
,
flags
);
MOD_INC_USE_COUNT
;
if
(
fd_request_irq
())
{
DPRINT
(
"Unable to grab IRQ%d for the floppy driver
\n
"
,
FLOPPY_IRQ
);
MOD_DEC_USE_COUNT
;
spin_lock_irqsave
(
&
floppy_usage_lock
,
flags
);
usage_count
--
;
spin_unlock_irqrestore
(
&
floppy_usage_lock
,
flags
);
...
...
@@ -4444,7 +4453,6 @@ static int floppy_grab_irq_and_dma(void)
DPRINT
(
"Unable to grab DMA%d for the floppy driver
\n
"
,
FLOPPY_DMA
);
fd_free_irq
();
MOD_DEC_USE_COUNT
;
spin_lock_irqsave
(
&
floppy_usage_lock
,
flags
);
usage_count
--
;
spin_unlock_irqrestore
(
&
floppy_usage_lock
,
flags
);
...
...
@@ -4521,7 +4529,6 @@ static int floppy_grab_irq_and_dma(void)
release_region
(
0x04be
,
1
);
}
}
MOD_DEC_USE_COUNT
;
spin_lock_irqsave
(
&
floppy_usage_lock
,
flags
);
usage_count
--
;
spin_unlock_irqrestore
(
&
floppy_usage_lock
,
flags
);
...
...
@@ -4587,7 +4594,6 @@ static void floppy_release_irq_and_dma(void)
}
}
fdc
=
old_fdc
;
MOD_DEC_USE_COUNT
;
}
...
...
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