[media] media: omap3isp: remove unused clkdev
authorRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 3 Apr 2015 17:12:58 +0000 (14:12 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Fri, 10 Apr 2015 13:25:30 +0000 (10:25 -0300)
No merged platform supplies xclks via platform data.  As we want to
slightly change the clkdev interface, rather than fixing this unused
code, remove it instead.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/platform/omap3isp/isp.c
drivers/media/platform/omap3isp/isp.h
include/media/omap3isp.h

index ff51c4f9d35e60234940396f1b4f49786f4a5a12..18d0a871747fe95e2714d4ada0bf40b42a6389b5 100644 (file)
@@ -304,7 +304,6 @@ static struct clk *isp_xclk_src_get(struct of_phandle_args *clkspec, void *data)
 
 static int isp_xclk_init(struct isp_device *isp)
 {
-       struct isp_platform_data *pdata = isp->pdata;
        struct device_node *np = isp->dev->of_node;
        struct clk_init_data init;
        unsigned int i;
@@ -335,26 +334,6 @@ static int isp_xclk_init(struct isp_device *isp)
                xclk->clk = clk_register(NULL, &xclk->hw);
                if (IS_ERR(xclk->clk))
                        return PTR_ERR(xclk->clk);
-
-               /* When instantiated from DT we don't need to register clock
-                * aliases.
-                */
-               if (np)
-                       continue;
-
-               if (!pdata || (pdata->xclks[i].con_id == NULL &&
-                              pdata->xclks[i].dev_id == NULL))
-                       continue;
-
-               xclk->lookup = kzalloc(sizeof(*xclk->lookup), GFP_KERNEL);
-               if (xclk->lookup == NULL)
-                       return -ENOMEM;
-
-               xclk->lookup->con_id = pdata->xclks[i].con_id;
-               xclk->lookup->dev_id = pdata->xclks[i].dev_id;
-               xclk->lookup->clk = xclk->clk;
-
-               clkdev_add(xclk->lookup);
        }
 
        if (np)
@@ -376,9 +355,6 @@ static void isp_xclk_cleanup(struct isp_device *isp)
 
                if (!IS_ERR(xclk->clk))
                        clk_unregister(xclk->clk);
-
-               if (xclk->lookup)
-                       clkdev_drop(xclk->lookup);
        }
 }
 
index 431224ec09edaa347cdb2cd0044787962e7dfc91..e579943175c4cfcd419e45ccf01dfe6ac3c52447 100644 (file)
@@ -132,7 +132,6 @@ enum isp_xclk_id {
 struct isp_xclk {
        struct isp_device *isp;
        struct clk_hw hw;
-       struct clk_lookup *lookup;
        struct clk *clk;
        enum isp_xclk_id id;
 
index 0f0c08b48829527ce426f3ad99c723ed94a1e9fb..048f8f9117efaaa7ee3564290700fe7bfcbf8628 100644 (file)
@@ -150,13 +150,7 @@ struct isp_platform_subdev {
        struct isp_bus_cfg *bus;
 };
 
-struct isp_platform_xclk {
-       const char *dev_id;
-       const char *con_id;
-};
-
 struct isp_platform_data {
-       struct isp_platform_xclk xclks[2];
        struct isp_platform_subdev *subdevs;
        void (*set_constraints)(struct isp_device *isp, bool enable);
 };