summaryrefslogtreecommitdiff
path: root/drivers/staging/greybus/light.c
diff options
context:
space:
mode:
authorRui Miguel Silva <rui.silva@linaro.org>2015-12-03 16:07:47 +0000
committerGreg Kroah-Hartman <gregkh@google.com>2015-12-03 15:33:34 -0800
commit3f85c787b74c26f3816017e64288af907f291462 (patch)
treec06fe3a23622893c0f35f7df5d87507b3441391a /drivers/staging/greybus/light.c
parente6420dac3d5d45c60886221afcf31ecaf255d992 (diff)
greybus: lights: add v4l2 flash operations
We do not implement any of the v4l2 flash operations, as the default ones are ok for now, however the init needs anything define, if not it will return an error. So, just define it and have an error free v4l2 flash init. Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/light.c')
-rw-r--r--drivers/staging/greybus/light.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/greybus/light.c b/drivers/staging/greybus/light.c
index 3723a2ce29b3..01dcf18c9601 100644
--- a/drivers/staging/greybus/light.c
+++ b/drivers/staging/greybus/light.c
@@ -456,6 +456,8 @@ static void gb_lights_led_operations_set(struct gb_channel *channel,
#ifdef V4L2_HAVE_FLASH
/* V4L2 specific helpers */
+static const struct v4l2_flash_ops v4l2_flash_ops;
+
static void __gb_lights_channel_v4l2_config(struct led_flash_setting *channel_s,
struct led_flash_setting *v4l2_s)
{
@@ -507,7 +509,7 @@ static int gb_lights_light_v4l2_register(struct gb_light *light)
LED_FAULT_LED_OVER_TEMPERATURE;
light->v4l2_flash = v4l2_flash_init(dev, NULL, fled, iled,
- NULL, sd_cfg);
+ &v4l2_flash_ops, sd_cfg);
if (IS_ERR_OR_NULL(light->v4l2_flash)) {
ret = PTR_ERR(light->v4l2_flash);
goto out_free;