lkml.org 
[lkml]   [2012]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH V7 2/4] MIPS: Add board support for Loongson1B
    Date
    On Wednesday 20 June 2012 23:35:15 Sergei Shtylyov wrote:
    > Hello.
    >
    > On 06/20/2012 11:25 PM, Ralf Baechle wrote:
    >
    > >> +#include <linux/clk.h>
    >
    > >> +static LIST_HEAD(clocks);
    > >> +static DEFINE_MUTEX(clocks_mutex);
    > >> +
    > >> +struct clk *clk_get(struct device *dev, const char *name)
    > >> +{
    > >> + struct clk *c;
    > >> + struct clk *ret = NULL;
    > >> +
    > >> + mutex_lock(&clocks_mutex);
    > >> + list_for_each_entry(c, &clocks, node) {
    > >> + if (!strcmp(c->name, name)) {
    > >> + ret = c;
    > >> + break;
    > >> + }
    > >> + }
    > >> + mutex_unlock(&clocks_mutex);
    > >> +
    > >> + return ret;
    > >> +}
    > >> +EXPORT_SYMBOL(clk_get);
    >
    > > This redefines a function that already is declared in <linux/clk.h> and
    > > defined in drivers/clk/clkdev.c. Why?
    >
    > Because he doesn't support clkdev? clkdev support is optional.

    I don't think it is a good idea not to support clkdev for new targets. Ralf
    what do you think about it?


    >
    > >> +int clk_register(struct clk *clk)
    > >> +{
    > >> + mutex_lock(&clocks_mutex);
    > >> + list_add(&clk->node, &clocks);
    > >> + if (clk->ops->init)
    > >> + clk->ops->init(clk);
    > >> + mutex_unlock(&clocks_mutex);
    > >> +
    > >> + return 0;
    > >> +}
    > >> +EXPORT_SYMBOL(clk_register);
    >
    > > Same here.
    >
    > > Ralf
    >
    > WBR, Sergei
    > --
    > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    > the body of a message to majordomo@vger.kernel.org
    > More majordomo info at http://vger.kernel.org/majordomo-info.html
    > Please read the FAQ at http://www.tux.org/lkml/
    --
    Florian


    \
     
     \ /
      Last update: 2012-06-20 23:01    [W:3.438 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site