From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753136AbdJEA6B (ORCPT ); Wed, 4 Oct 2017 20:58:01 -0400 Received: from mail-pf0-f180.google.com ([209.85.192.180]:43634 "EHLO mail-pf0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752960AbdJEAxQ (ORCPT ); Wed, 4 Oct 2017 20:53:16 -0400 X-Google-Smtp-Source: AOwi7QCnbMC3jZMiK7ZxwEN0yu2xpI5x/pmLOf1+XrqHsJok+Tu110Po7cPBAa6fw8E6BluleFlapA== Date: Wed, 4 Oct 2017 17:53:14 -0700 From: Kees Cook To: linux-kernel@vger.kernel.org Cc: Sean Young , Mauro Carvalho Chehab , linux-media@vger.kernel.org, Thomas Gleixner Subject: [PATCH] media: serial_ir: Convert timers to use timer_setup() Message-ID: <20171005005314.GA23724@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: Sean Young Cc: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org Cc: Thomas Gleixner Signed-off-by: Kees Cook --- This requires commit 686fef928bba ("timer: Prepare to change timer callback argument type") in v4.14-rc3, but should be otherwise stand-alone. --- drivers/media/rc/serial_ir.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/media/rc/serial_ir.c b/drivers/media/rc/serial_ir.c index 8b66926bc16a..8bf5637b3a69 100644 --- a/drivers/media/rc/serial_ir.c +++ b/drivers/media/rc/serial_ir.c @@ -470,7 +470,7 @@ static int hardware_init_port(void) return 0; } -static void serial_ir_timeout(unsigned long arg) +static void serial_ir_timeout(struct timer_list *unused) { DEFINE_IR_RAW_EVENT(ev); @@ -540,8 +540,7 @@ static int serial_ir_probe(struct platform_device *dev) serial_ir.rcdev = rcdev; - setup_timer(&serial_ir.timeout_timer, serial_ir_timeout, - (unsigned long)&serial_ir); + timer_setup(&serial_ir.timeout_timer, serial_ir_timeout, 0); result = devm_request_irq(&dev->dev, irq, serial_ir_irq_handler, share_irq ? IRQF_SHARED : 0, -- 2.7.4 -- Kees Cook Pixel Security