diff options
author | Kees Cook <keescook@chromium.org> | 2017-10-24 04:22:11 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-10-31 06:26:54 -0400 |
commit | fdbc17101e4eb68dda73abda1df72f2852eaeda0 (patch) | |
tree | c423cf724b6524e0aac06f01e6114379997eecdd /drivers/staging/media/atomisp | |
parent | b5027c520f35979f702bf42b4e55640f4168c317 (diff) | |
download | op-kernel-dev-fdbc17101e4eb68dda73abda1df72f2852eaeda0.zip op-kernel-dev-fdbc17101e4eb68dda73abda1df72f2852eaeda0.tar.gz |
media: staging: atomisp: i2c: 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.
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/staging/media/atomisp')
-rw-r--r-- | drivers/staging/media/atomisp/i2c/atomisp-lm3554.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/staging/media/atomisp/i2c/atomisp-lm3554.c b/drivers/staging/media/atomisp/i2c/atomisp-lm3554.c index a37ab5c..4fd9f53 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-lm3554.c +++ b/drivers/staging/media/atomisp/i2c/atomisp-lm3554.c @@ -167,10 +167,9 @@ static int lm3554_set_config1(struct lm3554 *flash) /* ----------------------------------------------------------------------------- * Hardware trigger */ -static void lm3554_flash_off_delay(long unsigned int arg) +static void lm3554_flash_off_delay(struct timer_list *t) { - struct v4l2_subdev *sd = i2c_get_clientdata((struct i2c_client *)arg); - struct lm3554 *flash = to_lm3554(sd); + struct lm3554 *flash = from_timer(flash, t, flash_off_delay); struct lm3554_platform_data *pdata = flash->pdata; gpio_set_value(pdata->gpio_strobe, 0); @@ -908,8 +907,7 @@ static int lm3554_probe(struct i2c_client *client) mutex_init(&flash->power_lock); - setup_timer(&flash->flash_off_delay, lm3554_flash_off_delay, - (unsigned long)client); + timer_setup(&flash->flash_off_delay, lm3554_flash_off_delay, 0); err = lm3554_gpio_init(client); if (err) { |