Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3114993pxb; Tue, 19 Jan 2021 14:19:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJxgjc2SykVsFUCrGooajJ099oGOPoxKoTeSVTmhwJOdvX/49gsOQa3W60ydx5Q3nHShZOMP X-Received: by 2002:a05:6402:2288:: with SMTP id cw8mr4945623edb.161.1611094746242; 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=iUV7Fim3Teuisv124znqnKYHQdPxvIWZljuCXbWzlgTm0r/+CSgiKC1UPfOiiMJlqw OKO59LKO5vTDMpJlMQxrmkbHEng75B1/IzsIratIoYBPy0qdqdhfyIqr0BMOfR4tR5Ky Iy4pZSwgIBuz4Wzyi85nLYkAAquCsarBZgS/Z2eU5Vy1pRPf8SjGHYLJTHJRVH+Z1/ZA /CgFGYE3GMJBKrPIgVJDWtM+BxLCaKWYCQ5nTaEM549ufHgQQ2H03cuN3dbSXRc/1DSX arSVggpcQdcMciaxcs/RRUlpOTwt4v2M5bDRcWR7pbuzslxxy70SHwt7HIe0IioWaggC qTmg== 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=aAGw7nVyDRij5O4ETuCwXm6pfQ0h8o12UApDlxRPtM8=; b=iYQnQClW0BcwxqZyn1c+ALRlKfWpWoOpgBLiAW9AZq9fue47iEychSjBjf1W9sExGL 5pPa8hHyBkg0zOQVcUpIsU4PMiB38N66F4IZHbScLP+vhw8I/xBCt2IjaxTPPxQI4ify 5Elw2RA/7kXtWmmxr8XllQV+hBsf0rUBxfAFfifaUQ3I+KJC2lURHef4MgDEfX3oSLgj PjeDjthzeHEAv8tbX1+tqlvdj42C/MmU6yo1trj99cXjr6K6fvca3bIPzU/55mUhHBum 0vuAY++UIFJy0EspOBEcZLk8eP8JEjZAkoDF+xJ93TI8d/x7K7xg5YVgf4fZmtaQkj8D 0JUA== 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 n25si90062edw.77.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 S1729704AbhASWRY (ORCPT + 99 others); Tue, 19 Jan 2021 17:17:24 -0500 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:34323 "EHLO relay6-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729445AbhASWIL (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 relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 09F12C0005; Tue, 19 Jan 2021 22:07:02 +0000 (UTC) From: Alexandre Belloni To: Alessandro Zummo , Alexandre Belloni Cc: linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 09/14] rtc: mcp795: use rtc_lock/rtc_unlock Date: Tue, 19 Jan 2021 23:06:47 +0100 Message-Id: <20210119220653.677750-9-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-mcp795.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-mcp795.c b/drivers/rtc/rtc-mcp795.c index 21cbf7f892e8..bad7792b6ca5 100644 --- a/drivers/rtc/rtc-mcp795.c +++ b/drivers/rtc/rtc-mcp795.c @@ -350,10 +350,9 @@ static irqreturn_t mcp795_irq(int irq, void *data) { struct spi_device *spi = data; struct rtc_device *rtc = spi_get_drvdata(spi); - struct mutex *lock = &rtc->ops_lock; int ret; - mutex_lock(lock); + rtc_lock(rtc); /* Disable alarm. * There is no need to clear ALM0IF (Alarm 0 Interrupt Flag) bit, @@ -365,7 +364,7 @@ static irqreturn_t mcp795_irq(int irq, void *data) "Failed to disable alarm in IRQ (ret=%d)\n", ret); rtc_update_irq(rtc, 1, RTC_AF | RTC_IRQF); - mutex_unlock(lock); + rtc_unlock(rtc); return IRQ_HANDLED; } -- 2.29.2