@@ -118,7 +118,7 @@ static void ftm_quaddec_disable(void *ftm)
118
118
static int ftm_quaddec_get_prescaler (struct counter_device * counter ,
119
119
struct counter_count * count , u32 * cnt_mode )
120
120
{
121
- struct ftm_quaddec * ftm = counter -> priv ;
121
+ struct ftm_quaddec * ftm = counter_priv ( counter ) ;
122
122
uint32_t scflags ;
123
123
124
124
ftm_read (ftm , FTM_SC , & scflags );
@@ -131,7 +131,7 @@ static int ftm_quaddec_get_prescaler(struct counter_device *counter,
131
131
static int ftm_quaddec_set_prescaler (struct counter_device * counter ,
132
132
struct counter_count * count , u32 cnt_mode )
133
133
{
134
- struct ftm_quaddec * ftm = counter -> priv ;
134
+ struct ftm_quaddec * ftm = counter_priv ( counter ) ;
135
135
136
136
mutex_lock (& ftm -> ftm_quaddec_mutex );
137
137
@@ -162,7 +162,7 @@ static int ftm_quaddec_count_read(struct counter_device *counter,
162
162
struct counter_count * count ,
163
163
u64 * val )
164
164
{
165
- struct ftm_quaddec * const ftm = counter -> priv ;
165
+ struct ftm_quaddec * const ftm = counter_priv ( counter ) ;
166
166
uint32_t cntval ;
167
167
168
168
ftm_read (ftm , FTM_CNT , & cntval );
@@ -176,7 +176,7 @@ static int ftm_quaddec_count_write(struct counter_device *counter,
176
176
struct counter_count * count ,
177
177
const u64 val )
178
178
{
179
- struct ftm_quaddec * const ftm = counter -> priv ;
179
+ struct ftm_quaddec * const ftm = counter_priv ( counter ) ;
180
180
181
181
if (val != 0 ) {
182
182
dev_warn (& ftm -> pdev -> dev , "Can only accept '0' as new counter value\n" );
0 commit comments