Skip to content

Commit fc28b93

Browse files
Fix-Pointjerpelea
authored andcommitted
timers/oneshot: Remove all callback and args.
This commit remove all callback and args in the APIs. Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
1 parent 5c113f7 commit fc28b93

File tree

32 files changed

+42
-125
lines changed

32 files changed

+42
-125
lines changed

arch/arm/src/armv7-a/arm_timer.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ struct arm_timer_lowerhalf_s
7676
static int arm_timer_maxdelay(struct oneshot_lowerhalf_s *lower,
7777
struct timespec *ts);
7878
static int arm_timer_start(struct oneshot_lowerhalf_s *lower,
79-
oneshot_callback_t callback, void *arg,
8079
const struct timespec *ts);
8180
static int arm_timer_cancel(struct oneshot_lowerhalf_s *lower,
8281
struct timespec *ts);
@@ -168,7 +167,6 @@ static int arm_timer_maxdelay(struct oneshot_lowerhalf_s *lower_,
168167
}
169168

170169
static int arm_timer_start(struct oneshot_lowerhalf_s *lower_,
171-
oneshot_callback_t callback, void *arg,
172170
const struct timespec *ts)
173171
{
174172
struct arm_timer_lowerhalf_s *lower =

arch/arm/src/armv7-r/arm_timer.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ struct arm_timer_lowerhalf_s
7575
static int arm_timer_maxdelay(struct oneshot_lowerhalf_s *lower,
7676
struct timespec *ts);
7777
static int arm_timer_start(struct oneshot_lowerhalf_s *lower,
78-
oneshot_callback_t callback, void *arg,
7978
const struct timespec *ts);
8079
static int arm_timer_cancel(struct oneshot_lowerhalf_s *lower,
8180
struct timespec *ts);
@@ -161,7 +160,6 @@ static int arm_timer_maxdelay(struct oneshot_lowerhalf_s *lower_,
161160
}
162161

163162
static int arm_timer_start(struct oneshot_lowerhalf_s *lower_,
164-
oneshot_callback_t callback, void *arg,
165163
const struct timespec *ts)
166164
{
167165
struct arm_timer_lowerhalf_s *lower =

arch/arm/src/armv8-r/arm_timer.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,15 +243,14 @@ static int arm_cancel(struct oneshot_lowerhalf_s *lower,
243243
****************************************************************************/
244244

245245
static int arm_start(struct oneshot_lowerhalf_s *lower,
246-
oneshot_callback_t callback, void *arg,
247246
const struct timespec *ts)
248247
{
249248
uint64_t count;
250249
struct arm_oneshot_lowerhalf_s *priv =
251250
(struct arm_oneshot_lowerhalf_s *)lower;
252251
uint64_t freq = priv->frequency;
253252

254-
DEBUGASSERT(priv && callback && ts);
253+
DEBUGASSERT(priv && ts);
255254

256255
/* Set the timeout */
257256

arch/arm/src/sam34/sam4cm_oneshot_lowerhalf.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ static void sam_oneshot_handler(void *arg);
6969
static int sam_max_delay(struct oneshot_lowerhalf_s *lower,
7070
struct timespec *ts);
7171
static int sam_start(struct oneshot_lowerhalf_s *lower,
72-
oneshot_callback_t callback, void *arg,
7372
const struct timespec *ts);
7473
static int sam_cancel(struct oneshot_lowerhalf_s *lower,
7574
struct timespec *ts);
@@ -181,15 +180,14 @@ static int sam_max_delay(struct oneshot_lowerhalf_s *lower,
181180
****************************************************************************/
182181

183182
static int sam_start(struct oneshot_lowerhalf_s *lower,
184-
oneshot_callback_t callback, void *arg,
185183
const struct timespec *ts)
186184
{
187185
struct sam_oneshot_lowerhalf_s *priv =
188186
(struct sam_oneshot_lowerhalf_s *)lower;
189187
irqstate_t flags;
190188
int ret;
191189

192-
DEBUGASSERT(priv != NULL && callback != NULL && ts != NULL);
190+
DEBUGASSERT(priv != NULL && ts != NULL);
193191

194192
/* Save the callback information and start the timer */
195193

arch/arm/src/sama5/sam_oneshot_lowerhalf.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ static void sam_oneshot_handler(void *arg);
7171
static int sam_max_delay(struct oneshot_lowerhalf_s *lower,
7272
struct timespec *ts);
7373
static int sam_start(struct oneshot_lowerhalf_s *lower,
74-
oneshot_callback_t callback, void *arg,
7574
const struct timespec *ts);
7675
static int sam_cancel(struct oneshot_lowerhalf_s *lower,
7776
struct timespec *ts);
@@ -183,15 +182,14 @@ static int sam_max_delay(struct oneshot_lowerhalf_s *lower,
183182
****************************************************************************/
184183

185184
static int sam_start(struct oneshot_lowerhalf_s *lower,
186-
oneshot_callback_t callback, void *arg,
187185
const struct timespec *ts)
188186
{
189187
struct sam_oneshot_lowerhalf_s *priv =
190188
(struct sam_oneshot_lowerhalf_s *)lower;
191189
irqstate_t flags;
192190
int ret;
193191

194-
DEBUGASSERT(priv != NULL && callback != NULL && ts != NULL);
192+
DEBUGASSERT(priv != NULL && ts != NULL);
195193

196194
/* Save the callback information and start the timer */
197195

arch/arm/src/samd5e5/sam_oneshot_lowerhalf.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ static void sam_oneshot_handler(void *arg);
6969
static int sam_max_delay(struct oneshot_lowerhalf_s *lower,
7070
struct timespec *ts);
7171
static int sam_start(struct oneshot_lowerhalf_s *lower,
72-
oneshot_callback_t callback, void *arg,
7372
const struct timespec *ts);
7473
static int sam_cancel(struct oneshot_lowerhalf_s *lower,
7574
struct timespec *ts);
@@ -181,15 +180,14 @@ static int sam_max_delay(struct oneshot_lowerhalf_s *lower,
181180
****************************************************************************/
182181

183182
static int sam_start(struct oneshot_lowerhalf_s *lower,
184-
oneshot_callback_t callback, void *arg,
185183
const struct timespec *ts)
186184
{
187185
struct sam_oneshot_lowerhalf_s *priv =
188186
(struct sam_oneshot_lowerhalf_s *)lower;
189187
irqstate_t flags;
190188
int ret;
191189

192-
DEBUGASSERT(priv != NULL && callback != NULL && ts != NULL);
190+
DEBUGASSERT(priv != NULL && ts != NULL);
193191

194192
/* Save the callback information and start the timer */
195193

arch/arm/src/samv7/sam_oneshot_lowerhalf.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ static void sam_oneshot_handler(void *arg);
6969
static int sam_max_delay(struct oneshot_lowerhalf_s *lower,
7070
struct timespec *ts);
7171
static int sam_start(struct oneshot_lowerhalf_s *lower,
72-
oneshot_callback_t callback, void *arg,
7372
const struct timespec *ts);
7473
static int sam_cancel(struct oneshot_lowerhalf_s *lower,
7574
struct timespec *ts);
@@ -181,15 +180,14 @@ static int sam_max_delay(struct oneshot_lowerhalf_s *lower,
181180
****************************************************************************/
182181

183182
static int sam_start(struct oneshot_lowerhalf_s *lower,
184-
oneshot_callback_t callback, void *arg,
185183
const struct timespec *ts)
186184
{
187185
struct sam_oneshot_lowerhalf_s *priv =
188186
(struct sam_oneshot_lowerhalf_s *)lower;
189187
irqstate_t flags;
190188
int ret;
191189

192-
DEBUGASSERT(priv != NULL && callback != NULL && ts != NULL);
190+
DEBUGASSERT(priv != NULL && ts != NULL);
193191

194192
/* Save the callback information and start the timer */
195193

arch/arm/src/stm32/stm32_oneshot_lowerhalf.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ static void stm32_oneshot_handler(void *arg);
6868
static int stm32_max_delay(struct oneshot_lowerhalf_s *lower,
6969
struct timespec *ts);
7070
static int stm32_start(struct oneshot_lowerhalf_s *lower,
71-
oneshot_callback_t callback, void *arg,
7271
const struct timespec *ts);
7372
static int stm32_cancel(struct oneshot_lowerhalf_s *lower,
7473
struct timespec *ts);
@@ -180,15 +179,14 @@ static int stm32_max_delay(struct oneshot_lowerhalf_s *lower,
180179
****************************************************************************/
181180

182181
static int stm32_start(struct oneshot_lowerhalf_s *lower,
183-
oneshot_callback_t callback, void *arg,
184182
const struct timespec *ts)
185183
{
186184
struct stm32_oneshot_lowerhalf_s *priv =
187185
(struct stm32_oneshot_lowerhalf_s *)lower;
188186
irqstate_t flags;
189187
int ret;
190188

191-
DEBUGASSERT(priv != NULL && callback != NULL && ts != NULL);
189+
DEBUGASSERT(priv != NULL && ts != NULL);
192190

193191
/* Save the callback information and start the timer */
194192

arch/arm/src/stm32h7/stm32_oneshot_lowerhalf.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ static void stm32_oneshot_handler(void *arg);
6868
static int stm32_max_delay(struct oneshot_lowerhalf_s *lower,
6969
struct timespec *ts);
7070
static int stm32_start(struct oneshot_lowerhalf_s *lower,
71-
oneshot_callback_t callback, void *arg,
7271
const struct timespec *ts);
7372
static int stm32_cancel(struct oneshot_lowerhalf_s *lower,
7473
struct timespec *ts);
@@ -180,15 +179,14 @@ static int stm32_max_delay(struct oneshot_lowerhalf_s *lower,
180179
****************************************************************************/
181180

182181
static int stm32_start(struct oneshot_lowerhalf_s *lower,
183-
oneshot_callback_t callback, void *arg,
184182
const struct timespec *ts)
185183
{
186184
struct stm32_oneshot_lowerhalf_s *priv =
187185
(struct stm32_oneshot_lowerhalf_s *)lower;
188186
irqstate_t flags;
189187
int ret;
190188

191-
DEBUGASSERT(priv != NULL && callback != NULL && ts != NULL);
189+
DEBUGASSERT(priv != NULL && ts != NULL);
192190

193191
/* Save the callback information and start the timer */
194192

arch/arm/src/stm32l4/stm32l4_oneshot_lowerhalf.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ static void stm32l4_oneshot_handler(void *arg);
6969
static int stm32l4_max_delay(struct oneshot_lowerhalf_s *lower,
7070
struct timespec *ts);
7171
static int stm32l4_start(struct oneshot_lowerhalf_s *lower,
72-
oneshot_callback_t callback, void *arg,
7372
const struct timespec *ts);
7473
static int stm32l4_cancel(struct oneshot_lowerhalf_s *lower,
7574
struct timespec *ts);
@@ -181,15 +180,14 @@ static int stm32l4_max_delay(struct oneshot_lowerhalf_s *lower,
181180
****************************************************************************/
182181

183182
static int stm32l4_start(struct oneshot_lowerhalf_s *lower,
184-
oneshot_callback_t callback, void *arg,
185183
const struct timespec *ts)
186184
{
187185
struct stm32l4_oneshot_lowerhalf_s *priv =
188186
(struct stm32l4_oneshot_lowerhalf_s *)lower;
189187
irqstate_t flags;
190188
int ret;
191189

192-
DEBUGASSERT(priv != NULL && callback != NULL && ts != NULL);
190+
DEBUGASSERT(priv != NULL && ts != NULL);
193191

194192
/* Save the callback information and start the timer */
195193

0 commit comments

Comments
 (0)