forked from Minki/linux
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>
This commit is contained in:
parent
dae6cdabe4
commit
03b225b16d
@ -707,11 +707,9 @@ static int pd6729_pci_probe(struct pci_dev *dev,
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* poll Card status change */
|
/* poll Card status change */
|
||||||
init_timer(&socket->poll_timer);
|
setup_timer(&socket->poll_timer, pd6729_interrupt_wrapper,
|
||||||
socket->poll_timer.function = pd6729_interrupt_wrapper;
|
(unsigned long)socket);
|
||||||
socket->poll_timer.data = (unsigned long)socket;
|
mod_timer(&socket->poll_timer, jiffies + HZ);
|
||||||
socket->poll_timer.expires = jiffies + HZ;
|
|
||||||
add_timer(&socket->poll_timer);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < MAX_SOCKETS; i++) {
|
for (i = 0; i < MAX_SOCKETS; i++) {
|
||||||
|
@ -1236,11 +1236,9 @@ static int yenta_probe(struct pci_dev *dev, const struct pci_device_id *id)
|
|||||||
if (!socket->cb_irq || request_irq(socket->cb_irq, yenta_interrupt, IRQF_SHARED, "yenta", socket)) {
|
if (!socket->cb_irq || request_irq(socket->cb_irq, yenta_interrupt, IRQF_SHARED, "yenta", socket)) {
|
||||||
/* No IRQ or request_irq failed. Poll */
|
/* No IRQ or request_irq failed. Poll */
|
||||||
socket->cb_irq = 0; /* But zero is a valid IRQ number. */
|
socket->cb_irq = 0; /* But zero is a valid IRQ number. */
|
||||||
init_timer(&socket->poll_timer);
|
setup_timer(&socket->poll_timer, yenta_interrupt_wrapper,
|
||||||
socket->poll_timer.function = yenta_interrupt_wrapper;
|
(unsigned long)socket);
|
||||||
socket->poll_timer.data = (unsigned long)socket;
|
mod_timer(&socket->poll_timer, jiffies + HZ);
|
||||||
socket->poll_timer.expires = jiffies + HZ;
|
|
||||||
add_timer(&socket->poll_timer);
|
|
||||||
dev_printk(KERN_INFO, &dev->dev,
|
dev_printk(KERN_INFO, &dev->dev,
|
||||||
"no PCI IRQ, CardBus support disabled for this "
|
"no PCI IRQ, CardBus support disabled for this "
|
||||||
"socket.\n");
|
"socket.\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user