All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joshua Kinard <kumba@gentoo.org>
To: Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Alessandro Zummo <a.zummo@towertech.it>
Cc: linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 05/14] rtc: ds1685: use rtc_lock/rtc_unlock
Date: Sun, 24 Jan 2021 22:33:57 -0500	[thread overview]
Message-ID: <62b9f5fb-acc0-0418-1e44-b6d0965784a4@gentoo.org> (raw)
In-Reply-To: <20210119220653.677750-5-alexandre.belloni@bootlin.com>

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 <alexandre.belloni@bootlin.com>
> ---
>  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 <kumba@gentoo.org>


  reply	other threads:[~2021-01-25  3:35 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-19 22:06 [PATCH 01/14] rtc: ac100: use rtc_lock/rtc_unlock Alexandre Belloni
2021-01-19 22:06 ` [PATCH 02/14] rtc: asm9260: " Alexandre Belloni
2021-01-19 22:06 ` [PATCH 03/14] rtc: ds1305: " Alexandre Belloni
2021-01-19 22:06 ` [PATCH 04/14] rtc: ds1307: " Alexandre Belloni
2021-01-19 22:06 ` [PATCH 05/14] rtc: ds1685: " Alexandre Belloni
2021-01-25  3:33   ` Joshua Kinard [this message]
2021-01-19 22:06 ` [PATCH 06/14] rtc: ds3232: " Alexandre Belloni
2021-01-19 22:06 ` [PATCH 07/14] rtc: hym8563: " Alexandre Belloni
2021-01-19 22:06 ` [PATCH 08/14] rtc: m41t80: " Alexandre Belloni
2021-01-19 22:06 ` [PATCH 09/14] rtc: mcp795: " Alexandre Belloni
2021-01-19 22:06 ` [PATCH 10/14] rtc: pcf2123: " Alexandre Belloni
2021-01-19 22:06 ` [PATCH 11/14] rtc: rv3029: " Alexandre Belloni
2021-01-19 22:06 ` [PATCH 12/14] rtc: rx8010: " Alexandre Belloni
2021-01-19 22:06 ` [PATCH 13/14] rtc: rx8025: " Alexandre Belloni
2021-01-19 22:06 ` [PATCH 14/14] rtc: stm32: " Alexandre Belloni
2021-01-19 22:06   ` Alexandre Belloni
2021-01-20 17:50 ` [PATCH 01/14] rtc: ac100: " kernel test robot
2021-01-20 17:50   ` kernel test robot
2021-01-25 22:14 ` [PATCH v2] " Alexandre Belloni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=62b9f5fb-acc0-0418-1e44-b6d0965784a4@gentoo.org \
    --to=kumba@gentoo.org \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@bootlin.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.