ALSA: Convert timers to use timer_setup()
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. These are all the "mechanical" changes remaining in the sound subsystem. Signed-off-by: Kees Cook <keescook@chromium.org> Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Этот коммит содержится в:

коммит произвёл
Takashi Iwai

родитель
20e5f8bfb1
Коммит
7211ec6392
@@ -63,9 +63,9 @@ struct ct_timer {
|
||||
* system-timer-based updates
|
||||
*/
|
||||
|
||||
static void ct_systimer_callback(unsigned long data)
|
||||
static void ct_systimer_callback(struct timer_list *t)
|
||||
{
|
||||
struct ct_timer_instance *ti = (struct ct_timer_instance *)data;
|
||||
struct ct_timer_instance *ti = from_timer(ti, t, timer);
|
||||
struct snd_pcm_substream *substream = ti->substream;
|
||||
struct snd_pcm_runtime *runtime = substream->runtime;
|
||||
struct ct_atc_pcm *apcm = ti->apcm;
|
||||
@@ -93,8 +93,7 @@ static void ct_systimer_callback(unsigned long data)
|
||||
|
||||
static void ct_systimer_init(struct ct_timer_instance *ti)
|
||||
{
|
||||
setup_timer(&ti->timer, ct_systimer_callback,
|
||||
(unsigned long)ti);
|
||||
timer_setup(&ti->timer, ct_systimer_callback, 0);
|
||||
}
|
||||
|
||||
static void ct_systimer_start(struct ct_timer_instance *ti)
|
||||
|
Ссылка в новой задаче
Block a user