Re: [Tinyx-devel] [PATCH 29/30] CLOCK: Fix static -> extern functions
Status: Planning
Brought to you by:
davidcohen
|
From: David C. <da...@gm...> - 2007-12-12 18:23:14
|
Acked.
BR,
David Cohen
On Dec 12, 2007 11:21 AM, Felipe Balbi <me...@fe...> wrote:
> Miscelanous fixes on clock subsystem.
>
> Signed-off-by: Felipe Balbi <me...@fe...>
> ---
> arch/arm7/mach-lpc21xx/clock.c | 25 ++++++++++++++++++++++---
> arch/arm7/mach-lpc21xx/clock.h | 24 +++---------------------
> arch/common/clock.c | 6 +++---
> include/asm-generic/clock.h | 6 +++---
> 4 files changed, 31 insertions(+), 30 deletions(-)
>
> diff --git a/arch/arm7/mach-lpc21xx/clock.c
> b/arch/arm7/mach-lpc21xx/clock.c
> index 3695c46..61b00e3 100644
> --- a/arch/arm7/mach-lpc21xx/clock.c
> +++ b/arch/arm7/mach-lpc21xx/clock.c
> @@ -21,16 +21,35 @@
>
> #include "clock.h"
>
> -static unsigned int cclk_set_rate(struct clock *clk, unsigned int rate)
> +unsigned int cclk_set_rate(struct clock *clk, unsigned int rate)
> {
> return 0;
> }
>
> -static unsigned int pclk_set_rate(struct clock *clk, unsigned int rate)
> +unsigned int pclk_set_rate(struct clock *clk, unsigned int rate)
> {
> return 0;
> }
>
> -static void pclk_propagate(struct clock *clk, struct clock *parent)
> +void pclk_propagate(struct clock *clk, struct clock *parent)
> {
> }
> +
> +static struct clock pclk = {
> + .id = PCLK,
> + .num_child = 0,
> + .child = NULL,
> + .set_rate = pclk_set_rate,
> + .propagate = pclk_propagate,
> +};
> +
> +static struct clock cclk = {
> + .id = CCLK,
> + .num_child = 1,
> + .child = &pclk,
> + .set_rate = cclk_set_rate,
> + .propagate = NULL,
> +};
> +
> +struct clock *lpc2xxx_clk_list[] = { &cclk, &pclk };
> +
> diff --git a/arch/arm7/mach-lpc21xx/clock.h
> b/arch/arm7/mach-lpc21xx/clock.h
> index fa5d69a..214fd62 100644
> --- a/arch/arm7/mach-lpc21xx/clock.h
> +++ b/arch/arm7/mach-lpc21xx/clock.h
> @@ -25,26 +25,8 @@
> #include <asm/arch-lpc2xxx/clock.h>
> #include <tinyx/kernel.h>
>
> -static unsigned int cclk_set_rate(struct clock *clk, unsigned int rate);
> -static unsigned int pclk_set_rate(struct clock *clk, unsigned int rate);
> -static void pclk_propagate(struct clock *clk, struct clock *parent);
> -
> -static struct clock pclk = {
> - .id = PCLK,
> - .num_child = 0,
> - .child = NULL,
> - .set_rate = pclk_set_rate,
> - .propagate = pclk_propagate,
> -};
> -
> -static struct clock cclk = {
> - .id = CCLK,
> - .num_child = 1,
> - .child = &pclk,
> - .set_rate = cclk_set_rate,
> - .propagate = NULL,
> -};
> -
> -struct clock *lpc2xxx_clk_list[] = { &cclk, &pclk };
> +extern unsigned int cclk_set_rate(struct clock *clk, unsigned int rate);
> +extern unsigned int pclk_set_rate(struct clock *clk, unsigned int rate);
> +extern void pclk_propagate(struct clock *clk, struct clock *parent);
>
> #endif /* __ARCH_MACH_LPC2XXX_CLOCK_H */
> diff --git a/arch/common/clock.c b/arch/common/clock.c
> index 12c3551..d92f09e 100644
> --- a/arch/common/clock.c
> +++ b/arch/common/clock.c
> @@ -25,13 +25,13 @@
> static struct clock *clk_list;
> static unsigned int num_clk;
>
> -static void clk_set_list(struct clock *list, unsigned int num)
> +void clk_set_list(struct clock *list, unsigned int num)
> {
> clk_list = list;
> num_clk = num;
> }
>
> -static void clk_propagate(struct clock *clk, struct clock *parent)
> +void clk_propagate(struct clock *clk, struct clock *parent)
> {
> unsigned int c;
> struct clock *child;
> @@ -52,7 +52,7 @@ static void clk_propagate(struct clock *clk, struct
> clock *parent)
> }
> }
>
> -static unsigned int clk_set_rate(struct clock *clk, unsigned int rate)
> +unsigned int clk_set_rate(struct clock *clk, unsigned int rate)
> {
> unsigned int clk_rate = rate;
> unsigned int c;
> diff --git a/include/asm-generic/clock.h b/include/asm-generic/clock.h
> index 92e397d..4ac8e7c 100644
> --- a/include/asm-generic/clock.h
> +++ b/include/asm-generic/clock.h
> @@ -34,8 +34,8 @@ struct clock {
>
> #define clk_get_rate(clk) (clk)->rate
>
> -static void clk_set_list(struct clock *list, unsigned int num);
> -static void clk_propagate(struct clock *clk, struct clock *parent);
> -static unsigned int clk_set_rate(struct clock *clk, unsigned int rate);
> +extern void clk_set_list(struct clock *list, unsigned int num);
> +extern void clk_propagate(struct clock *clk, struct clock *parent);
> +extern unsigned int clk_set_rate(struct clock *clk, unsigned int rate);
>
> #endif /* __ASM_GENERIC_CLOCK_H */
> --
> 1.5.3.7.1157.gbf82a
>
>
> -------------------------------------------------------------------------
> SF.Net email is sponsored by:
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> Tinyx-devel mailing list
> Tin...@li...
> https://lists.sourceforge.net/lists/listinfo/tinyx-devel
>
|