[1/1] Export notifier register functions for kernel module building
diff mbox

Message ID EAF47CD23C76F840A9E7FCE10091EFAB02A40C1020@dbde02.ent.ti.com
State Accepted
Delegated to: Kevin Hilman
Headers show

Commit Message

Gupta, Ramesh Feb. 12, 2009, 9:20 a.m. UTC
From dde519d855e64a312331f86d9442c7b6d9ff0291 Mon Sep 17 00:00:00 2001
From: Ramesh Gupta G <grgupta@ti.com>
Date: Thu, 12 Feb 2009 00:39:47 +0530
Subject: [PATCH 1/1] Export notifier register functions for kernel module building.

This Patch exports symbols clk_notifier_register/unregister
function for other kernel modules usage.

Signed-off-by: Ramesh Gupta G <grgupta@ti.com>
---
 arch/arm/plat-omap/clock.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Comments

Kevin Hilman Feb. 12, 2009, 5:48 p.m. UTC | #1
"Gupta, Ramesh" <grgupta@ti.com> writes:

> This Patch exports symbols clk_notifier_register/unregister
> function for other kernel modules usage.
>
> Signed-off-by: Ramesh Gupta G <grgupta@ti.com>

Thanks, pushed to PM branch.

Kevin

> ---
>  arch/arm/plat-omap/clock.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c
> index e0940a1..c8d9e96 100644
> --- a/arch/arm/plat-omap/clock.c
> +++ b/arch/arm/plat-omap/clock.c
> @@ -680,6 +680,7 @@ int clk_notifier_register(struct clk *clk, struct notifier_block *nb)
>  
>  	return r;
>  }
> +EXPORT_SYMBOL(clk_notifier_register);
>  
>  /**
>   * clk_notifier_unregister - remove a clock change notifier
> @@ -735,6 +736,7 @@ int clk_notifier_unregister(struct clk *clk, struct notifier_block *nb)
>  
>  	return r;
>  }
> +EXPORT_SYMBOL(clk_notifier_unregister);
>  
>  
>  
> -- 
> 1.5.3.2
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Paul Walmsley March 24, 2009, 9:28 a.m. UTC | #2
Hello Kevin, Ramesh,

On Thu, 12 Feb 2009, Kevin Hilman wrote:

> "Gupta, Ramesh" <grgupta@ti.com> writes:
> 
> > This Patch exports symbols clk_notifier_register/unregister
> > function for other kernel modules usage.
> >
> > Signed-off-by: Ramesh Gupta G <grgupta@ti.com>
> 
> Thanks, pushed to PM branch.

As an aside, this patch should be reverted.  DSPBridge and other drivers 
needing clock notifiers should pass function pointers to 
clk_notifier_{register,unregister}() in their struct platform_data, rather 
than exporting those symbols.  This will keep the drivers 
platform-agnostic, since system-wide clock notifiers are not yet upstream.

regards,

- Paul

> > ---
> >  arch/arm/plat-omap/clock.c |    2 ++
> >  1 files changed, 2 insertions(+), 0 deletions(-)
> >
> > diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c
> > index e0940a1..c8d9e96 100644
> > --- a/arch/arm/plat-omap/clock.c
> > +++ b/arch/arm/plat-omap/clock.c
> > @@ -680,6 +680,7 @@ int clk_notifier_register(struct clk *clk, struct notifier_block *nb)
> >  
> >  	return r;
> >  }
> > +EXPORT_SYMBOL(clk_notifier_register);
> >  
> >  /**
> >   * clk_notifier_unregister - remove a clock change notifier
> > @@ -735,6 +736,7 @@ int clk_notifier_unregister(struct clk *clk, struct notifier_block *nb)
> >  
> >  	return r;
> >  }
> > +EXPORT_SYMBOL(clk_notifier_unregister);
> >  
> >  
> >  
> > -- 
> > 1.5.3.2
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Gupta, Ramesh March 24, 2009, 9:42 a.m. UTC | #3
Paul,

> -----Original Message-----
> From: Paul Walmsley [mailto:paul@pwsan.com] 
> Sent: Tuesday, March 24, 2009 2:58 PM
> To: Kevin Hilman
> Cc: Gupta, Ramesh; linux-omap@vger.kernel.org
> Subject: Re: [PATCH 1/1] Export notifier register functions 
> for kernel module building
> 
> Hello Kevin, Ramesh,
> 
> On Thu, 12 Feb 2009, Kevin Hilman wrote:
> 
> > "Gupta, Ramesh" <grgupta@ti.com> writes:
> > 
> > > This Patch exports symbols 
> clk_notifier_register/unregister function 
> > > for other kernel modules usage.
> > >
> > > Signed-off-by: Ramesh Gupta G <grgupta@ti.com>
> > 
> > Thanks, pushed to PM branch.
> 
> As an aside, this patch should be reverted.  DSPBridge and 
> other drivers needing clock notifiers should pass function pointers to
> clk_notifier_{register,unregister}() in their struct 
> platform_data, rather than exporting those symbols.  This 
> will keep the drivers platform-agnostic, since system-wide 
> clock notifiers are not yet upstream.

I agree on this, I think the latest patch set from Rajendra Naik([1]) removes the EXPORT_SYMBOL for the clk notifier functions.

Ref[1]: http://marc.info/?l=linux-omap&m=123755561914202&w=2
Ref[2]: http://marc.info/?l=linux-omap&m=123755561914205&w=2

We will send a patch to dspbridge sources to adopt these changes.

Please let me know your comments.

Thanks
Ramesh Gupta G--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Paul Walmsley March 24, 2009, 9:48 a.m. UTC | #4
On Tue, 24 Mar 2009, Gupta, Ramesh wrote:

> > -----Original Message-----
> > From: Paul Walmsley [mailto:paul@pwsan.com] 
> > 
> > DSPBridge and 
> > other drivers needing clock notifiers should pass function pointers to
> > clk_notifier_{register,unregister}() in their struct 
> > platform_data, rather than exporting those symbols.  This 
> > will keep the drivers platform-agnostic, since system-wide 
> > clock notifiers are not yet upstream.
> 
> I agree on this, I think the latest patch set from Rajendra Naik([1]) 
> removes the EXPORT_SYMBOL for the clk notifier functions.
> 
> We will send a patch to dspbridge sources to adopt these changes.
> 
> Please let me know your comments.

Sounds good to me.

regards,

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

Patch
diff mbox

diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c
index e0940a1..c8d9e96 100644
--- a/arch/arm/plat-omap/clock.c
+++ b/arch/arm/plat-omap/clock.c
@@ -680,6 +680,7 @@  int clk_notifier_register(struct clk *clk, struct notifier_block *nb)
 
 	return r;
 }
+EXPORT_SYMBOL(clk_notifier_register);
 
 /**
  * clk_notifier_unregister - remove a clock change notifier
@@ -735,6 +736,7 @@  int clk_notifier_unregister(struct clk *clk, struct notifier_block *nb)
 
 	return r;
 }
+EXPORT_SYMBOL(clk_notifier_unregister);