Hi Sakari,

On 05/20/2015 01:04 AM, Sakari Ailus wrote:
Signed-off-by: Sakari Ailus <sakari.ai...@iki.fi>
---
  drivers/leds/leds-aat1290.c |    5 ++---
  1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/leds/leds-aat1290.c b/drivers/leds/leds-aat1290.c
index c656a2d..71bf6bb 100644
--- a/drivers/leds/leds-aat1290.c
+++ b/drivers/leds/leds-aat1290.c
@@ -524,9 +524,8 @@ static int aat1290_led_probe(struct platform_device *pdev)
        led_cdev->dev->of_node = sub_node;

        /* Create V4L2 Flash subdev. */
-       led->v4l2_flash = v4l2_flash_init(fled_cdev,
-                                         &v4l2_flash_ops,
-                                         &v4l2_sd_cfg);
+       led->v4l2_flash = v4l2_flash_init(dev, NULL, fled_cdev,
+                                         &v4l2_flash_ops, &v4l2_sd_cfg);

Here the first argument should be led_cdev->dev, not dev, which is
&pdev->dev, whereas led_cdev->dev is returned by
device_create_with_groups (it takes dev as a parent) called from led_classdev_register.

        if (IS_ERR(led->v4l2_flash)) {
                ret = PTR_ERR(led->v4l2_flash);
                goto error_v4l2_flash_init;



--
Best Regards,
Jacek Anaszewski
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to