[media] radio-si470x: Don't unnecesarily read registers on G_TUNER
[deliverable/linux.git] / drivers / media / radio / si470x / radio-si470x-common.c
index d485b79222fd4f554fb8834a9ed7f3ace84e7efd..5dbb897e14de15fafebd92e0d418d7e2ee9aede9 100644 (file)
@@ -583,14 +583,16 @@ static int si470x_vidioc_g_tuner(struct file *file, void *priv,
                struct v4l2_tuner *tuner)
 {
        struct si470x_device *radio = video_drvdata(file);
-       int retval;
+       int retval = 0;
 
        if (tuner->index != 0)
                return -EINVAL;
 
-       retval = si470x_get_register(radio, STATUSRSSI);
-       if (retval < 0)
-               return retval;
+       if (!radio->status_rssi_auto_update) {
+               retval = si470x_get_register(radio, STATUSRSSI);
+               if (retval < 0)
+                       return retval;
+       }
 
        /* driver constants */
        strcpy(tuner->name, "FM");
This page took 0.024779 seconds and 5 git commands to generate.