On Mon, Dec 27, 2021 at 10:45:13AM +0100, Uwe Kleine-König wrote: > This is a straight forward conversion to the new counter_priv() wrapper. > > Signed-off-by: Uwe Kleine-König This patch conflicts with commit 60f07e74f86b ("counter: ti-eqep: Use container_of instead of struct counter_device::priv"). Because that commit has a similar purpose as this patchset, I'm going to skip this patch for now and continue looking over the rest of the patches in this series. > --- > drivers/counter/ti-eqep.c | 18 +++++++++--------- > 1 file changed, 9 insertions(+), 9 deletions(-) > > diff --git a/drivers/counter/ti-eqep.c b/drivers/counter/ti-eqep.c > index 09817c953f9a..abeda966e7be 100644 > --- a/drivers/counter/ti-eqep.c > +++ b/drivers/counter/ti-eqep.c > @@ -90,7 +90,7 @@ struct ti_eqep_cnt { > static int ti_eqep_count_read(struct counter_device *counter, > struct counter_count *count, u64 *val) > { > - struct ti_eqep_cnt *priv = counter->priv; > + struct ti_eqep_cnt *priv = counter_priv(counter); > u32 cnt; > > regmap_read(priv->regmap32, QPOSCNT, &cnt); > @@ -102,7 +102,7 @@ static int ti_eqep_count_read(struct counter_device *counter, > static int ti_eqep_count_write(struct counter_device *counter, > struct counter_count *count, u64 val) > { > - struct ti_eqep_cnt *priv = counter->priv; > + struct ti_eqep_cnt *priv = counter_priv(counter); > u32 max; > > regmap_read(priv->regmap32, QPOSMAX, &max); > @@ -116,7 +116,7 @@ static int ti_eqep_function_read(struct counter_device *counter, > struct counter_count *count, > enum counter_function *function) > { > - struct ti_eqep_cnt *priv = counter->priv; > + struct ti_eqep_cnt *priv = counter_priv(counter); > u32 qdecctl; > > regmap_read(priv->regmap16, QDECCTL, &qdecctl); > @@ -143,7 +143,7 @@ static int ti_eqep_function_write(struct counter_device *counter, > struct counter_count *count, > enum counter_function function) > { > - struct ti_eqep_cnt *priv = counter->priv; > + struct ti_eqep_cnt *priv = counter_priv(counter); > enum ti_eqep_count_func qsrc; > > switch (function) { > @@ -173,7 +173,7 @@ static int ti_eqep_action_read(struct counter_device *counter, > struct counter_synapse *synapse, > enum counter_synapse_action *action) > { > - struct ti_eqep_cnt *priv = counter->priv; > + struct ti_eqep_cnt *priv = counter_priv(counter); > enum counter_function function; > u32 qdecctl; > int err; > @@ -245,7 +245,7 @@ static int ti_eqep_position_ceiling_read(struct counter_device *counter, > struct counter_count *count, > u64 *ceiling) > { > - struct ti_eqep_cnt *priv = counter->priv; > + struct ti_eqep_cnt *priv = counter_priv(counter); > u32 qposmax; > > regmap_read(priv->regmap32, QPOSMAX, &qposmax); > @@ -259,7 +259,7 @@ static int ti_eqep_position_ceiling_write(struct counter_device *counter, > struct counter_count *count, > u64 ceiling) > { > - struct ti_eqep_cnt *priv = counter->priv; > + struct ti_eqep_cnt *priv = counter_priv(counter); > > if (ceiling != (u32)ceiling) > return -ERANGE; > @@ -272,7 +272,7 @@ static int ti_eqep_position_ceiling_write(struct counter_device *counter, > static int ti_eqep_position_enable_read(struct counter_device *counter, > struct counter_count *count, u8 *enable) > { > - struct ti_eqep_cnt *priv = counter->priv; > + struct ti_eqep_cnt *priv = counter_priv(counter); > u32 qepctl; > > regmap_read(priv->regmap16, QEPCTL, &qepctl); > @@ -285,7 +285,7 @@ static int ti_eqep_position_enable_read(struct counter_device *counter, > static int ti_eqep_position_enable_write(struct counter_device *counter, > struct counter_count *count, u8 enable) > { > - struct ti_eqep_cnt *priv = counter->priv; > + struct ti_eqep_cnt *priv = counter_priv(counter); > > regmap_write_bits(priv->regmap16, QEPCTL, QEPCTL_PHEN, enable ? -1 : 0); > > -- > 2.33.0 >