summaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/pd6729.c
diff options
context:
space:
mode:
authorVaishali Thakkar <vthakkar1994@gmail.com>2015-02-11 16:15:31 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-16 21:31:43 +0100
commit03b225b16d75bccf9bc4d82607964a08148adf61 (patch)
treefbe79c549de0e69f02b8528df69067a8bfd7a8e6 /drivers/pcmcia/pd6729.c
parentdae6cdabe45baecfcfd02fbf11d97bb645450fc6 (diff)
downloadlinux-03b225b16d75bccf9bc4d82607964a08148adf61.tar.bz2
pcmcia: Use setup_timer and mod_timer
This patch introduces the use of functions setup_timer and mod_timer. This is done using Coccinelle and semantic patch used for this as follows: // <smpl> @@ expression x,y,z,a,b; @@ -init_timer (&x); +setup_timer (&x, y, z); +mod_timer (&a, b); -x.function = y; -x.data = z; -x.expires = b; -add_timer(&a); // </smpl> Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/pcmcia/pd6729.c')
-rw-r--r--drivers/pcmcia/pd6729.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/pcmcia/pd6729.c b/drivers/pcmcia/pd6729.c
index 34ace4854dc2..0f70b4d58f9e 100644
--- a/drivers/pcmcia/pd6729.c
+++ b/drivers/pcmcia/pd6729.c
@@ -707,11 +707,9 @@ static int pd6729_pci_probe(struct pci_dev *dev,
}
} else {
/* poll Card status change */
- init_timer(&socket->poll_timer);
- socket->poll_timer.function = pd6729_interrupt_wrapper;
- socket->poll_timer.data = (unsigned long)socket;
- socket->poll_timer.expires = jiffies + HZ;
- add_timer(&socket->poll_timer);
+ setup_timer(&socket->poll_timer, pd6729_interrupt_wrapper,
+ (unsigned long)socket);
+ mod_timer(&socket->poll_timer, jiffies + HZ);
}
for (i = 0; i < MAX_SOCKETS; i++) {