Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3111282pxb; Tue, 19 Jan 2021 14:12:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJwAn5JKKRqzMfUCjajaPISzj/kexpG3xp7WR+bLKCM0RUGICJYU//fSkpqGZz7RfvTqSRSF X-Received: by 2002:a17:906:b082:: with SMTP id x2mr4021469ejy.100.1611094377166; Tue, 19 Jan 2021 14:12:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611094377; cv=none; d=google.com; s=arc-20160816; b=r5NyIJbF6fhCLndlZP15fnejKvxWnlRVDlMGF/Qrd7xvfLmmxmxisWwfaTINWdphQX wv7+d81FmOLAt6ee2U3o2OwB0NV2VIzZzGvjdUObiTR2G8kq2vVcbeYYkQpZpvwVY8Yp +0tZr4Pqhbf6y/l45XVDEhOKttf76JPQQisgAeY44YwebI0jF4hQl8uFI/JUqvvTQs39 Hi9mxg67KH3xkLi+toNMXclBmb4e90mw0US3Ry0Zy3dPubpPZ4TDNbq5y5ToImaGbRlU sNN3jLKBZc7Jdf0w/UmOGGeQGX/IQkm4C0M12s68tBEFJp6upC1c7pavld1vKCkdWF3l uySA== 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=LjcjDhCI1vCoo1/gYcTs2DFwdivqhCXE9AknRqrNbbk=; b=FbMTqD+bOSFgR09x5zXrDDmJGoYogL7scE0HxeVE3S/HNrvKixH2kCOha9rF9giQlf YYT3DB8V70W1zb8Oj5FQ81Su+IDWOU0SHuZPAbX3N4NMKyt253komkhc7fqo/OpEz6T5 38FEbwBydMdhoRGbOzl5pqCcQfdW7Z8Pk1NV3g6sDjmBN/4gThQaxyQblzf+grT+pomZ mjsFpSrBp0WE7CzQq92mHvX3KFtjpnigCjOuVQ95sbLvRbCDkTe0469xKAyH22M36Dqv ukH95/Hl6JmZDPIpfD7A60eHZ/iSld2dKHe3Qel+QJPk4vruHnp9RhnMdLtFeQgmNqF4 mCVw== 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 b8si22907eja.22.2021.01.19.14.12.32; Tue, 19 Jan 2021 14:12:57 -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 S1729648AbhASWIR (ORCPT + 99 others); Tue, 19 Jan 2021 17:08:17 -0500 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:50035 "EHLO relay3-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729409AbhASWIH (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 relay3-d.mail.gandi.net (Postfix) with ESMTPSA id AB8B060003; Tue, 19 Jan 2021 22:07:00 +0000 (UTC) From: Alexandre Belloni To: Alessandro Zummo , Alexandre Belloni Cc: linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 06/14] rtc: ds3232: use rtc_lock/rtc_unlock Date: Tue, 19 Jan 2021 23:06:44 +0100 Message-Id: <20210119220653.677750-6-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-ds3232.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-ds3232.c b/drivers/rtc/rtc-ds3232.c index 16b89035d135..535e4a88fbb6 100644 --- a/drivers/rtc/rtc-ds3232.c +++ b/drivers/rtc/rtc-ds3232.c @@ -406,11 +406,10 @@ static irqreturn_t ds3232_irq(int irq, void *dev_id) { struct device *dev = dev_id; struct ds3232 *ds3232 = dev_get_drvdata(dev); - struct mutex *lock = &ds3232->rtc->ops_lock; int ret; int stat, control; - mutex_lock(lock); + rtc_lock(ds3232->rtc); ret = regmap_read(ds3232->regmap, DS3232_REG_SR, &stat); if (ret) @@ -448,7 +447,7 @@ static irqreturn_t ds3232_irq(int irq, void *dev_id) } unlock: - mutex_unlock(lock); + rtc_unlock(ds3232->rtc); return IRQ_HANDLED; } -- 2.29.2