From patchwork Fri Sep 22 11:55:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 9965865 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 E8CEA60381 for ; Fri, 22 Sep 2017 11:56:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CE5A32982F for ; Fri, 22 Sep 2017 11:56:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C315429883; Fri, 22 Sep 2017 11:56:08 +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=-0.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_BL_SPAMCOP_NET,RCVD_IN_DNSWL_HI, RCVD_IN_SBL_CSS,RCVD_IN_SORBS_SPAM,RCVD_IN_SORBS_WEB,T_DKIM_INVALID autolearn=no 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 7DD0C2982F for ; Fri, 22 Sep 2017 11:56:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752148AbdIVL4I (ORCPT ); Fri, 22 Sep 2017 07:56:08 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:36750 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752086AbdIVL4H (ORCPT ); Fri, 22 Sep 2017 07:56:07 -0400 Received: by mail-pf0-f194.google.com with SMTP id f84so370911pfj.3 for ; Fri, 22 Sep 2017 04:56:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=zCzpXxyaIU9IFV43Bj6JaxNtHIoIcaoaUgUWLAL7dJE=; b=mB6jKp6YTq/s4zMJONHHu3CBXyrna242ki5uCE4kdD/3U3c9UK0WRymPcamxnhllPL Piwp+tWBEarkMKkSKmBZBZlZEglcK7IjbJRGTTBw1GBKri0nOZvk6XiuvZJ+jGLtPOce RXP5CXv/MtQxsX/aovhIqLGKu0X1UAIZWTlTF5QW+FIrVdDZvMYTewYkRPzsJtCp1hfN 1fVaulEqIRdEUG53sflEutbTH6ylQ4d7D/ixIJcLgv4Vf1205Tyo7GIHTuBP5uEIrRZH ELkd9FlmiGDG9gFxMtB/ZNBlcIWq/aOK0HLdkEvMPZ5Dg+1MaYdCbt3IMTF1bYvvwa6x jrYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=zCzpXxyaIU9IFV43Bj6JaxNtHIoIcaoaUgUWLAL7dJE=; b=LEzxRIsEXFj5mjIZ3Nd8/UY87QkwdasktUbyazmj/nN3h1QTqCah7WPgCDzqxjfkl3 SHEpYijx9mc/6hodYnHoaDgqmf5ZvOUPNNaSBWjnYylcUEnfmdVmpr6Oj/OxaCf+YJuB kh7MXQ2ITiMH+pt/tRmDVZYonHrldMnhiV/0fDT34Lmi9fN97lmkfc4EbMGDuH3OSX8r jyKxWfY19NzxHJTjCWsnCNsDVt1GlTd3l8icUkh8x9orU5fiLVcT4be0MTT2Qz+H0P9h KYsRVxbUFo1oR23BVcWK67CJER4BPZlfeWHG/v64c4tyBW9UYLR+o8UcM/CuBUqXl55+ exQQ== X-Gm-Message-State: AHPjjUgdX+QMLn5hU0l4JUxzRNWP2TEIlRDvqRkga4RXf5sydD+q62jq jeWHagoHMtq3MGro3alGqk4= X-Google-Smtp-Source: AOwi7QD+ijU1Pl0d18sOl5ZQdwl6R4eXBqdJ/L1RUXhtoLVUjt/p7Guz764BUx/P0cf2EHCNYOHWmw== X-Received: by 10.159.218.9 with SMTP id v9mr8835604plp.182.1506081366933; Fri, 22 Sep 2017 04:56:06 -0700 (PDT) Received: from localhost.localdomain ([103.42.74.194]) by smtp.gmail.com with ESMTPSA id w82sm7307181pfa.69.2017.09.22.04.56.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Sep 2017 04:56:05 -0700 (PDT) From: Allen Pais To: ysato@users.sourceforge.jp Cc: dalias@libc.org, linux-sh@vger.kernel.org, Allen Pais Subject: [PATCH 1/2] sh: push-switch: use setup_timer() helper. Date: Fri, 22 Sep 2017 17:25:59 +0530 Message-Id: <1506081360-6555-1-git-send-email-allen.lkml@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais --- arch/sh/drivers/push-switch.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/sh/drivers/push-switch.c b/arch/sh/drivers/push-switch.c index 5bfb341..8e02851 100644 --- a/arch/sh/drivers/push-switch.c +++ b/arch/sh/drivers/push-switch.c @@ -78,11 +78,8 @@ static int switch_drv_probe(struct platform_device *pdev) } INIT_WORK(&psw->work, switch_work_handler); - init_timer(&psw->debounce); - - psw->debounce.function = switch_timer; - psw->debounce.data = (unsigned long)psw; + setup_timer(&psw->debounce, switch_timer, (unsigned long)psw); /* Workqueue API brain-damage */ psw->pdev = pdev;