Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1608463

[PATCH] x86/pci-calgary: use setup_timer

From Geliang Tang <geliangtang@gmail.com>
Newsgroups linux.kernel
Subject [PATCH] x86/pci-calgary: use setup_timer
Date 2017-03-24 15:20 +0100
Message-ID <toyeo-2LK-85@gated-at.bofh.it> (permalink)
References <toyem-2LK-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Use setup_timer() instead of init_timer() to simplify the code.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
---
 arch/x86/kernel/pci-calgary_64.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/pci-calgary_64.c b/arch/x86/kernel/pci-calgary_64.c
index 0c150c0..fda7867 100644
--- a/arch/x86/kernel/pci-calgary_64.c
+++ b/arch/x86/kernel/pci-calgary_64.c
@@ -1007,9 +1007,8 @@ static void __init calgary_enable_translation(struct pci_dev *dev)
 	writel(cpu_to_be32(val32), target);
 	readl(target); /* flush */
 
-	init_timer(&tbl->watchdog_timer);
-	tbl->watchdog_timer.function = &calgary_watchdog;
-	tbl->watchdog_timer.data = (unsigned long)dev;
+	setup_timer(&tbl->watchdog_timer, &calgary_watchdog,
+		    (unsigned long)dev);
 	mod_timer(&tbl->watchdog_timer, jiffies);
 }
 
-- 
2.9.3

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] aoe: use setup_timer Geliang Tang <geliangtang@gmail.com> - 2017-03-24 15:20 +0100
  [PATCH] ipmi_ssif: use setup_timer Geliang Tang <geliangtang@gmail.com> - 2017-03-24 15:20 +0100
    Re: [PATCH] ipmi_ssif: use setup_timer Corey Minyard <minyard@acm.org> - 2017-03-25 04:10 +0100
  [PATCH] x86/pci-calgary: use setup_timer Geliang Tang <geliangtang@gmail.com> - 2017-03-24 15:20 +0100
  Re: [PATCH] aoe: use setup_timer Ed Cashin <ed.cashin@acm.org> - 2017-03-25 20:40 +0100

csiph-web