Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

media: adv7180: Setup controls every time the device is reset

The device initialization code resets the whole device, thus the initial
controls set at probe are lost as adv7180_init_controls() are called
before init_device(). Additionally the controls were never restored
after the device where reset coming back from suspend.

Solve this by separate the setup of the controls from the creation of
them, and always set them up when the device is reset.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>

authored by

Niklas Söderlund and committed by
Hans Verkuil
dc12a27c 6742cc8d

+2 -1
+2 -1
drivers/media/i2c/adv7180.c
··· 700 700 v4l2_ctrl_handler_free(&state->ctrl_hdl); 701 701 return err; 702 702 } 703 - v4l2_ctrl_handler_setup(&state->ctrl_hdl); 704 703 705 704 return 0; 706 705 } ··· 896 897 return ret; 897 898 898 899 adv7180_set_field_mode(state); 900 + 901 + __v4l2_ctrl_handler_setup(&state->ctrl_hdl); 899 902 900 903 /* register for interrupts */ 901 904 if (state->irq > 0) {