Skip to content

Commit 1f1b40c

Browse files
Uwe Kleine-Königgregkh
authored andcommitted
counter: ftm-quaddec: Convert to counter_priv() wrapper
This is a straight forward conversion to the new counter_priv() wrapper. Acked-by: Jonathan Cameron <[email protected]> Acked-by: William Breathitt Gray <[email protected]> Signed-off-by: Uwe Kleine-König <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 53ada09 commit 1f1b40c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/counter/ftm-quaddec.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ static void ftm_quaddec_disable(void *ftm)
118118
static int ftm_quaddec_get_prescaler(struct counter_device *counter,
119119
struct counter_count *count, u32 *cnt_mode)
120120
{
121-
struct ftm_quaddec *ftm = counter->priv;
121+
struct ftm_quaddec *ftm = counter_priv(counter);
122122
uint32_t scflags;
123123

124124
ftm_read(ftm, FTM_SC, &scflags);
@@ -131,7 +131,7 @@ static int ftm_quaddec_get_prescaler(struct counter_device *counter,
131131
static int ftm_quaddec_set_prescaler(struct counter_device *counter,
132132
struct counter_count *count, u32 cnt_mode)
133133
{
134-
struct ftm_quaddec *ftm = counter->priv;
134+
struct ftm_quaddec *ftm = counter_priv(counter);
135135

136136
mutex_lock(&ftm->ftm_quaddec_mutex);
137137

@@ -162,7 +162,7 @@ static int ftm_quaddec_count_read(struct counter_device *counter,
162162
struct counter_count *count,
163163
u64 *val)
164164
{
165-
struct ftm_quaddec *const ftm = counter->priv;
165+
struct ftm_quaddec *const ftm = counter_priv(counter);
166166
uint32_t cntval;
167167

168168
ftm_read(ftm, FTM_CNT, &cntval);
@@ -176,7 +176,7 @@ static int ftm_quaddec_count_write(struct counter_device *counter,
176176
struct counter_count *count,
177177
const u64 val)
178178
{
179-
struct ftm_quaddec *const ftm = counter->priv;
179+
struct ftm_quaddec *const ftm = counter_priv(counter);
180180

181181
if (val != 0) {
182182
dev_warn(&ftm->pdev->dev, "Can only accept '0' as new counter value\n");

0 commit comments

Comments
 (0)