lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.0901292327090.26985@utopia.booyaka.com>
Date:	Thu, 29 Jan 2009 23:29:31 -0700 (MST)
From:	Paul Walmsley <paul@...an.com>
To:	Russell King - ARM Linux <linux@....linux.org.uk>
cc:	linux-arm-kernel@...ts.arm.linux.org.uk,
	linux-kernel@...r.kernel.org, linux-omap@...r.kernel.org,
	Måns Rullgård <mans@...sr.com>,
	Tony Lindgren <tony@...mide.com>
Subject: Re: [PATCH D 01/11] OMAP: Add clk_get_parent() for OMAP2/3

On Thu, 29 Jan 2009, Russell King - ARM Linux wrote:

> On Wed, Jan 28, 2009 at 12:18:16PM -0700, Paul Walmsley wrote:
> > From: Mans Rullgard <mans@...sr.com>
> > 
> > This makes clk_get_parent() work on OMAP2/3.
> 
> This is clearly something that the generic code should be doing.
> It's not something specific to OMAP2/3.  Please move it to
> arch/arm/plat-omap/clock.c

Done; revised patch below.

- Paul


From: Mans Rullgard <mans@...sr.com>
Date: Thu Jan 29 23:26:35 2009 -0700

    OMAP: Add clk_get_parent() for OMAP1/2/3
    
    This makes clk_get_parent() work on OMAP.

    linux-omap source commit is efd65273726b12e42c7225bd1703e5252bdb46c0.
    
    Signed-off-by: Måns Rullgård <mans@...sr.com>
    Signed-off-by: Tony Lindgren <tony@...mide.com>
    [paul@...an.com: per rmk, made this function available on all OMAPs
     and fixated its implementation]
    Signed-off-by: Paul Walmsley <paul@...an.com>

diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c
index be6aab9..eb59874 100644
--- a/arch/arm/plat-omap/clock.c
+++ b/arch/arm/plat-omap/clock.c
@@ -210,18 +210,7 @@ EXPORT_SYMBOL(clk_set_parent);
 
 struct clk *clk_get_parent(struct clk *clk)
 {
-	unsigned long flags;
-	struct clk * ret = NULL;
-
-	if (clk == NULL || IS_ERR(clk))
-		return ret;
-
-	spin_lock_irqsave(&clockfw_lock, flags);
-	if (arch_clock->clk_get_parent)
-		ret = arch_clock->clk_get_parent(clk);
-	spin_unlock_irqrestore(&clockfw_lock, flags);
-
-	return ret;
+	return clk->parent;
 }
 EXPORT_SYMBOL(clk_get_parent);
 
diff --git a/arch/arm/plat-omap/include/mach/clock.h b/arch/arm/plat-omap/include/mach/clock.h
index f6adf39..47c9a11 100644
--- a/arch/arm/plat-omap/include/mach/clock.h
+++ b/arch/arm/plat-omap/include/mach/clock.h
@@ -104,7 +104,6 @@ struct clk_functions {
 	long		(*clk_round_rate)(struct clk *clk, unsigned long rate);
 	int		(*clk_set_rate)(struct clk *clk, unsigned long rate);
 	int		(*clk_set_parent)(struct clk *clk, struct clk *parent);
-	struct clk *	(*clk_get_parent)(struct clk *clk);
 	void		(*clk_allow_idle)(struct clk *clk);
 	void		(*clk_deny_idle)(struct clk *clk);
 	void		(*clk_disable_unused)(struct clk *clk);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ