Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3114992pxb; Tue, 19 Jan 2021 14:19:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJx4qV40lzBTGQCSNYrBT+9N8i/at2NREjrsDekD3+2x8TSLRgP6ZYCF8Kxija1nakFh4kd1 X-Received: by 2002:a17:906:1f45:: with SMTP id d5mr4432427ejk.76.1611094746085; Tue, 19 Jan 2021 14:19:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611094746; cv=none; d=google.com; s=arc-20160816; b=e0+qhVwdylQYrMReFZvC8WKWMfUSeLcDmuK3FK0gnRzgucnmSg/sYZMTaH1USrCQtg tzKtzu2Ty+cdKTJJHsXsXVFqFLgYYroDdze6SzNBWUdfk0G5Lfm2Iqn5jUOhOLg6xMp8 q6Q5Xm3o8hcfJTboT70rAX3xKqnv0ZYeIMCQlF5SZ6bmY/6gv9LqPu2Z0lv6eUXMZ2y6 TBt1ZW+8wuL0MPyCzHS+0Ea7g7ce3KamsLnYtM5/g9kQjMAwTdFVFFDb1NTXLQtQunUn P/8wZsSW2yeZZACbLFIMBHT3uYvwq0XddeX8OKSrG/PFtI+WKsWy8D5QIaZq15pq1h2A nvoA== 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=N6QQalU0718yeEjrzTLZgvgDRSiMYAmUDJ2MUfRbb6A=; b=RDVIfSgMNHHZDNfG03A9J8rWYVpTRYU9KwDcMNaWqLVlITj61Zlem60Qiielz0DWrC wdmdTqA/oXsPDj1Y0qanK3E5dzIGFNHKwSRuWjUgzr+dr+xQlYhWNY+hWNGgs3AP4FTy 22L1wDJkhALVXrVqcbXCStxza/DnnubHte0oqJojNsa3ZSh3a5tcJGIxk3uNAmw9vU1T aCkcTDWLkbhQ74n2lc/eyApEyXFNP10aPMbYYvcpJC6/fdfivksUauGjSiq7MM6cDZpJ oTYrfaD37j3mbzjrPMNkuEia4afXqE7jSuQFG2THn+jr/dreBkfdhHq3mN2u3i+4SE9E ADSQ== 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 s2si86538eds.424.2021.01.19.14.18.19; Tue, 19 Jan 2021 14:19:06 -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 S1726707AbhASWQp (ORCPT + 99 others); Tue, 19 Jan 2021 17:16:45 -0500 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:56539 "EHLO relay3-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728404AbhASWIL (ORCPT ); Tue, 19 Jan 2021 17:08:11 -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 73A9760009; Tue, 19 Jan 2021 22:07:05 +0000 (UTC) From: Alexandre Belloni To: Alessandro Zummo , Alexandre Belloni Cc: linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 12/14] rtc: rx8010: use rtc_lock/rtc_unlock Date: Tue, 19 Jan 2021 23:06:50 +0100 Message-Id: <20210119220653.677750-12-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-rx8010.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-rx8010.c b/drivers/rtc/rtc-rx8010.c index 1a05e4654290..95e751c8048e 100644 --- a/drivers/rtc/rtc-rx8010.c +++ b/drivers/rtc/rtc-rx8010.c @@ -73,11 +73,11 @@ static irqreturn_t rx8010_irq_1_handler(int irq, void *dev_id) struct rx8010_data *rx8010 = i2c_get_clientdata(client); int flagreg, err; - mutex_lock(&rx8010->rtc->ops_lock); + rtc_lock(rx8010->rtc); err = regmap_read(rx8010->regs, RX8010_FLAG, &flagreg); if (err) { - mutex_unlock(&rx8010->rtc->ops_lock); + rtc_unlock(rx8010->rtc); return IRQ_NONE; } @@ -100,7 +100,7 @@ static irqreturn_t rx8010_irq_1_handler(int irq, void *dev_id) } err = regmap_write(rx8010->regs, RX8010_FLAG, flagreg); - mutex_unlock(&rx8010->rtc->ops_lock); + rtc_unlock(rx8010->rtc); return err ? IRQ_NONE : IRQ_HANDLED; } -- 2.29.2