diff options
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/DAC960.c | 9 | ||||
-rw-r--r-- | drivers/block/DAC960.h | 2 | ||||
-rw-r--r-- | drivers/block/aoe/aoecmd.c | 2 | ||||
-rw-r--r-- | drivers/block/ataflop.c | 16 | ||||
-rw-r--r-- | drivers/block/rsxx/cregs.c | 7 | ||||
-rw-r--r-- | drivers/block/rsxx/dma.c | 7 | ||||
-rw-r--r-- | drivers/block/skd_main.c | 6 | ||||
-rw-r--r-- | drivers/block/sunvdc.c | 9 | ||||
-rw-r--r-- | drivers/block/swim3.c | 2 | ||||
-rw-r--r-- | drivers/block/umem.c | 5 | ||||
-rw-r--r-- | drivers/block/xsysace.c | 6 |
11 files changed, 33 insertions, 38 deletions
diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c index 255591ab3716..442e777bdfb2 100644 --- a/drivers/block/DAC960.c +++ b/drivers/block/DAC960.c @@ -3079,11 +3079,10 @@ DAC960_InitializeController(DAC960_Controller_T *Controller) /* Initialize the Monitoring Timer. */ - init_timer(&Controller->MonitoringTimer); + timer_setup(&Controller->MonitoringTimer, + DAC960_MonitoringTimerFunction, 0); Controller->MonitoringTimer.expires = jiffies + DAC960_MonitoringTimerInterval; - Controller->MonitoringTimer.data = (unsigned long) Controller; - Controller->MonitoringTimer.function = DAC960_MonitoringTimerFunction; add_timer(&Controller->MonitoringTimer); Controller->ControllerInitialized = true; return true; @@ -5620,9 +5619,9 @@ static void DAC960_V2_QueueMonitoringCommand(DAC960_Command_T *Command) the status of DAC960 Controllers. */ -static void DAC960_MonitoringTimerFunction(unsigned long TimerData) +static void DAC960_MonitoringTimerFunction(struct timer_list *t) { - DAC960_Controller_T *Controller = (DAC960_Controller_T *) TimerData; + DAC960_Controller_T *Controller = from_timer(Controller, t, MonitoringTimer); DAC960_Command_T *Command; unsigned long flags; diff --git a/drivers/block/DAC960.h b/drivers/block/DAC960.h index 85fa9bb63759..6a6226a2b932 100644 --- a/drivers/block/DAC960.h +++ b/drivers/block/DAC960.h @@ -4406,7 +4406,7 @@ static irqreturn_t DAC960_PD_InterruptHandler(int, void *); static irqreturn_t DAC960_P_InterruptHandler(int, void *); static void DAC960_V1_QueueMonitoringCommand(DAC960_Command_T *); static void DAC960_V2_QueueMonitoringCommand(DAC960_Command_T *); -static void DAC960_MonitoringTimerFunction(unsigned long); +static void DAC960_MonitoringTimerFunction(struct timer_list *); static void DAC960_Message(DAC960_MessageLevel_T, unsigned char *, DAC960_Controller_T *, ...); static void DAC960_CreateProcEntries(DAC960_Controller_T *); diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c index 55ab25f79a08..812fed069708 100644 --- a/drivers/block/aoe/aoecmd.c +++ b/drivers/block/aoe/aoecmd.c @@ -1429,7 +1429,7 @@ aoecmd_ata_id(struct aoedev *d) d->rttavg = RTTAVG_INIT; d->rttdev = RTTDEV_INIT; - d->timer.function = (TIMER_FUNC_TYPE)rexmit_timer; + d->timer.function = rexmit_timer; skb = skb_clone(skb, GFP_ATOMIC); if (skb) { diff --git a/drivers/block/ataflop.c b/drivers/block/ataflop.c index ae596e55bcb6..8bc3b9fd8dd2 100644 --- a/drivers/block/ataflop.c +++ b/drivers/block/ataflop.c @@ -342,8 +342,8 @@ static int NeedSeek = 0; static void fd_select_side( int side ); static void fd_select_drive( int drive ); static void fd_deselect( void ); -static void fd_motor_off_timer( unsigned long dummy ); -static void check_change( unsigned long dummy ); +static void fd_motor_off_timer(struct timer_list *unused); +static void check_change(struct timer_list *unused); static irqreturn_t floppy_irq (int irq, void *dummy); static void fd_error( void ); static int do_format(int drive, int type, struct atari_format_descr *desc); @@ -353,12 +353,12 @@ static void fd_calibrate_done( int status ); static void fd_seek( void ); static void fd_seek_done( int status ); static void fd_rwsec( void ); -static void fd_readtrack_check( unsigned long dummy ); +static void fd_readtrack_check(struct timer_list *unused); static void fd_rwsec_done( int status ); static void fd_rwsec_done1(int status); static void fd_writetrack( void ); static void fd_writetrack_done( int status ); -static void fd_times_out( unsigned long dummy ); +static void fd_times_out(struct timer_list *unused); static void finish_fdc( void ); static void finish_fdc_done( int dummy ); static void setup_req_params( int drive ); @@ -479,7 +479,7 @@ static void fd_deselect( void ) * counts the index signals, which arrive only if one drive is selected. */ -static void fd_motor_off_timer( unsigned long dummy ) +static void fd_motor_off_timer(struct timer_list *unused) { unsigned char status; @@ -515,7 +515,7 @@ static void fd_motor_off_timer( unsigned long dummy ) * as possible) and keep track of the current state of the write protection. */ -static void check_change( unsigned long dummy ) +static void check_change(struct timer_list *unused) { static int drive = 0; @@ -966,7 +966,7 @@ static void fd_rwsec( void ) } -static void fd_readtrack_check( unsigned long dummy ) +static void fd_readtrack_check(struct timer_list *unused) { unsigned long flags, addr, addr2; @@ -1237,7 +1237,7 @@ static void fd_writetrack_done( int status ) fd_error(); } -static void fd_times_out( unsigned long dummy ) +static void fd_times_out(struct timer_list *unused) { atari_disable_irq( IRQ_MFP_FDC ); if (!FloppyIRQHandler) goto end; /* int occurred after timer was fired, but diff --git a/drivers/block/rsxx/cregs.c b/drivers/block/rsxx/cregs.c index 926dce9c452f..c148e83e4ed7 100644 --- a/drivers/block/rsxx/cregs.c +++ b/drivers/block/rsxx/cregs.c @@ -203,9 +203,9 @@ static int creg_queue_cmd(struct rsxx_cardinfo *card, return 0; } -static void creg_cmd_timed_out(unsigned long data) +static void creg_cmd_timed_out(struct timer_list *t) { - struct rsxx_cardinfo *card = (struct rsxx_cardinfo *) data; + struct rsxx_cardinfo *card = from_timer(card, t, creg_ctrl.cmd_timer); struct creg_cmd *cmd; spin_lock(&card->creg_ctrl.lock); @@ -745,8 +745,7 @@ int rsxx_creg_setup(struct rsxx_cardinfo *card) mutex_init(&card->creg_ctrl.reset_lock); INIT_LIST_HEAD(&card->creg_ctrl.queue); spin_lock_init(&card->creg_ctrl.lock); - setup_timer(&card->creg_ctrl.cmd_timer, creg_cmd_timed_out, - (unsigned long) card); + timer_setup(&card->creg_ctrl.cmd_timer, creg_cmd_timed_out, 0); return 0; } diff --git a/drivers/block/rsxx/dma.c b/drivers/block/rsxx/dma.c index 6a1b2177951c..beaccf197a5a 100644 --- a/drivers/block/rsxx/dma.c +++ b/drivers/block/rsxx/dma.c @@ -354,9 +354,9 @@ static void rsxx_handle_dma_error(struct rsxx_dma_ctrl *ctrl, rsxx_complete_dma(ctrl, dma, status); } -static void dma_engine_stalled(unsigned long data) +static void dma_engine_stalled(struct timer_list *t) { - struct rsxx_dma_ctrl *ctrl = (struct rsxx_dma_ctrl *)data; + struct rsxx_dma_ctrl *ctrl = from_timer(ctrl, t, activity_timer); int cnt; if (atomic_read(&ctrl->stats.hw_q_depth) == 0 || @@ -838,8 +838,7 @@ static int rsxx_dma_ctrl_init(struct pci_dev *dev, mutex_init(&ctrl->work_lock); INIT_LIST_HEAD(&ctrl->queue); - setup_timer(&ctrl->activity_timer, dma_engine_stalled, - (unsigned long)ctrl); + timer_setup(&ctrl->activity_timer, dma_engine_stalled, 0); ctrl->issue_wq = alloc_ordered_workqueue(DRIVER_NAME"_issue", 0); if (!ctrl->issue_wq) diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c index 2819f23e8bf2..de0d08133c7e 100644 --- a/drivers/block/skd_main.c +++ b/drivers/block/skd_main.c @@ -707,9 +707,9 @@ static void skd_start_queue(struct work_struct *work) blk_mq_start_hw_queues(skdev->queue); } -static void skd_timer_tick(ulong arg) +static void skd_timer_tick(struct timer_list *t) { - struct skd_device *skdev = (struct skd_device *)arg; + struct skd_device *skdev = from_timer(skdev, t, timer); unsigned long reqflags; u32 state; @@ -857,7 +857,7 @@ static int skd_start_timer(struct skd_device *skdev) { int rc; - setup_timer(&skdev->timer, skd_timer_tick, (ulong)skdev); + timer_setup(&skdev->timer, skd_timer_tick, 0); rc = mod_timer(&skdev->timer, (jiffies + HZ)); if (rc) diff --git a/drivers/block/sunvdc.c b/drivers/block/sunvdc.c index ad9749463d4f..5ca56bfae63c 100644 --- a/drivers/block/sunvdc.c +++ b/drivers/block/sunvdc.c @@ -81,7 +81,7 @@ struct vdc_port { static void vdc_ldc_reset(struct vdc_port *port); static void vdc_ldc_reset_work(struct work_struct *work); -static void vdc_ldc_reset_timer(unsigned long _arg); +static void vdc_ldc_reset_timer(struct timer_list *t); static inline struct vdc_port *to_vdc_port(struct vio_driver_state *vio) { @@ -974,8 +974,7 @@ static int vdc_port_probe(struct vio_dev *vdev, const struct vio_device_id *id) */ ldc_timeout = mdesc_get_property(hp, vdev->mp, "vdc-timeout", NULL); port->ldc_timeout = ldc_timeout ? *ldc_timeout : 0; - setup_timer(&port->ldc_reset_timer, vdc_ldc_reset_timer, - (unsigned long)port); + timer_setup(&port->ldc_reset_timer, vdc_ldc_reset_timer, 0); INIT_WORK(&port->ldc_reset_work, vdc_ldc_reset_work); err = vio_driver_init(&port->vio, vdev, VDEV_DISK, @@ -1087,9 +1086,9 @@ static void vdc_queue_drain(struct vdc_port *port) __blk_end_request_all(req, BLK_STS_IOERR); } -static void vdc_ldc_reset_timer(unsigned long _arg) +static void vdc_ldc_reset_timer(struct timer_list *t) { - struct vdc_port *port = (struct vdc_port *) _arg; + struct vdc_port *port = from_timer(port, t, ldc_reset_timer); struct vio_driver_state *vio = &port->vio; unsigned long flags; diff --git a/drivers/block/swim3.c b/drivers/block/swim3.c index e620e423102b..af51015d056e 100644 --- a/drivers/block/swim3.c +++ b/drivers/block/swim3.c @@ -397,7 +397,7 @@ static void set_timeout(struct floppy_state *fs, int nticks, if (fs->timeout_pending) del_timer(&fs->timeout); fs->timeout.expires = jiffies + nticks; - fs->timeout.function = (TIMER_FUNC_TYPE)proc; + fs->timeout.function = proc; add_timer(&fs->timeout); fs->timeout_pending = 1; } diff --git a/drivers/block/umem.c b/drivers/block/umem.c index 0677d2514665..8077123678ad 100644 --- a/drivers/block/umem.c +++ b/drivers/block/umem.c @@ -718,7 +718,7 @@ static void check_batteries(struct cardinfo *card) set_fault_to_battery_status(card); } -static void check_all_batteries(unsigned long ptr) +static void check_all_batteries(struct timer_list *unused) { int i; @@ -738,8 +738,7 @@ static void check_all_batteries(unsigned long ptr) static void init_battery_timer(void) { - init_timer(&battery_timer); - battery_timer.function = check_all_batteries; + timer_setup(&battery_timer, check_all_batteries, 0); battery_timer.expires = jiffies + (HZ * 60); add_timer(&battery_timer); } diff --git a/drivers/block/xsysace.c b/drivers/block/xsysace.c index 14459d66ef0c..c24589414c75 100644 --- a/drivers/block/xsysace.c +++ b/drivers/block/xsysace.c @@ -770,9 +770,9 @@ static void ace_fsm_tasklet(unsigned long data) spin_unlock_irqrestore(&ace->lock, flags); } -static void ace_stall_timer(unsigned long data) +static void ace_stall_timer(struct timer_list *t) { - struct ace_device *ace = (void *)data; + struct ace_device *ace = from_timer(ace, t, stall_timer); unsigned long flags; dev_warn(ace->dev, @@ -984,7 +984,7 @@ static int ace_setup(struct ace_device *ace) * Initialize the state machine tasklet and stall timer */ tasklet_init(&ace->fsm_tasklet, ace_fsm_tasklet, (unsigned long)ace); - setup_timer(&ace->stall_timer, ace_stall_timer, (unsigned long)ace); + timer_setup(&ace->stall_timer, ace_stall_timer, 0); /* * Initialize the request queue |