Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3110865pxb; Tue, 19 Jan 2021 14:12:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJx/zBGJCLM/RXB2S+sEI/szV9qWDBuyELWXAkqbOiGU0cJUB9OmricR7Bbqnw5gu9ET/wYG X-Received: by 2002:a17:907:2705:: with SMTP id w5mr4135541ejk.505.1611094340919; Tue, 19 Jan 2021 14:12:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611094340; cv=none; d=google.com; s=arc-20160816; b=VqPGHQuwJQ/W6M8diOhVkJFvizgPxyhUWnLWbXb6SmgP+u4mWNLOosVZ4cFOSKKKMB 0+A+u8mnx8plv8bU0+I9eZciC+6c0phyw1RLusyxuipgiF2xIntGLW600HdT0HDbw7my /d7wt+MPgZ3vVKmWOWKMJqjwF4+cPew8VkTcpPLgN1w2ZfZ9qHSQkWMJ5d2kdryuphiu 5H5vhpyR4MEcfwtQn5gNRpnT5YifPn+48sBkWu7G5m+2ZaN8bjpQtSPfeJx9UAmx68OI nNBzDU3EflmtirfgDyEpo0OHCV9iwkXYAoluCn6VvV7zf5tiE3ni+T5TOBFA0iJ4kG0C CAtA== 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=AUcrbOLfkxqLmVnP/BAKnudpVLh2ocAwmusf07GMExU=; b=cjA1Aww13MOk63MuAVEVoYqV7x9Gm/zq5TmcsnrMAhNnOFBCz/XrzFSIEFVClKVitA KZiIA3qZNee770oCCzvJ1fIWCFOMGwz2LdPL0IUPt9xwVfbYGiEl0TFi9WpqAMrLnFcE bsGFUde0PZSCbZE69YC/UYUQ20VKxSIcgXXah/RU/Axu1Mz3OEYm7SNpo4jLI++ediGi eX4Qnm/BU4q4pEd/gzXDY2SEfXg7tmrOYtoFZvE1Mqspv0Ie3OWNKdn/HBsq3mSqWljL /8nlfzMn8YGe2JQC1AbqLnh7jc8a8M7YUvZupcLBB+YkGdZ+2ClVwzQP/bWCwIzf22j2 H+IQ== 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 dn23si80003edb.27.2021.01.19.14.11.48; Tue, 19 Jan 2021 14:12:20 -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 S1730396AbhASWKC (ORCPT + 99 others); Tue, 19 Jan 2021 17:10:02 -0500 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:48513 "EHLO relay2-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729484AbhASWIL (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 relay2-d.mail.gandi.net (Postfix) with ESMTPSA id E6BCB40006; Tue, 19 Jan 2021 22:07:03 +0000 (UTC) From: Alexandre Belloni To: Alessandro Zummo , Alexandre Belloni Cc: linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 10/14] rtc: pcf2123: use rtc_lock/rtc_unlock Date: Tue, 19 Jan 2021 23:06:48 +0100 Message-Id: <20210119220653.677750-10-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-pcf2123.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-pcf2123.c b/drivers/rtc/rtc-pcf2123.c index 534ffc91eec1..0f58cac81d8c 100644 --- a/drivers/rtc/rtc-pcf2123.c +++ b/drivers/rtc/rtc-pcf2123.c @@ -307,11 +307,10 @@ static int pcf2123_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm) static irqreturn_t pcf2123_rtc_irq(int irq, void *dev) { struct pcf2123_data *pcf2123 = dev_get_drvdata(dev); - struct mutex *lock = &pcf2123->rtc->ops_lock; unsigned int val = 0; int ret = IRQ_NONE; - mutex_lock(lock); + rtc_lock(pcf2123->rtc); regmap_read(pcf2123->map, PCF2123_REG_CTRL2, &val); /* Alarm? */ @@ -324,7 +323,7 @@ static irqreturn_t pcf2123_rtc_irq(int irq, void *dev) rtc_update_irq(pcf2123->rtc, 1, RTC_IRQF | RTC_AF); } - mutex_unlock(lock); + rtc_unlock(pcf2123->rtc); return ret; } -- 2.29.2