From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932857AbdJPX3j (ORCPT ); Mon, 16 Oct 2017 19:29:39 -0400 Received: from mail-pf0-f173.google.com ([209.85.192.173]:44583 "EHLO mail-pf0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932629AbdJPX3f (ORCPT ); Mon, 16 Oct 2017 19:29:35 -0400 X-Google-Smtp-Source: AOwi7QCkXU14di+YhXrwxFqo+jWkN3fjj7ALW/P1weErmmTjenkTRzw1chESGLL+OdaC3wQSr7KuTw== Date: Mon, 16 Oct 2017 16:29:33 -0700 From: Kees Cook To: Greg Kroah-Hartman Cc: Jiri Slaby , linux-kernel@vger.kernel.org Subject: [PATCH] tty: mips_ejtag_fdc: Convert timers to use timer_setup() Message-ID: <20171016232932.GA101268@beast> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: Greg Kroah-Hartman Cc: Jiri Slaby Signed-off-by: Kees Cook --- drivers/tty/mips_ejtag_fdc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/tty/mips_ejtag_fdc.c b/drivers/tty/mips_ejtag_fdc.c index a2dab3fb8751..51678f3a8c25 100644 --- a/drivers/tty/mips_ejtag_fdc.c +++ b/drivers/tty/mips_ejtag_fdc.c @@ -683,9 +683,9 @@ static irqreturn_t mips_ejtag_fdc_isr(int irq, void *dev_id) * It simply triggers the common FDC handler code and arranges for further * polling. */ -static void mips_ejtag_fdc_tty_timer(unsigned long opaque) +static void mips_ejtag_fdc_tty_timer(struct timer_list *t) { - struct mips_ejtag_fdc_tty *priv = (void *)opaque; + struct mips_ejtag_fdc_tty *priv = from_timer(priv, t, poll_timer); mips_ejtag_fdc_handle(priv); if (!priv->removing) @@ -1002,8 +1002,8 @@ static int mips_ejtag_fdc_tty_probe(struct mips_cdmm_device *dev) raw_spin_unlock_irq(&priv->lock); } else { /* If we didn't get an usable IRQ, poll instead */ - setup_pinned_timer(&priv->poll_timer, mips_ejtag_fdc_tty_timer, - (unsigned long)priv); + timer_setup(&priv->poll_timer, mips_ejtag_fdc_tty_timer, + TIMER_PINNED); priv->poll_timer.expires = jiffies + FDC_TTY_POLL; /* * Always attach the timer to the right CPU. The channels are -- 2.7.4 -- Kees Cook Pixel Security