sparc64: Convert timers to user timer_setup()

Message ID 1508837893-26652-1-git-send-email-allen.pais@oracle.com
State Accepted
Delegated to: David Miller
Headers show
Series
  • sparc64: Convert timers to user timer_setup()
Related show

Commit Message

Allen Pais Oct. 24, 2017, 9:38 a.m.
Switch to using the new timer_setup() and from_timer()
in LDOM Virtual I/O handshake.

Cc: Kees Cook <keescook@chromium.org>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
---
 arch/sparc/kernel/viohs.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

David Miller Nov. 15, 2017, 5:42 a.m. | #1
From: Allen Pais <allen.pais@oracle.com>
Date: Tue, 24 Oct 2017 15:08:13 +0530

> Switch to using the new timer_setup() and from_timer()
> in LDOM Virtual I/O handshake.
> 
> Cc: Kees Cook <keescook@chromium.org>
> Signed-off-by: Allen Pais <allen.pais@oracle.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/arch/sparc/kernel/viohs.c b/arch/sparc/kernel/viohs.c
index dcd278f..7cb27c2 100644
--- a/arch/sparc/kernel/viohs.c
+++ b/arch/sparc/kernel/viohs.c
@@ -797,9 +797,9 @@  void vio_port_up(struct vio_driver_state *vio)
 }
 EXPORT_SYMBOL(vio_port_up);
 
-static void vio_port_timer(unsigned long _arg)
+static void vio_port_timer(struct timer_list *t)
 {
-	struct vio_driver_state *vio = (struct vio_driver_state *) _arg;
+	struct vio_driver_state *vio = from_timer(vio, t, timer);
 
 	vio_port_up(vio);
 }
@@ -848,7 +848,7 @@  int vio_driver_init(struct vio_driver_state *vio, struct vio_dev *vdev,
 
 	vio->ops = ops;
 
-	setup_timer(&vio->timer, vio_port_timer, (unsigned long) vio);
+	timer_setup(&vio->timer, vio_port_timer, 0);
 
 	return 0;
 }