summaryrefslogtreecommitdiff
path: root/sound/i2c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-10-25 18:09:27 +0300
committerTakashi Iwai <tiwai@suse.de>2017-10-26 15:44:59 +0300
commit7211ec6392c8650ebc804023178c245464417ed2 (patch)
treee94c80c2618a50be61994b55372390484dcff456 /sound/i2c
parent20e5f8bfb153bdd43b5be194658f8ad814470a5d (diff)
downloadlinux-7211ec6392c8650ebc804023178c245464417ed2.tar.xz
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>
Diffstat (limited to 'sound/i2c')
-rw-r--r--sound/i2c/other/ak4117.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/i2c/other/ak4117.c b/sound/i2c/other/ak4117.c
index 3ab099fb8c15..b923342cadf4 100644
--- a/sound/i2c/other/ak4117.c
+++ b/sound/i2c/other/ak4117.c
@@ -35,7 +35,7 @@ MODULE_LICENSE("GPL");
#define AK4117_ADDR 0x00 /* fixed address */
-static void snd_ak4117_timer(unsigned long data);
+static void snd_ak4117_timer(struct timer_list *t);
static void reg_write(struct ak4117 *ak4117, unsigned char reg, unsigned char val)
{
@@ -91,7 +91,7 @@ int snd_ak4117_create(struct snd_card *card, ak4117_read_t *read, ak4117_write_t
chip->read = read;
chip->write = write;
chip->private_data = private_data;
- setup_timer(&chip->timer, snd_ak4117_timer, (unsigned long)chip);
+ timer_setup(&chip->timer, snd_ak4117_timer, 0);
for (reg = 0; reg < 5; reg++)
chip->regmap[reg] = pgm[reg];
@@ -529,9 +529,9 @@ int snd_ak4117_check_rate_and_errors(struct ak4117 *ak4117, unsigned int flags)
return res;
}
-static void snd_ak4117_timer(unsigned long data)
+static void snd_ak4117_timer(struct timer_list *t)
{
- struct ak4117 *chip = (struct ak4117 *)data;
+ struct ak4117 *chip = from_timer(chip, t, timer);
if (chip->init)
return;