From patchwork Fri Sep 22 12:07:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 9965891 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 BFA65600C5 for ; Fri, 22 Sep 2017 12:07:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9E93E29887 for ; Fri, 22 Sep 2017 12:07:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 939EC29889; Fri, 22 Sep 2017 12:07:45 +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 4F83729887 for ; Fri, 22 Sep 2017 12:07:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752412AbdIVMHo (ORCPT ); Fri, 22 Sep 2017 08:07:44 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:35974 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752303AbdIVMHo (ORCPT ); Fri, 22 Sep 2017 08:07:44 -0400 Received: by mail-pf0-f196.google.com with SMTP id f84so382993pfj.3 for ; Fri, 22 Sep 2017 05:07:43 -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:in-reply-to:references; bh=h41Dn5rnYEi5C7jPJiU/JunvVZxYb4tnySwB/korsLo=; b=nZhO5wPdmSyHNPLy9LWAbD8ya2MYnKxOykl+jZ3KBiRIDGb/n9qYS8InFArnDpYc1D jLoDO2d3Ca9kv0sV+Hr5deFdDC0kjTX42np1N+bD7nbS2dT3X0OmwUejD+P8qsKBotPp IzLf9w6Zenw3YeVnDK4Dlgl6kVyYTfhMoSVm58L3mrZ/Sp6wvEygVHpN8qhWdU7gNkkR raTopQCi5v0vGKQtrWe5IiyTc+XOQKunP+ULv6ZxprNZ0beSXUp16fnSaVe4VcCdgTsX hexB/KBUSqRTBVf+NyFj0h/uAXjK6K5XWPB/JNB+EdG1hCEal/ZvnzEs8M2PhWIjgbBi jv/w== 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:in-reply-to :references; bh=h41Dn5rnYEi5C7jPJiU/JunvVZxYb4tnySwB/korsLo=; b=FyvFxZBND6a9qRTgGitVc74NItiGYL/2Dql3sBGX6nllb2zUGj7oyFUMxF8b4iSNSW +wh77CWG5aWNvoYQluAPk9ucISib9uqTIea41TmSvVjYekMgxeSzdzZfEXyp13Fkv7Fg PDkJxzYIC1agrxQABdUrnQMb5DrrSwBgyTpnVpBhD6ARO6/u1wIrvs4AaSfXCZ818+Td Xs+152DZIK45yMxJtvFBv/D4nCMuKsc+t0Zma2yBeaokPSMh5vLph5rLwGv8FMhZObYn wapYUC8MtxezsNHOnvF1OQFon0Ze2GGS8pgaMjKjMWXjafGLo+TItjlFh5I4Z/83eo7S WjIg== X-Gm-Message-State: AHPjjUi9gMwv45QIULQUjH+Y6G0PD81/tiIPPDWh3V2C7UXIRjd4h0HX UWCiPaCbMNadn/Sm3DD7t5E= X-Google-Smtp-Source: AOwi7QAhAWotWhPHa1fvijlHPzqr8LWLhawMbRxl+10qG79ouX+zAliPu33Z+Vluwr2rV20OWuH3Og== X-Received: by 10.99.180.65 with SMTP id n1mr9328319pgu.313.1506082063748; Fri, 22 Sep 2017 05:07:43 -0700 (PDT) Received: from localhost.localdomain ([103.42.74.194]) by smtp.gmail.com with ESMTPSA id f10sm7586403pgr.67.2017.09.22.05.07.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Sep 2017 05:07:42 -0700 (PDT) From: Allen Pais To: ulf.hansson@linaro.org Cc: brucechang@via.com.tw, tony.olech@elandigitalsystems.com, pierre@ossman.eu, linux-mmc@vger.kernel.org, Allen Pais Subject: [PATCH 3/4] mmc-host: vub300: use setup_timer() helper. Date: Fri, 22 Sep 2017 17:37:25 +0530 Message-Id: <1506082046-6878-4-git-send-email-allen.lkml@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506082046-6878-1-git-send-email-allen.lkml@gmail.com> References: <1506082046-6878-1-git-send-email-allen.lkml@gmail.com> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@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 --- drivers/mmc/host/vub300.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/mmc/host/vub300.c b/drivers/mmc/host/vub300.c index 8f569d2..c1a1698 100644 --- a/drivers/mmc/host/vub300.c +++ b/drivers/mmc/host/vub300.c @@ -2323,13 +2323,11 @@ static int vub300_probe(struct usb_interface *interface, INIT_WORK(&vub300->cmndwork, vub300_cmndwork_thread); INIT_WORK(&vub300->deadwork, vub300_deadwork_thread); kref_init(&vub300->kref); - init_timer(&vub300->sg_transfer_timer); - vub300->sg_transfer_timer.data = (unsigned long)vub300; - vub300->sg_transfer_timer.function = vub300_sg_timed_out; + setup_timer(&vub300->sg_transfer_timer, vub300_sg_timed_out, + (unsigned long)vub300); kref_get(&vub300->kref); - init_timer(&vub300->inactivity_timer); - vub300->inactivity_timer.data = (unsigned long)vub300; - vub300->inactivity_timer.function = vub300_inactivity_timer_expired; + setup_timer(&vub300->inactivity_timer, + vub300_inactivity_timer_expired, (unsigned long)vub300); vub300->inactivity_timer.expires = jiffies + HZ; add_timer(&vub300->inactivity_timer); if (vub300->card_present)