From patchwork Thu Jun 12 17:02:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jassi Brar X-Patchwork-Id: 31856 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E96572054B for ; Thu, 12 Jun 2014 17:02:48 +0000 (UTC) Received: by mail-lb0-f200.google.com with SMTP id z11sf1040620lbi.7 for ; Thu, 12 Jun 2014 10:02:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=TEmyBpoDTqufvvk28CtvGIs/X/yhDCt1MX5IlXABD+Y=; b=UizfPGHh3eyLg18gSSOalx0vkAgV4R5WSLiKNYiCw5TF2WqbfT+LVI7+ryS0ZcMN3h Nn0jt/tld0JVvTm9DjPI851bH0NN47gQmEhvYKgysKNJ2jbRVBIqZIyeFoU3DeKTsHt5 u5CjagdftOyWb7JyCK9ebK+JdkP+ydtT1Mc2s7ja4FeDrM6wt2xUw0O/P1NboK3XxcZ7 +K7mllhIsxbcpb4HrIFyb4IBV9MhhbL8rByiufLX1DSMj2DF/uRoh3KmBKOm+XxSzQQA BDD8gbyXEo8+KCs2Wgir8XmnDETbA/wJ1bciHjIb87rJ16BzOj9eCz/2QOp/Q6mE8cdo teRg== X-Gm-Message-State: ALoCoQnXOLBPtFwffWX8J7hWUQ7v+haIF+N8nEnuFojSrwT5oQZ7MlMJdVziwxfTowIhz/oi5GjU X-Received: by 10.180.212.12 with SMTP id ng12mr615366wic.7.1402592567322; Thu, 12 Jun 2014 10:02:47 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.109.247 with SMTP id l110ls3022149qgf.90.gmail; Thu, 12 Jun 2014 10:02:47 -0700 (PDT) X-Received: by 10.52.85.165 with SMTP id i5mr1091853vdz.53.1402592567139; Thu, 12 Jun 2014 10:02:47 -0700 (PDT) Received: from mail-ve0-f173.google.com (mail-ve0-f173.google.com [209.85.128.173]) by mx.google.com with ESMTPS id dn3si504514vcb.40.2014.06.12.10.02.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Jun 2014 10:02:47 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.173 as permitted sender) client-ip=209.85.128.173; Received: by mail-ve0-f173.google.com with SMTP id db11so2129899veb.32 for ; Thu, 12 Jun 2014 10:02:47 -0700 (PDT) X-Received: by 10.220.12.66 with SMTP id w2mr44758054vcw.15.1402592567013; Thu, 12 Jun 2014 10:02:47 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.221.54.6 with SMTP id vs6csp418953vcb; Thu, 12 Jun 2014 10:02:46 -0700 (PDT) X-Received: by 10.66.148.70 with SMTP id tq6mr22407894pab.56.1402592566228; Thu, 12 Jun 2014 10:02:46 -0700 (PDT) Received: from mail-pa0-f47.google.com (mail-pa0-f47.google.com [209.85.220.47]) by mx.google.com with ESMTPS id sw1si1712065pab.131.2014.06.12.10.02.45 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Jun 2014 10:02:46 -0700 (PDT) Received-SPF: pass (google.com: domain of jaswinder.singh@linaro.org designates 209.85.220.47 as permitted sender) client-ip=209.85.220.47; Received: by mail-pa0-f47.google.com with SMTP id fa1so1204236pad.6 for ; Thu, 12 Jun 2014 10:02:45 -0700 (PDT) X-Received: by 10.66.233.101 with SMTP id tv5mr22383918pac.92.1402592565838; Thu, 12 Jun 2014 10:02:45 -0700 (PDT) Received: from Linaro.www.huaweimobilewifi.com ([115.117.180.66]) by mx.google.com with ESMTPSA id zb2sm81365942pbb.45.2014.06.12.10.02.35 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Jun 2014 10:02:44 -0700 (PDT) From: Jassi Brar To: linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org, mporter@linaro.org, patches@linaro.org, bjorn@kryo.se, ashwin.chaugule@linaro.org, gregkh@linuxfoundation.org, s-anna@ti.com, loic.pallardy@st.com, lftan.linux@gmail.com, slapdau@yahoo.com.au, courtney.cavin@sonymobile.com, pawel.moll@arm.com, robh+dt@kernel.org, mark.rutland@arm.com, ijc+devicetree@hellion.org.uk, arnd@arndb.de, joshc@codeaurora.org, linus.walleij@linaro.org, galak@codeaurora.org, ks.giri@samsung.com, Jassi Brar Subject: [PATCHv7 4/5] mailbox: Fix deleteing poll timer Date: Thu, 12 Jun 2014 22:32:22 +0530 Message-Id: <1402592542-7318-1-git-send-email-jaswinder.singh@linaro.org> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1402592317-7043-1-git-send-email-jaswinder.singh@linaro.org> References: <1402592317-7043-1-git-send-email-jaswinder.singh@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: jaswinder.singh@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.173 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: LeyFoon Tan Try to delete the timer only if it was init/used. Signed-off-by: LeyFoon Tan Signed-off-by: Jassi Brar --- drivers/mailbox/mailbox.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mailbox/mailbox.c b/drivers/mailbox/mailbox.c index 336fa10..ae4abd9 100644 --- a/drivers/mailbox/mailbox.c +++ b/drivers/mailbox/mailbox.c @@ -480,7 +480,8 @@ void mbox_controller_unregister(struct mbox_controller *mbox) for (i = 0; i < mbox->num_chans; i++) mbox_free_channel(&mbox->chans[i]); - del_timer_sync(&mbox->poll); + if (mbox->txdone_poll) + del_timer_sync(&mbox->poll); mutex_unlock(&con_mutex); }