From: Nishanth Menon <[email protected]>

_add_clkdev uses &od->pdev->dev for all reference of device struct.

Simplify the usage with a variable.

Signed-off-by: Nishanth Menon <[email protected]>
Signed-off-by: Tero Kristo <[email protected]>
---
 arch/arm/mach-omap2/omap_device.c |   16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_device.c 
b/arch/arm/mach-omap2/omap_device.c
index f99f68e..070d17b 100644
--- a/arch/arm/mach-omap2/omap_device.c
+++ b/arch/arm/mach-omap2/omap_device.c
@@ -47,31 +47,29 @@ static void _add_clkdev(struct omap_device *od, const char 
*clk_alias,
 {
        struct clk *r;
        struct clk_lookup *l;
+       struct device *dev = &od->pdev->dev;
 
        if (!clk_alias || !clk_name)
                return;
 
-       dev_dbg(&od->pdev->dev, "Creating %s -> %s\n", clk_alias, clk_name);
+       dev_dbg(dev, "Creating %s -> %s\n", clk_alias, clk_name);
 
-       r = clk_get_sys(dev_name(&od->pdev->dev), clk_alias);
+       r = clk_get_sys(dev_name(dev), clk_alias);
        if (!IS_ERR(r)) {
-               dev_warn(&od->pdev->dev,
-                        "alias %s already exists\n", clk_alias);
+               dev_warn(dev, "alias %s already exists\n", clk_alias);
                clk_put(r);
                return;
        }
 
        r = clk_get(NULL, clk_name);
        if (IS_ERR(r)) {
-               dev_err(&od->pdev->dev,
-                       "clk_get for %s failed\n", clk_name);
+               dev_err(dev, "clk_get for %s failed\n", clk_name);
                return;
        }
 
-       l = clkdev_alloc(r, clk_alias, dev_name(&od->pdev->dev));
+       l = clkdev_alloc(r, clk_alias, dev_name(dev));
        if (!l) {
-               dev_err(&od->pdev->dev,
-                       "clkdev_alloc for %s failed\n", clk_alias);
+               dev_err(dev, "clkdev_alloc for %s failed\n", clk_alias);
                return;
        }
 
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to