use setup_timer() helper function.
cover use setup_timer() helper function.
This series uses setup_timer() helper function. The series addresses the files under drivers/mmc/host/*.
Allen Pais (4):
mmc-host: wbsd: use setup_timer() helper.
mmc-host: via: use setup_timer() helper.
mmc-host: vub300: use setup_timer() helper.
mmc-host: mxcmmc: use setup_timer() helper.
drivers/mmc/host/mxcmmc.c | 4 +--- drivers/mmc/host/via-sdmmc.c | 4 +--- drivers/mmc/host/vub300.c | 10 ++++------ drivers/mmc/host/wbsd.c | 5 ++--- 4 files changed, 8 insertions(+), 15 deletions(-)
Signature · 1 line
2.7.4
PATCH 1/4 mmc-host: wbsd: use setup_timer() helper.
Use setup_timer function instead of initializing timer with the function and data fields.
--- drivers/mmc/host/wbsd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/mmc/host/wbsd.c +2 -3
@@ -1224,9 +1224,8 @@ static int wbsd_alloc_mmc(struct device *dev)/* * Set up timers */ -init_timer (&host->ignore_timer); - host->ignore_timer.data = (unsigned long )host; - host->ignore_timer.function = wbsd_reset_ignore; +setup_timer (&host->ignore_timer, wbsd_reset_ignore, + (unsigned long )host);/* * Maximum number of segments. Worst case is one sector per segment
Signature · 1 line
2.7.4
PATCH 2/4 mmc-host: via: use setup_timer() helper.
In reply to Allen Pais Use setup_timer function instead of initializing timer with the function and data fields.
--- drivers/mmc/host/via-sdmmc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/mmc/host/via-sdmmc.c +1 -3
@@ -1036,9 +1036,7 @@ static void via_init_mmc_host(struct via_crdr_mmc_host *host)u32 lenreg;u32 status; -init_timer (&host->timer); - host->timer.data = (unsigned long )host; - host->timer.function = via_sdc_timeout; +setup_timer (&host->timer, via_sdc_timeout, (unsigned long )host);spin_lock_init (&host->lock);
Signature · 1 line
2.7.4
PATCH 3/4 mmc-host: vub300: use setup_timer() helper.
In reply to Allen Pais Use setup_timer function instead of initializing timer with the function and data fields.
--- drivers/mmc/host/vub300.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
drivers/mmc/host/vub300.c +4 -6
@@ -2323,13 +2323,11 @@ static int vub300_probe(struct usb_interface *interface,INIT_WORK (&vub300->cmndwork, vub300_cmndwork_thread);INIT_WORK (&vub300->deadwork, vub300_deadwork_thread);kref_init (&vub300->kref); -init_timer (&vub300->sg_transfer_timer); - vub300->sg_transfer_timer.data = (unsigned long )vub300; - vub300->sg_transfer_timer.function = vub300_sg_timed_out; +setup_timer (&vub300->sg_transfer_timer, vub300_sg_timed_out, + (unsigned long )vub300);kref_get (&vub300->kref); -init_timer (&vub300->inactivity_timer); - vub300->inactivity_timer.data = (unsigned long )vub300; - vub300->inactivity_timer.function = vub300_inactivity_timer_expired; +setup_timer (&vub300->inactivity_timer, + vub300_inactivity_timer_expired, (unsigned long )vub300); vub300->inactivity_timer.expires = jiffies +HZ ;add_timer (&vub300->inactivity_timer);if (vub300->card_present)
Signature · 1 line
2.7.4
PATCH 4/4 mmc-host: mxcmmc: use setup_timer() helper.
In reply to Allen Pais Use setup_timer function instead of initializing timer with the function and data fields.
--- drivers/mmc/host/mxcmmc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/mmc/host/mxcmmc.c +1 -3
@@ -1165,9 +1165,7 @@ static int mxcmci_probe(struct platform_device *pdev) goto out_free_dma; } -init_timer (&host->watchdog); - host->watchdog.function = &mxcmci_watchdog; - host->watchdog.data = (unsigned long )mmc; +setup_timer (&host->watchdog, &mxcmci_watchdog, (unsigned long )mmc);mmc_add_host (mmc);
Signature · 1 line
2.7.4
Quoted 3 lines · Allen Pais
This series uses
setup_timer()helper function. The series addresses the files underdrivers/mmc/host/*.
Better to provide some solid info if that is done by some static tools like coccinelle?
But looks like a nice cleanup,
Quoted 13 lines
Allen Pais (4):
mmc-host: wbsd: usesetup_timer()helper.
mmc-host: via: usesetup_timer()helper.
mmc-host: vub300: usesetup_timer()helper.
mmc-host: mxcmmc: usesetup_timer()helper.drivers/mmc/host/mxcmmc.c | 4 +--- drivers/mmc/host/via-sdmmc.c | 4 +--- drivers/mmc/host/vub300.c | 10 ++++------ drivers/mmc/host/wbsd.c | 5 ++--- 4 files changed, 8 insertions(+), 15 deletions(-)
Signature · 2 lines
Best Regards Shawn Lin
Ulf Hansson
AppliedQuoted 10 lines · Allen Pais
This series uses
setup_timer()helper function. The series addresses the files underdrivers/mmc/host/*.Allen Pais (4):
mmc-host: wbsd: usesetup_timer()helper.
mmc-host: via: usesetup_timer()helper.
mmc-host: vub300: usesetup_timer()helper.
mmc-host: mxcmmc: usesetup_timer()helper.
Quoted 9 lines
drivers/mmc/host/mxcmmc.c | 4 +--- drivers/mmc/host/via-sdmmc.c | 4 +--- drivers/mmc/host/vub300.c | 10 ++++------ drivers/mmc/host/wbsd.c | 5 ++--- 4 files changed, 8 insertions(+), 15 deletions(-)--
2.7.4
Thanks, applied for next!
Kind regards
Uffe