Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3110578pxb; Tue, 19 Jan 2021 14:11:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJwSVt/u2apKYQeNy41b17P8uV92+KMdT84FfC0f+3SxVGse/ofpU/ycOj/5LKFuxxaWWuaY X-Received: by 2002:a17:906:40d2:: with SMTP id a18mr4315718ejk.315.1611094311277; Tue, 19 Jan 2021 14:11:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611094311; cv=none; d=google.com; s=arc-20160816; b=AbRNbFNRX4Bv74pPGeoJRoojWEueFQW3Q6X5QbbcgyWYNuu3tLJ9EV3XnTtHpVvWu7 sep9Aovqczf7z1+eEDLFQY5b851ioTuBHJNjm8w3i3M+Nd0/KrRWZcGBif+pQL9BqR2Y oIy4dPNkFBQy1eBt/8/mvlFBvwUlfl44EXNtpu0vE/vzt5cxm/7/GnVNZmJqqYnuH3y0 uVcjGPCEFZ2VikKRy7wp1Jdmgh+WdEvELW3iIePqunXioc+/R6z5+7nZsr2f3PC7v1wt d4KMFtOlER63JD4EwrOyYGZZ3rdiyDtE9HOC6kzOaGZTnZQ87eJVwAwho28ykP2JXr9Z UECA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=HtoueFxKhNIWJanR9ROzh4wMr6NZIdRlbnUknV/3Ci0=; b=IrYR95X/Ep1KxKxj79YVyC53PRVrmTI61nyaaqJsk3PQwAKaVSG//sBUKR8079P0f/ lXxx461pfQl90imXGv7A4rAZ5cbIrfv5Yuhih+pxldPp79kq4MvPJUZ9gEDnksd9rt2k 59NXtVQeTR8Hdf9tt3xZ4T+6AYiad/uPtAQcxR86SjZ8Tr1YyaB9+l+Ehc+a1ZfQU9Ks FQxH4fm8RJRrzg4QvTVuP/P0DV+vlWGHLapabHKe2T55e4zCzGOyB5vhEjenPinLDsso aPmivRTVsko42bfCU331/giOtKxipGI1B0P9BKffo6vRKi/V1r4MFACnBwajGgXidKAw euqQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x11si13820eje.466.2021.01.19.14.11.27; Tue, 19 Jan 2021 14:11:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730306AbhASWJk (ORCPT + 99 others); Tue, 19 Jan 2021 17:09:40 -0500 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:13287 "EHLO relay1-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729322AbhASWIH (ORCPT ); Tue, 19 Jan 2021 17:08:07 -0500 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 relay1-d.mail.gandi.net (Postfix) with ESMTPSA id D2413240006; Tue, 19 Jan 2021 22:06:58 +0000 (UTC) From: Alexandre Belloni To: Alessandro Zummo , Alexandre Belloni Cc: linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 04/14] rtc: ds1307: use rtc_lock/rtc_unlock Date: Tue, 19 Jan 2021 23:06:42 +0100 Message-Id: <20210119220653.677750-4-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 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Avoid accessing directly rtc->ops_lock and use the RTC core helpers. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-ds1307.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c index 183cf7c01364..cd8e438bc9c4 100644 --- a/drivers/rtc/rtc-ds1307.c +++ b/drivers/rtc/rtc-ds1307.c @@ -558,11 +558,10 @@ static u8 do_trickle_setup_rx8130(struct ds1307 *ds1307, u32 ohms, bool diode) static irqreturn_t rx8130_irq(int irq, void *dev_id) { struct ds1307 *ds1307 = dev_id; - struct mutex *lock = &ds1307->rtc->ops_lock; u8 ctl[3]; int ret; - mutex_lock(lock); + rtc_lock(ds1307->rtc); /* Read control registers. */ ret = regmap_bulk_read(ds1307->regmap, RX8130_REG_EXTENSION, ctl, @@ -582,7 +581,7 @@ static irqreturn_t rx8130_irq(int irq, void *dev_id) rtc_update_irq(ds1307->rtc, 1, RTC_AF | RTC_IRQF); out: - mutex_unlock(lock); + rtc_unlock(ds1307->rtc); return IRQ_HANDLED; } -- 2.29.2