lkml.org 
[lkml]   [2017]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [RFC PATCH 1/3] clk: add clk_bulk_get accessories
    On Wed, Apr 12, 2017 at 6:03 AM, Dong Aisheng <aisheng.dong@nxp.com> wrote:
    > --- a/drivers/clk/clk.c
    > +++ b/drivers/clk/clk.c
    > @@ -520,6 +520,23 @@ void clk_unprepare(struct clk *clk)
    > }
    > EXPORT_SYMBOL_GPL(clk_unprepare);
    >
    > +/**
    > + * clk_bulk_unprepare - undo preparation of a bulk of clock sources
    > + * @num_clks: the number of clk_bulk_data
    > + * @clks: the clk_bulk_data table being ungated
    > + *
    > + * clk_bulk_unprepare may sleep, which differentiates it from clk_bulk_disable.
    > + * Returns 0 on success, -EERROR otherwise.
    > + */
    > +void clk_bulk_unprepare(int num_clks, struct clk_bulk_data *clks)

    unsigned int num_clks (everywhere)

    > +{
    > + int i;

    unsigned int i (everywhere)

    > +
    > + for (i = 0; i < num_clks; i++)
    > + clk_unprepare(clks[i].clk);
    > +}
    > +EXPORT_SYMBOL_GPL(clk_bulk_unprepare);

    This does mean you have to change your "while (--i >= 0)" loops.

    Gr{oetje,eeting}s,

    Geert

    --
    Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

    In personal conversations with technical people, I call myself a hacker. But
    when I'm talking to journalists I just say "programmer" or something like that.
    -- Linus Torvalds

    \
     
     \ /
      Last update: 2017-04-13 21:57    [W:3.050 / U:0.176 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site