@@ -141,7 +141,7 @@ static const enum counter_synapse_action stm32_lptim_cnt_synapse_actions[] = {
141
141
static int stm32_lptim_cnt_read (struct counter_device * counter ,
142
142
struct counter_count * count , u64 * val )
143
143
{
144
- struct stm32_lptim_cnt * const priv = counter -> priv ;
144
+ struct stm32_lptim_cnt * const priv = counter_priv ( counter ) ;
145
145
u32 cnt ;
146
146
int ret ;
147
147
@@ -158,7 +158,7 @@ static int stm32_lptim_cnt_function_read(struct counter_device *counter,
158
158
struct counter_count * count ,
159
159
enum counter_function * function )
160
160
{
161
- struct stm32_lptim_cnt * const priv = counter -> priv ;
161
+ struct stm32_lptim_cnt * const priv = counter_priv ( counter ) ;
162
162
163
163
if (!priv -> quadrature_mode ) {
164
164
* function = COUNTER_FUNCTION_INCREASE ;
@@ -177,7 +177,7 @@ static int stm32_lptim_cnt_function_write(struct counter_device *counter,
177
177
struct counter_count * count ,
178
178
enum counter_function function )
179
179
{
180
- struct stm32_lptim_cnt * const priv = counter -> priv ;
180
+ struct stm32_lptim_cnt * const priv = counter_priv ( counter ) ;
181
181
182
182
if (stm32_lptim_is_enabled (priv ))
183
183
return - EBUSY ;
@@ -200,7 +200,7 @@ static int stm32_lptim_cnt_enable_read(struct counter_device *counter,
200
200
struct counter_count * count ,
201
201
u8 * enable )
202
202
{
203
- struct stm32_lptim_cnt * const priv = counter -> priv ;
203
+ struct stm32_lptim_cnt * const priv = counter_priv ( counter ) ;
204
204
int ret ;
205
205
206
206
ret = stm32_lptim_is_enabled (priv );
@@ -216,7 +216,7 @@ static int stm32_lptim_cnt_enable_write(struct counter_device *counter,
216
216
struct counter_count * count ,
217
217
u8 enable )
218
218
{
219
- struct stm32_lptim_cnt * const priv = counter -> priv ;
219
+ struct stm32_lptim_cnt * const priv = counter_priv ( counter ) ;
220
220
int ret ;
221
221
222
222
/* Check nobody uses the timer, or already disabled/enabled */
@@ -241,7 +241,7 @@ static int stm32_lptim_cnt_ceiling_read(struct counter_device *counter,
241
241
struct counter_count * count ,
242
242
u64 * ceiling )
243
243
{
244
- struct stm32_lptim_cnt * const priv = counter -> priv ;
244
+ struct stm32_lptim_cnt * const priv = counter_priv ( counter ) ;
245
245
246
246
* ceiling = priv -> ceiling ;
247
247
@@ -252,7 +252,7 @@ static int stm32_lptim_cnt_ceiling_write(struct counter_device *counter,
252
252
struct counter_count * count ,
253
253
u64 ceiling )
254
254
{
255
- struct stm32_lptim_cnt * const priv = counter -> priv ;
255
+ struct stm32_lptim_cnt * const priv = counter_priv ( counter ) ;
256
256
257
257
if (stm32_lptim_is_enabled (priv ))
258
258
return - EBUSY ;
@@ -277,7 +277,7 @@ static int stm32_lptim_cnt_action_read(struct counter_device *counter,
277
277
struct counter_synapse * synapse ,
278
278
enum counter_synapse_action * action )
279
279
{
280
- struct stm32_lptim_cnt * const priv = counter -> priv ;
280
+ struct stm32_lptim_cnt * const priv = counter_priv ( counter ) ;
281
281
enum counter_function function ;
282
282
int err ;
283
283
@@ -321,7 +321,7 @@ static int stm32_lptim_cnt_action_write(struct counter_device *counter,
321
321
struct counter_synapse * synapse ,
322
322
enum counter_synapse_action action )
323
323
{
324
- struct stm32_lptim_cnt * const priv = counter -> priv ;
324
+ struct stm32_lptim_cnt * const priv = counter_priv ( counter ) ;
325
325
enum counter_function function ;
326
326
int err ;
327
327
0 commit comments