From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jean-Jacques Hiblot Date: Tue, 12 Nov 2019 11:16:57 +0100 Subject: [U-Boot] [PATCH v3 1/5] dm: clk: add stub for clk_disable_bulk when CONFIG_CLK is desactivated In-Reply-To: <20191112094214.12686-2-patrick.delaunay@st.com> References: <20191112094214.12686-1-patrick.delaunay@st.com> <20191112094214.12686-2-patrick.delaunay@st.com> Message-ID: <19c5071a-ab8a-7c68-a7fe-bda25391b531@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Patrick, On 12/11/2019 10:42, Patrick Delaunay wrote: > Add stub for clk_disable_bulk() when CONFIG_CLK is desactivated. > > That avoid compilation issue (undefined reference to > `clk_disable_bulk') for code: > > clk_disable_bulk(&priv->clks); > clk_release_bulk(&priv->clks); > > Signed-off-by: Patrick Delaunay > --- > > Changes in v3: > - Add stub for clk_disable_bulk > > Changes in v2: None > > include/clk.h | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/include/clk.h b/include/clk.h > index a5ee53d94a..6f0b0fe4bc 100644 > --- a/include/clk.h > +++ b/include/clk.h > @@ -379,7 +379,11 @@ int clk_disable(struct clk *clk); > * by clk_get_bulk(). > * @return zero on success, or -ve error code. > */ > + #if CONFIG_IS_ENABLED(CLK) > int clk_disable_bulk(struct clk_bulk *bulk); > +#else > +inline int clk_disable_bulk(struct clk_bulk *bulk) { return 0; } > +#endif Maybe this could be done for all clk operations ? JJ > > /** > * clk_is_match - check if two clk's point to the same hardware clock