Re: [PATCH] hwmon: (npcm750-pwm-fan): replace spin_lock_irqsave by spin_lock in hard IRQ

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Feb 07, 2021 at 07:12:13PM +0800, Tian Tao wrote:
> The code has been in a irq-disabled context since it is hard IRQ. There
> is no necessity to do it again.
> 
> Signed-off-by: Tian Tao <tiantao6@xxxxxxxxxxxxx>

Applied.

Thanks,
Guenter

> ---
>  drivers/hwmon/npcm750-pwm-fan.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/hwmon/npcm750-pwm-fan.c b/drivers/hwmon/npcm750-pwm-fan.c
> index 11a2860..6c27af1 100644
> --- a/drivers/hwmon/npcm750-pwm-fan.c
> +++ b/drivers/hwmon/npcm750-pwm-fan.c
> @@ -481,12 +481,11 @@ static inline void npcm7xx_check_cmp(struct npcm7xx_pwm_fan_data *data,
>  static irqreturn_t npcm7xx_fan_isr(int irq, void *dev_id)
>  {
>  	struct npcm7xx_pwm_fan_data *data = dev_id;
> -	unsigned long flags;
>  	int module;
>  	u8 flag;
>  
>  	module = irq - data->fan_irq[0];
> -	spin_lock_irqsave(&data->fan_lock[module], flags);
> +	spin_lock(&data->fan_lock[module]);
>  
>  	flag = ioread8(NPCM7XX_FAN_REG_TICTRL(data->fan_base, module));
>  	if (flag > 0) {
> @@ -496,7 +495,7 @@ static irqreturn_t npcm7xx_fan_isr(int irq, void *dev_id)
>  		return IRQ_HANDLED;
>  	}
>  
> -	spin_unlock_irqrestore(&data->fan_lock[module], flags);
> +	spin_unlock(&data->fan_lock[module]);
>  
>  	return IRQ_NONE;
>  }



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux