The contents of clk-provide.h, struct clk_hw etc, are only available if
CONFIG_COMMON_CLK is selected. Therefore IS_ENABLED(COMMON_CLK) is not
sufficient and real preprocessor conditions are necessary to keep the code
in question from being compiled on non-COMMON_CLK systems.
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Reported-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
struct i2c_client *client;
struct rtc_device *rtc;
bool valid;
+#ifdef CONFIG_COMMON_CLK
struct clk_hw clkout_hw;
+#endif
};
/*
* Handling of the clkout
*/
+#ifdef CONFIG_COMMON_CLK
#define clkout_hw_to_hym8563(_hw) container_of(_hw, struct hym8563, clkout_hw)
static int clkout_rates[] = {
return clk;
}
+#endif
/*
* The alarm interrupt is implemented as a level-low interrupt in the
if (IS_ERR(hym8563->rtc))
return PTR_ERR(hym8563->rtc);
- if (IS_ENABLED(CONFIG_COMMON_CLK))
- hym8563_clkout_register_clk(hym8563);
+#ifdef CONFIG_COMMON_CLK
+ hym8563_clkout_register_clk(hym8563);
+#endif
return 0;
}