Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3118138pxb; Tue, 19 Jan 2021 14:24:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJw+4JkmY7a9ZdiYqlzG0rpgKiRSAWjtSwWqAJEJf8C8yaSYYNa9R/tnhs2aCj72DOnInIhw X-Received: by 2002:a17:907:20aa:: with SMTP id pw10mr4211683ejb.314.1611095056559; Tue, 19 Jan 2021 14:24:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611095056; cv=none; d=google.com; s=arc-20160816; b=cu7gYjXxDoGcIsC4ChGGzOWXoW8Z6oYjOX9UR9Jc9ibXqbzz9EHp+wwVFj5VgpuD0J vFTmq5PMNxClzwoPs3M9gn3hFDYZaoRQwkqMarw6IoDrJtR/R8QEzr/6CHgsBON8pzJc tyuhPqO/QRpk5a4zPu1nasWjsUH/XwVSWSqJilQo+KF+JhMrEj8pUnVeuG4u9vy215gM HvDJ2rP0mVw8Wjjxl5lwjVfdQSJ25kvJJrqH9how6xC0/vcSSk0MZ/eXqVrwNUswU8jW ltOWGRZ/ayjclBqF/8fMcXrM/L4cO4Cf8VnflRMd3wKm2eRFIfatMl4P0cFepEOkDca6 CJvw== 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=SbCFpRMhZF2pbRikaEkn/EQoXgPpvxcRKEgsDavSDB8=; b=qsxTK6N8xWQKcqYX5KBVJsFmj0aIBCTlGmnmqeAGekS/YlEpBsGB5SuDv5ghsoKChr jIqRjzlkjpWB6Rv+exAKsY1kULkBXc7zZTm5ba6dnVib8l8vFhcsgexkc1eWjRkpUmwN t8tFtbs6IElvHXRroSwvXSgT8m1qH1d8m2Oujh+YuC3G+yEnqxI47nkG9GJ8lYNXbzFI wlq4iQhRftztBY/xeYVKU/qrLjDyjTnJv8fT/+hygFYmRAVlv24/If9dm8YsuxwYiO34 IWUY/P92J/+1Xs6nnS02ErAu7jy605wpnX3rJa4WNvZ9hwmLKHzzz5XuG7WWT8rjzEwk faxw== 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 i13si88808edl.347.2021.01.19.14.23.53; Tue, 19 Jan 2021 14:24:16 -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 S1729795AbhASWWN (ORCPT + 99 others); Tue, 19 Jan 2021 17:22:13 -0500 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:28901 "EHLO relay1-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729388AbhASWIH (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 relay1-d.mail.gandi.net (Postfix) with ESMTPSA id BF75D240009; Tue, 19 Jan 2021 22:06:59 +0000 (UTC) From: Alexandre Belloni To: Joshua Kinard , Alessandro Zummo , Alexandre Belloni Cc: linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 05/14] rtc: ds1685: use rtc_lock/rtc_unlock Date: Tue, 19 Jan 2021 23:06:43 +0100 Message-Id: <20210119220653.677750-5-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-ds1685.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/rtc/rtc-ds1685.c b/drivers/rtc/rtc-ds1685.c index d69c807af29b..75db7ab654a5 100644 --- a/drivers/rtc/rtc-ds1685.c +++ b/drivers/rtc/rtc-ds1685.c @@ -658,7 +658,6 @@ ds1685_rtc_irq_handler(int irq, void *dev_id) { struct platform_device *pdev = dev_id; struct ds1685_priv *rtc = platform_get_drvdata(pdev); - struct mutex *rtc_mutex; u8 ctrlb, ctrlc; unsigned long events = 0; u8 num_irqs = 0; @@ -667,8 +666,7 @@ ds1685_rtc_irq_handler(int irq, void *dev_id) if (unlikely(!rtc)) return IRQ_HANDLED; - rtc_mutex = &rtc->dev->ops_lock; - mutex_lock(rtc_mutex); + rtc_lock(rtc->dev); /* Ctrlb holds the interrupt-enable bits and ctrlc the flag bits. */ ctrlb = rtc->read(rtc, RTC_CTRL_B); @@ -713,7 +711,7 @@ ds1685_rtc_irq_handler(int irq, void *dev_id) } } rtc_update_irq(rtc->dev, num_irqs, events); - mutex_unlock(rtc_mutex); + rtc_unlock(rtc->dev); return events ? IRQ_HANDLED : IRQ_NONE; } -- 2.29.2