Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3116264pxb; Tue, 19 Jan 2021 14:21:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJwtzSAeNSxeRfcBlRVCPNWqHT3HhRld9lbP2u09/7/XitD9D37Q7sswq4hwyQUZZIHI9AFP X-Received: by 2002:a05:6402:3508:: with SMTP id b8mr5147618edd.341.1611094869251; Tue, 19 Jan 2021 14:21:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611094869; cv=none; d=google.com; s=arc-20160816; b=Yq0o9B21tpQW2E5NZCbOHNkf6p0wWBuyr8x/RYgOSdw+MROYxqPgVELNGjm2wa5gVP 8XqJL6rOtDx+dm+vfllLrhFpoNtOgQBLK6uEpRSwM+lyuzl5I9Uh/J5A8o7hSEewVaml AU3BOip+hAeiJ88pIbcKIJPGzg2Yt+lksao1nzJsOCWhxOq8uCZL7auYZmPkBakWCOST 3k9kBoDShmwypiUa6qQhmK0AiQu6Rpj9T3t2LqowgNAbQ4ipj8MmEmNX3Q/UbPcuoC2V Z/L53WO34ZLi7w+N1gabWeyZJALnQ3+Gqlvl1pgMusj/JU0TKiLPRDKfEGW7sp6Vi6fI zVYg== 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=zmOQQfaf0pAvJFp3/vs0SjgynDXyJhNurAdzJw0zoAI=; b=SvWYYV9H3fqTh/d2SmPZwQsZD5XrhzjMOxk7nLvZTnBHMwKRyrIigVDys3wNSK5Vzd MAoR0YdHq8ba/B2FyV1x9w5jqak019/Bc7TYYpbD0ygUXFX4L2Z5uM/GOnEtZQTBcIBj 2vgrtsbHo6Eb5BOpQEukyV6XBAR4cvVh/qYVByKIJqhJginockZj23M9GacTxlloq422 UnJ4+NAgeAK3tczsUeerh7rSOHFL8sKBLjnf67lI5OBWf5/Z3cJYHc1RczOS4Xt5E7OM 0nDUw7CBTululU7YMbC9Q8tT8MuzsXOGe8cMcHE3fwWGpi2FAODp+TeUO1lxXoZZa4F8 9l0A== 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 j21si77686edh.58.2021.01.19.14.20.44; Tue, 19 Jan 2021 14:21:09 -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 S1727354AbhASWSa (ORCPT + 99 others); Tue, 19 Jan 2021 17:18:30 -0500 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:46123 "EHLO relay2-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729497AbhASWIN (ORCPT ); Tue, 19 Jan 2021 17:08:13 -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 relay2-d.mail.gandi.net (Postfix) with ESMTPSA id AE11A40003; Tue, 19 Jan 2021 22:07:04 +0000 (UTC) From: Alexandre Belloni To: Alessandro Zummo , Alexandre Belloni Cc: linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 11/14] rtc: rv3029: use rtc_lock/rtc_unlock Date: Tue, 19 Jan 2021 23:06:49 +0100 Message-Id: <20210119220653.677750-11-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-rv3029c2.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/rtc/rtc-rv3029c2.c b/drivers/rtc/rtc-rv3029c2.c index c1f4c0bba1e5..71102c7fbd7d 100644 --- a/drivers/rtc/rtc-rv3029c2.c +++ b/drivers/rtc/rtc-rv3029c2.c @@ -265,24 +265,23 @@ static irqreturn_t rv3029_handle_irq(int irq, void *dev_id) { struct device *dev = dev_id; struct rv3029_data *rv3029 = dev_get_drvdata(dev); - struct mutex *lock = &rv3029->rtc->ops_lock; unsigned int flags, controls; unsigned long events = 0; int ret; - mutex_lock(lock); + rtc_lock(rv3029->rtc); ret = regmap_read(rv3029->regmap, RV3029_IRQ_CTRL, &controls); if (ret) { dev_warn(dev, "Read IRQ Control Register error %d\n", ret); - mutex_unlock(lock); + rtc_unlock(rv3029->rtc); return IRQ_NONE; } ret = regmap_read(rv3029->regmap, RV3029_IRQ_FLAGS, &flags); if (ret) { dev_warn(dev, "Read IRQ Flags Register error %d\n", ret); - mutex_unlock(lock); + rtc_unlock(rv3029->rtc); return IRQ_NONE; } @@ -297,7 +296,7 @@ static irqreturn_t rv3029_handle_irq(int irq, void *dev_id) regmap_write(rv3029->regmap, RV3029_IRQ_FLAGS, flags); regmap_write(rv3029->regmap, RV3029_IRQ_CTRL, controls); } - mutex_unlock(lock); + rtc_unlock(rv3029->rtc); return IRQ_HANDLED; } -- 2.29.2