ARM: footbridge: Convert timers to use timer_setup()

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: Russell King <linux@armlinux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Kees Cook <keescook@chromium.org>
This commit is contained in:
Kees Cook 2017-10-19 16:30:38 -07:00
parent 2c513d4f7d
commit b7bea32f0c

View file

@ -136,19 +136,14 @@ struct pci_ops dc21285_ops = {
static struct timer_list serr_timer; static struct timer_list serr_timer;
static struct timer_list perr_timer; static struct timer_list perr_timer;
static void dc21285_enable_error(unsigned long __data) static void dc21285_enable_error(struct timer_list *timer)
{ {
switch (__data) { del_timer(timer);
case IRQ_PCI_SERR:
del_timer(&serr_timer);
break;
case IRQ_PCI_PERR: if (timer == &serr_timer)
del_timer(&perr_timer); enable_irq(IRQ_PCI_SERR)
break; else if (timer == &perr_timer)
} enable_irq(IRQ_PCI_PERR);
enable_irq(__data);
} }
/* /*
@ -323,13 +318,8 @@ void __init dc21285_preinit(void)
*CSR_PCICMD = (*CSR_PCICMD & 0xffff) | PCICMD_ERROR_BITS; *CSR_PCICMD = (*CSR_PCICMD & 0xffff) | PCICMD_ERROR_BITS;
} }
init_timer(&serr_timer); timer_setup(&serr_timer, dc21285_enable_error, 0);
init_timer(&perr_timer); timer_setup(&perr_timer, dc21285_enable_error, 0);
serr_timer.data = IRQ_PCI_SERR;
serr_timer.function = dc21285_enable_error;
perr_timer.data = IRQ_PCI_PERR;
perr_timer.function = dc21285_enable_error;
/* /*
* We don't care if these fail. * We don't care if these fail.