iio: trigger: stm32-timer: remove unnecessary update event
diff mbox series

Message ID 1574334317-30014-1-git-send-email-fabrice.gasnier@st.com
State Accepted
Commit f3bcd06f574a0751ee40ec25b9aad6968877ae5f
Headers show
Series
  • iio: trigger: stm32-timer: remove unnecessary update event
Related show

Commit Message

Fabrice Gasnier Nov. 21, 2019, 11:05 a.m. UTC
There is no need to explicitly generate update event to update
timer master mode.

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
---
 drivers/iio/trigger/stm32-timer-trigger.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Jonathan Cameron Nov. 23, 2019, 4:43 p.m. UTC | #1
On Thu, 21 Nov 2019 12:05:17 +0100
Fabrice Gasnier <fabrice.gasnier@st.com> wrote:

> There is no need to explicitly generate update event to update
> timer master mode.
> 
> Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to poke at it

Thanks,

Jonathan

> ---
>  drivers/iio/trigger/stm32-timer-trigger.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/iio/trigger/stm32-timer-trigger.c b/drivers/iio/trigger/stm32-timer-trigger.c
> index a5dfe65..2e0d32a 100644
> --- a/drivers/iio/trigger/stm32-timer-trigger.c
> +++ b/drivers/iio/trigger/stm32-timer-trigger.c
> @@ -297,9 +297,6 @@ static ssize_t stm32_tt_store_master_mode(struct device *dev,
>  			     strlen(master_mode_table[i]))) {
>  			regmap_update_bits(priv->regmap, TIM_CR2, mask,
>  					   i << shift);
> -			/* Make sure that registers are updated */
> -			regmap_update_bits(priv->regmap, TIM_EGR,
> -					   TIM_EGR_UG, TIM_EGR_UG);
>  			return len;
>  		}
>  	}

Patch
diff mbox series

diff --git a/drivers/iio/trigger/stm32-timer-trigger.c b/drivers/iio/trigger/stm32-timer-trigger.c
index a5dfe65..2e0d32a 100644
--- a/drivers/iio/trigger/stm32-timer-trigger.c
+++ b/drivers/iio/trigger/stm32-timer-trigger.c
@@ -297,9 +297,6 @@  static ssize_t stm32_tt_store_master_mode(struct device *dev,
 			     strlen(master_mode_table[i]))) {
 			regmap_update_bits(priv->regmap, TIM_CR2, mask,
 					   i << shift);
-			/* Make sure that registers are updated */
-			regmap_update_bits(priv->regmap, TIM_EGR,
-					   TIM_EGR_UG, TIM_EGR_UG);
 			return len;
 		}
 	}