Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2752527pxb; Sun, 24 Jan 2021 19:36:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJwqbFGaeKvDVdVRc9sEh+ZEZ0+1ka+rVcAVXe+gkCSSQ9OMRkBAV5WG45zIlD0J8sWwre4y X-Received: by 2002:a05:6402:22e9:: with SMTP id dn9mr577560edb.61.1611545807758; Sun, 24 Jan 2021 19:36:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611545807; cv=none; d=google.com; s=arc-20160816; b=Lz5suvIMjq6mnew6rKx91ChMmrjvZMo9I4Vd+MkUkrislB1SKTvLJqGjzCCWGVNgMp iaIIXiOq3TOfi2XnOpal9emDPpiCM6dR+PBJGj7H6LXYOlRbo9WklZxfh6jJPxQsduJW muZmZVVD7X3nvkMobdcvijsT8NFI6vbDK+kWGVQrYonLEjdWWnrX/GI2OsSqS6/IfIlO mDnIo7utISbkpr8NA/edrme9p4ieq1uVhlOf8eby//tiKz1cb5mOrZJMiRUpSC+ijLpE 5MlxPeQl1EvV/xcz3O4kRyy8GHu05wqbreTohqnvTQqyWhsb5eTVb6zn/OAZDngIxBDt jVZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:openpgp:from :references:cc:to:subject; bh=mZ1ZrEbN1xYAT4Ea90E5t/jyUZkWTQfwhi5HuokLVR4=; b=XwJYmPxLOUqu0Zk1fQdM8V8YTiY9NweXtT9BtjuugNZ7m8s5AYb4/Vrw4Pjkt9d2Cs ggyldTqMxGJUdIoU3qOKb2aHrKl4CCWc5IU7rvajnewXG3BW+oeapVIcOdDhZdX7X12i hQj+1Qj/RImL4WJ/UjkFRV/AkrVgHchMTjJGTPsbxhEZWuugz46sOq1aR6w4ym/LymWm g/gbOnuVhAB7hUBJws2fFd7lKnYnFiAojxp/NUhBCA2s8YfPs5hIJEk0zg9QN1+jlZkO pPtIIUQCq8AjWHgdBoi57bCWWak5rg7AwsCZ/wQ90YyNng+9GF+lsm6Us21wo0Nc7PM6 OMPQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gentoo.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o5si4287813ejj.164.2021.01.24.19.36.22; Sun, 24 Jan 2021 19:36:47 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gentoo.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726705AbhAYDfZ (ORCPT + 99 others); Sun, 24 Jan 2021 22:35:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726630AbhAYDfY (ORCPT ); Sun, 24 Jan 2021 22:35:24 -0500 Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87550C061574; Sun, 24 Jan 2021 19:34:44 -0800 (PST) Subject: Re: [PATCH 05/14] rtc: ds1685: use rtc_lock/rtc_unlock To: Alexandre Belloni , Alessandro Zummo Cc: linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210119220653.677750-1-alexandre.belloni@bootlin.com> <20210119220653.677750-5-alexandre.belloni@bootlin.com> From: Joshua Kinard Openpgp: preference=signencrypt Message-ID: <62b9f5fb-acc0-0418-1e44-b6d0965784a4@gentoo.org> Date: Sun, 24 Jan 2021 22:33:57 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20210119220653.677750-5-alexandre.belloni@bootlin.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/19/2021 17:06, Alexandre Belloni wrote: > 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; > } > Acked-by: Joshua Kinard