From patchwork Mon Oct 16 23:10:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kees Cook X-Patchwork-Id: 10010091 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C303060230 for ; Mon, 16 Oct 2017 23:12:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B4B93284FC for ; Mon, 16 Oct 2017 23:12:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A8D022859E; Mon, 16 Oct 2017 23:12:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3952F284FC for ; Mon, 16 Oct 2017 23:12:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756925AbdJPXKk (ORCPT ); Mon, 16 Oct 2017 19:10:40 -0400 Received: from mail-pg0-f54.google.com ([74.125.83.54]:43954 "EHLO mail-pg0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756883AbdJPXKi (ORCPT ); Mon, 16 Oct 2017 19:10:38 -0400 Received: by mail-pg0-f54.google.com with SMTP id s75so7171279pgs.0 for ; Mon, 16 Oct 2017 16:10:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=G+Ud8ldVneQWQZRy0Xlc+EA93wsF7WbQxnJboAw3jpw=; b=MojagvES9iY0R9IUwKMehHG+j49IQplfYtevCBsWBiA3GJlStny8n+aphoOG4cWate OzOAS8bcnREZ3ViAT/2Jl/ntXahIIgzJU4maQs41ksGJRHDdyaLtv3hKjSgmZxKs7bUJ aFty8//o97Th4CmuHylAaVZPF1DR6UfUeS2cw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=G+Ud8ldVneQWQZRy0Xlc+EA93wsF7WbQxnJboAw3jpw=; b=ZB/SPhgY2SPC5JEskspkfqmHtxrwDOz8BNzGf46kKAIeTKsmQPGPZiWFJTmZLaYgKF WSSJ4F1inpf+GVc+OPz4bHThp1l5SJZVuVMGnKJ9g0WxGLdQc8P+jAD+mj2Zg0ICgF9I H7PTe8X/j831WYiKYu0TZWwohATSl23KlBfTqWJaxyVmc0SrXLircut4rGJQXqklRMIc m8KrGXox7oV8mPobAQV/NNXGR/zxDyEUTd55w2t4zX45u3c5zaQOLMd/5edm3h5E1iNL fgiguOX9N/6RzLbeAH5IXUvUU4yGPy8jgo9p1zjfO/dZXPLFiZJlpu+IbPNxy7APSCUa 0erA== X-Gm-Message-State: AMCzsaVs2iI7A6odruSGUqVoUCOKz7iuq+NrJjEGpx0ztq19yqSpWSA7 w/Jihy5tVngocJ2JRO1Xs6PvxQ== X-Google-Smtp-Source: ABhQp+Qhzi1fvVo13cmvcFvPUNpcyiCnrWGLT+kqmR/P/c8pBJKYbnZFm0R5P4rpPd+1kDUxAM7opg== X-Received: by 10.98.198.77 with SMTP id m74mr4912498pfg.318.1508195438476; Mon, 16 Oct 2017 16:10:38 -0700 (PDT) Received: from www.outflux.net (173-164-112-133-Oregon.hfc.comcastbusiness.net. [173.164.112.133]) by smtp.gmail.com with ESMTPSA id n72sm7846712pfg.109.2017.10.16.16.10.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Oct 2017 16:10:37 -0700 (PDT) Date: Mon, 16 Oct 2017 16:10:36 -0700 From: Kees Cook To: Mauro Carvalho Chehab Cc: Sean Young , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] media: serial_ir: Convert timers to use timer_setup() Message-ID: <20171016231036.GA99738@beast> MIME-Version: 1.0 Content-Disposition: inline Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Signed-off-by: Kees Cook --- 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,