From: Paul Walmsley Date: Wed, 21 May 2008 00:41:35 +0000 (-0600) Subject: [ARM] OMAP: clockdomain: add clkdm_get_pwrdm() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e89087c99f2be002ff46126742c21da5d357b324;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git [ARM] OMAP: clockdomain: add clkdm_get_pwrdm() Add clkdm_get_pwrdm() to the clockdomain code. It will return a pointer to the powerdomain struct that the clockdomain is contained within. Used by the PM code. Signed-off-by: Paul Walmsley Signed-off-by: Tony Lindgren Signed-off-by: Russell King --- diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c index b6ff5aa4726e..4c3ce9cfd948 100644 --- a/arch/arm/mach-omap2/clockdomain.c +++ b/arch/arm/mach-omap2/clockdomain.c @@ -315,6 +315,22 @@ int clkdm_for_each(int (*fn)(struct clockdomain *clkdm)) } +/** + * clkdm_get_pwrdm - return a ptr to the pwrdm that this clkdm resides in + * @clkdm: struct clockdomain * + * + * Return a pointer to the struct powerdomain that the specified clockdomain + * 'clkdm' exists in, or returns NULL if clkdm argument is NULL. + */ +struct powerdomain *clkdm_get_pwrdm(struct clockdomain *clkdm) +{ + if (!clkdm) + return NULL; + + return clkdm->pwrdm; +} + + /* Hardware clockdomain control */ /**