@@ -91,9 +91,6 @@ struct atmel_pwm_chip {
91
91
* hardware.
92
92
*/
93
93
u32 update_pending ;
94
-
95
- /* Protects .update_pending */
96
- spinlock_t lock ;
97
94
};
98
95
99
96
static inline struct atmel_pwm_chip * to_atmel_pwm_chip (struct pwm_chip * chip )
@@ -145,34 +142,26 @@ static void atmel_pwm_update_pending(struct atmel_pwm_chip *chip)
145
142
146
143
static void atmel_pwm_set_pending (struct atmel_pwm_chip * chip , unsigned int ch )
147
144
{
148
- spin_lock (& chip -> lock );
149
-
150
145
/*
151
146
* Clear pending flags in hardware because otherwise there might still
152
147
* be a stale flag in ISR.
153
148
*/
154
149
atmel_pwm_update_pending (chip );
155
150
156
151
chip -> update_pending |= (1 << ch );
157
-
158
- spin_unlock (& chip -> lock );
159
152
}
160
153
161
154
static int atmel_pwm_test_pending (struct atmel_pwm_chip * chip , unsigned int ch )
162
155
{
163
156
int ret = 0 ;
164
157
165
- spin_lock (& chip -> lock );
166
-
167
158
if (chip -> update_pending & (1 << ch )) {
168
159
atmel_pwm_update_pending (chip );
169
160
170
161
if (chip -> update_pending & (1 << ch ))
171
162
ret = 1 ;
172
163
}
173
164
174
- spin_unlock (& chip -> lock );
175
-
176
165
return ret ;
177
166
}
178
167
@@ -509,7 +498,6 @@ static int atmel_pwm_probe(struct platform_device *pdev)
509
498
atmel_pwm -> data = of_device_get_match_data (& pdev -> dev );
510
499
511
500
atmel_pwm -> update_pending = 0 ;
512
- spin_lock_init (& atmel_pwm -> lock );
513
501
514
502
atmel_pwm -> base = devm_platform_ioremap_resource (pdev , 0 );
515
503
if (IS_ERR (atmel_pwm -> base ))
0 commit comments