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
6a190a86
Commit
6a190a86
authored
Mar 20, 2003
by
Geert Uytterhoeven
Committed by
Linus Torvalds
Mar 20, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] Amiflop mod_timer()
Amiga floppy driver: Convert {del,add}_timer() sequences to mod_timer().
parent
2a12c1bd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
10 deletions
+3
-10
drivers/block/amiflop.c
drivers/block/amiflop.c
+3
-10
No files found.
drivers/block/amiflop.c
View file @
6a190a86
...
...
@@ -353,10 +353,8 @@ static int fd_motor_on(int nr)
unit
[
nr
].
motor
=
1
;
fd_select
(
nr
);
del_timer
(
&
motor_on_timer
);
motor_on_timer
.
data
=
nr
;
motor_on_timer
.
expires
=
jiffies
+
HZ
/
2
;
add_timer
(
&
motor_on_timer
);
mod_timer
(
&
motor_on_timer
,
jiffies
+
HZ
/
2
);
on_attempts
=
10
;
sleep_on
(
&
motor_wait
);
...
...
@@ -414,11 +412,9 @@ static void floppy_off (unsigned int nr)
int
drive
;
drive
=
nr
&
3
;
del_timer
(
motor_off_timer
+
drive
);
motor_off_timer
[
drive
].
expires
=
jiffies
+
3
*
HZ
;
/* called this way it is always from interrupt */
motor_off_timer
[
drive
].
data
=
nr
|
0x80000000
;
add_timer
(
motor_off_timer
+
nr
);
mod_timer
(
motor_off_timer
+
drive
,
jiffies
+
3
*
HZ
);
}
static
int
fd_calibrate
(
int
drive
)
...
...
@@ -1429,10 +1425,7 @@ static void redo_fd_request(void)
floppy
->
dirty
=
1
;
/* reset the timer */
del_timer
(
flush_track_timer
+
drive
);
flush_track_timer
[
drive
].
expires
=
jiffies
+
1
;
add_timer
(
flush_track_timer
+
drive
);
mod_timer
(
flush_track_timer
+
drive
,
jiffies
+
1
);
local_irq_restore
(
flags
);
break
;
}
...
...
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