[media] radio-si470x: restore ctrl settings after suspend/resume
authorHans de Goede <hdegoede@redhat.com>
Thu, 12 Jul 2012 19:55:46 +0000 (16:55 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 30 Jul 2012 23:23:12 +0000 (20:23 -0300)
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/radio/si470x/radio-si470x-usb.c

index 40b963c983c63c82be1e00b89dfda7f92d6f2e67..0204cf4453879b2fa5b4f7596480c629c474b631 100644 (file)
@@ -792,11 +792,16 @@ static int si470x_usb_driver_suspend(struct usb_interface *intf,
 static int si470x_usb_driver_resume(struct usb_interface *intf)
 {
        struct si470x_device *radio = usb_get_intfdata(intf);
+       int ret;
 
        dev_info(&intf->dev, "resuming now...\n");
 
        /* start radio */
-       return si470x_start_usb(radio);
+       ret = si470x_start_usb(radio);
+       if (ret == 0)
+               v4l2_ctrl_handler_setup(&radio->hdl);
+
+       return ret;
 }