From: Richard Fitzgerald Date: Wed, 13 May 2015 15:52:25 +0000 (+0100) Subject: mfd: arizona: Add stub for wm5102_patch() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7e2d67e94ab05f70d2a73d00283f46778386ca52;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git mfd: arizona: Add stub for wm5102_patch() For the WM5102 there is a dependency in the core code on wm5102_patch() which only exists when CONFIG_MFD_WM5102 is defined. To avoid having to sprinkle #ifdefs around the code it is given an alternative empty stub version when CONFIG_MFD_WM5102 is deselected Signed-off-by: Richard Fitzgerald Signed-off-by: Lee Jones --- diff --git a/include/linux/mfd/arizona/core.h b/include/linux/mfd/arizona/core.h index 847bdaf47f1d..2f434f4f79a1 100644 --- a/include/linux/mfd/arizona/core.h +++ b/include/linux/mfd/arizona/core.h @@ -154,7 +154,15 @@ int arizona_request_irq(struct arizona *arizona, int irq, char *name, void arizona_free_irq(struct arizona *arizona, int irq, void *data); int arizona_set_irq_wake(struct arizona *arizona, int irq, int on); +#ifdef CONFIG_MFD_WM5102 int wm5102_patch(struct arizona *arizona); +#else +static inline int wm5102_patch(struct arizona *arizona) +{ + return 0; +} +#endif + int wm5110_patch(struct arizona *arizona); int wm8997_patch(struct arizona *arizona);