Skip to content

Commit

Permalink
ide: Convert timers to use timer_setup()
Browse files Browse the repository at this point in the history
In preparation for unconditionally passing the struct timer_list pointer to
all timer callbacks, switch to using the new timer_setup() and from_timer()
to pass the timer pointer explicitly.

Cc: "David S. Miller" <[email protected]>
Cc: [email protected]
Signed-off-by: Kees Cook <[email protected]>
  • Loading branch information
kees committed Nov 6, 2017
1 parent 2bccef3 commit 10738ba
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions drivers/ide/ide-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -611,9 +611,9 @@ static int drive_is_ready(ide_drive_t *drive)
* logic that wants cleaning up.
*/

void ide_timer_expiry (unsigned long data)
void ide_timer_expiry (struct timer_list *t)
{
ide_hwif_t *hwif = (ide_hwif_t *)data;
ide_hwif_t *hwif = from_timer(hwif, t, timer);
ide_drive_t *uninitialized_var(drive);
ide_handler_t *handler;
unsigned long flags;
Expand Down
2 changes: 1 addition & 1 deletion drivers/ide/ide-probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -1184,7 +1184,7 @@ static void ide_init_port_data(ide_hwif_t *hwif, unsigned int index)

spin_lock_init(&hwif->lock);

setup_timer(&hwif->timer, &ide_timer_expiry, (unsigned long)hwif);
timer_setup(&hwif->timer, ide_timer_expiry, 0);

init_completion(&hwif->gendev_rel_comp);

Expand Down
2 changes: 1 addition & 1 deletion include/linux/ide.h
Original file line number Diff line number Diff line change
Expand Up @@ -1211,7 +1211,7 @@ extern int ide_wait_not_busy(ide_hwif_t *hwif, unsigned long timeout);

extern void ide_stall_queue(ide_drive_t *drive, unsigned long timeout);

extern void ide_timer_expiry(unsigned long);
extern void ide_timer_expiry(struct timer_list *t);
extern irqreturn_t ide_intr(int irq, void *dev_id);
extern void do_ide_request(struct request_queue *);
extern void ide_requeue_and_plug(ide_drive_t *drive, struct request *rq);
Expand Down

0 comments on commit 10738ba

Please sign in to comment.