From patchwork Tue Jan 19 22:06:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Belloni X-Patchwork-Id: 12030935 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9E9F9C433DB for ; Tue, 19 Jan 2021 22:08:39 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5EA87230FE for ; Tue, 19 Jan 2021 22:08:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5EA87230FE Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=b3RDmPMqZTA+6svisfVOKmPHdT69+RMh0U2rZ+HTPtk=; b=v5NGUkXEVNxWy6Yfrnm3reGUZ zvdTJATaVfbxFPi/Y2E2RD+F44EGqMsLBVPBRp+SAcyV44P+nmDfF2sI6UQQwAo20fD62PUlwNNQb YS9YOmjvxhMLIbgOX2xCFCoppYkHA3y8lfQX9cpF8uzdodjQOPKb8wdcB39EE4TPvIDPadbhQaQDh iSHXS9nEILpVr3r4PHRPm1hs+Hazl4F4Um0t1ym0yEhegfc4WZR/MNIsiu6eJT/4pL4uFvu1c7Gk3 NBKv9jU5n5SZ9Aljps0wSWZIIyLGawrxBVHZ5YS+5AsKIhGQXS1Z3nAcOY86YJ1JmjgKawJSZ/4g0 BseKrrI1w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l1z9d-0007F6-5L; Tue, 19 Jan 2021 22:07:13 +0000 Received: from relay5-d.mail.gandi.net ([217.70.183.197]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l1z9a-0007EN-GH for linux-arm-kernel@lists.infradead.org; Tue, 19 Jan 2021 22:07:11 +0000 X-Originating-IP: 86.202.109.140 Received: from localhost (lfbn-lyo-1-13-140.w86-202.abo.wanadoo.fr [86.202.109.140]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 1082F1C0007; Tue, 19 Jan 2021 22:07:07 +0000 (UTC) From: Alexandre Belloni To: Alessandro Zummo , Alexandre Belloni , Maxime Coquelin , Alexandre Torgue Subject: [PATCH 14/14] rtc: stm32: use rtc_lock/rtc_unlock Date: Tue, 19 Jan 2021 23:06:52 +0100 Message-Id: <20210119220653.677750-14-alexandre.belloni@bootlin.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210119220653.677750-1-alexandre.belloni@bootlin.com> References: <20210119220653.677750-1-alexandre.belloni@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210119_170710_637343_576CB472 X-CRM114-Status: GOOD ( 12.71 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-rtc@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Avoid accessing directly rtc->ops_lock and use the RTC core helpers. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-stm32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-stm32.c b/drivers/rtc/rtc-stm32.c index d774aa18f57a..75a8924ba12b 100644 --- a/drivers/rtc/rtc-stm32.c +++ b/drivers/rtc/rtc-stm32.c @@ -209,7 +209,7 @@ static irqreturn_t stm32_rtc_alarm_irq(int irq, void *dev_id) const struct stm32_rtc_events *evts = &rtc->data->events; unsigned int status, cr; - mutex_lock(&rtc->rtc_dev->ops_lock); + rtc_lock(rtc->rtc_dev); status = readl_relaxed(rtc->base + regs->sr); cr = readl_relaxed(rtc->base + regs->cr); @@ -226,7 +226,7 @@ static irqreturn_t stm32_rtc_alarm_irq(int irq, void *dev_id) stm32_rtc_clear_event_flags(rtc, evts->alra); } - mutex_unlock(&rtc->rtc_dev->ops_lock); + rtc_unlock(rtc->rtc_dev); return IRQ_HANDLED; }