From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lothar =?UTF-8?B?V2HDn21hbm4=?= Date: Tue, 20 Jun 2017 14:11:41 +0200 Subject: [U-Boot] [PATCH v7 03/10] clk: add clk_disable_all() In-Reply-To: <1497952751-28477-4-git-send-email-patrice.chotard@st.com> References: <1497952751-28477-1-git-send-email-patrice.chotard@st.com> <1497952751-28477-4-git-send-email-patrice.chotard@st.com> Message-ID: <20170620141141.0fbf8c30@karo-electronics.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable To: u-boot@lists.denx.de Hi, On Tue, 20 Jun 2017 11:59:04 +0200 patrice.chotard at st.com wrote: > From: Patrice Chotard >=20 > Add clk_disable_all() method which Request/Disable/Free an > array of clocks that has been previously requested by > clk_request/get_by_*() >=20 > Signed-off-by: Patrice Chotard > Reviewed-by: Simon Glass > --- >=20 > v7: _ none > v6: _ none > v5: _ none > v4: _ none > v3: _ add commit message > v2: _ create this independant path for printf() replacement >=20 > drivers/clk/clk-uclass.c | 22 ++++++++++++++++++++++ > include/clk.h | 10 ++++++++++ > 2 files changed, 32 insertions(+) >=20 > diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c > index 83b6328..e732514 100644 > --- a/drivers/clk/clk-uclass.c > +++ b/drivers/clk/clk-uclass.c > @@ -187,6 +187,28 @@ int clk_disable(struct clk *clk) > return ops->disable(clk); > } > =20 > +int clk_disable_all(struct clk *clk, int count) > +{ > + int i, ret; > + > + debug("%s(clk=3D%p count=3D%d)\n", __func__, clk, count); > + > + for (i =3D 0; i < count; i++) { > + ret =3D clk_request(clk->dev, &clk[i]); > Shouldn't this be: ret =3D clk_request(clk[i].dev, &clk[i]); Lothar Wa=C3=9Fmann