mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 12:11:40 +00:00
1df3799243
Without this we were getting errors like: In file included from drivers/clk/clkdev.c:22:0: drivers/clk/clk.h:36:23: error: static declaration of '__clk_get_hw' follows non-static declaration include/linux/clk-provider.h:808:16: note: previous declaration of '__clk_get_hw' was here Fixes:59fcdce425
("clk: Remove ifdef for COMMON_CLK in clk-provider.h") fixes:73e0e496af
("clkdev: Always allocate a struct clk and call __clk_get() w/ CCF") Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
39 lines
1.0 KiB
C
39 lines
1.0 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Copyright (C) 2013 Samsung Electronics Co., Ltd.
|
|
* Sylwester Nawrocki <s.nawrocki@samsung.com>
|
|
*/
|
|
|
|
struct clk_hw;
|
|
struct device;
|
|
struct of_phandle_args;
|
|
|
|
#if defined(CONFIG_OF) && defined(CONFIG_COMMON_CLK)
|
|
struct clk_hw *of_clk_get_hw(struct device_node *np,
|
|
int index, const char *con_id);
|
|
#else /* !CONFIG_COMMON_CLK || !CONFIG_OF */
|
|
static inline struct clk_hw *of_clk_get_hw(struct device_node *np,
|
|
int index, const char *con_id)
|
|
{
|
|
return ERR_PTR(-ENOENT);
|
|
}
|
|
#endif
|
|
|
|
struct clk_hw *clk_find_hw(const char *dev_id, const char *con_id);
|
|
|
|
#ifdef CONFIG_COMMON_CLK
|
|
struct clk *clk_hw_create_clk(struct device *dev, struct clk_hw *hw,
|
|
const char *dev_id, const char *con_id);
|
|
void __clk_put(struct clk *clk);
|
|
#else
|
|
/* All these casts to avoid ifdefs in clkdev... */
|
|
static inline struct clk *
|
|
clk_hw_create_clk(struct device *dev, struct clk_hw *hw, const char *dev_id,
|
|
const char *con_id)
|
|
{
|
|
return (struct clk *)hw;
|
|
}
|
|
static inline void __clk_put(struct clk *clk) { }
|
|
|
|
#endif
|