[media] smiapp-pll: Don't validate OP clocks if there are none
authorSakari Ailus <sakari.ailus@linux.intel.com>
Mon, 15 Sep 2014 21:47:32 +0000 (18:47 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Tue, 28 Oct 2014 15:37:19 +0000 (13:37 -0200)
For profile 0 sensors (which have no OP clocks), the OP limits are in fact
VT limits. Do not verify them again.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/i2c/smiapp-pll.c

index cac1407..862ca0c 100644 (file)
@@ -131,6 +131,14 @@ static int check_all_bounds(struct device *dev,
                        op_limits->min_pix_clk_freq_hz,
                        op_limits->max_pix_clk_freq_hz,
                        "op_pix_clk_freq_hz");
+
+       /*
+        * If there are no OP clocks, the VT clocks are contained in
+        * the OP clock struct.
+        */
+       if (pll->flags & SMIAPP_PLL_FLAG_NO_OP_CLOCKS)
+               return rval;
+
        if (!rval)
                rval = bounds_check(
                        dev, pll->vt.sys_clk_freq_hz,