mfd: arizona: Add stub for wm5102_patch()
Subsystems (2)
PATCH v2 1/2 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
--- include/linux/mfd/arizona/core.h | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
include/linux/mfd/arizona/core.h +8 -0
@@ -153,7 +153,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);
Signature · 1 line
1.7.2.5
PATCH v2 2/2 mfd: arizona: Fix incorrect Makefile conditionals
The use of ifneq against 'n' to conditionally compile codec-specific parts is wrong and was resulting in all the codec tables being built even for deselected codecs.
--- drivers/mfd/Makefile | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/mfd/Makefile +3 -3
@@ -41,13 +41,13 @@ obj-$(CONFIG_MFD_ARIZONA) += arizona-core.o obj-$(CONFIG_MFD_ARIZONA) += arizona-irq.o obj-$(CONFIG_MFD_ARIZONA_I2C) += arizona-i2c.o obj-$(CONFIG_MFD_ARIZONA_SPI) += arizona-spi.o -ifneq ($(CONFIG_MFD_WM5102),n) +ifeq ($(CONFIG_MFD_WM5102),y) obj-$(CONFIG_MFD_ARIZONA) += wm5102-tables.o endif -ifneq ($(CONFIG_MFD_WM5110),n) +ifeq ($(CONFIG_MFD_WM5110),y) obj-$(CONFIG_MFD_ARIZONA) += wm5110-tables.o endif -ifneq ($(CONFIG_MFD_WM8997),n) +ifeq ($(CONFIG_MFD_WM8997),y) obj-$(CONFIG_MFD_ARIZONA) += wm8997-tables.o endif obj-$(CONFIG_MFD_WM8400) += wm8400-core.o
Signature · 1 line
1.7.2.5
Lee Jones
AppliedRe: [PATCH v2 2/2] mfd: arizona: Fix incorrect Makefile conditionals
Quoted 9 lines · Richard Fitzgerald
The use of ifneq against 'n' to conditionally compile codec-specific parts is wrong and was resulting in all the codec tables being built even for deselected codecs.
Signed-off-by Richard Fitzgerald <[email protected]>Acked-by Lee Jones <[email protected]>--- drivers/mfd/Makefile | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
Applied, thanks.
Quoted 21 lines
drivers/mfd/Makefile +3
-3@@ -41,13 +41,13 @@ obj-$(CONFIG_MFD_ARIZONA) += arizona-core.o obj-$(CONFIG_MFD_ARIZONA) += arizona-irq.o obj-$(CONFIG_MFD_ARIZONA_I2C) += arizona-i2c.o obj-$(CONFIG_MFD_ARIZONA_SPI) += arizona-spi.o -ifneq ($(CONFIG_MFD_WM5102),n) +ifeq ($(CONFIG_MFD_WM5102),y) obj-$(CONFIG_MFD_ARIZONA) += wm5102-tables.o endif -ifneq ($(CONFIG_MFD_WM5110),n) +ifeq ($(CONFIG_MFD_WM5110),y) obj-$(CONFIG_MFD_ARIZONA) += wm5110-tables.o endif -ifneq ($(CONFIG_MFD_WM8997),n) +ifeq ($(CONFIG_MFD_WM8997),y) obj-$(CONFIG_MFD_ARIZONA) += wm8997-tables.o endif obj-$(CONFIG_MFD_WM8400) += wm8400-core.o
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Lee Jones
AppliedQuoted 10 lines · Richard Fitzgerald
For the WM5102 there is a dependency in the core code on
wm5102_patch()which only exists whenCONFIG_MFD_WM5102is defined. To avoid having to sprinkle #ifdefs around the code it is given an alternative empty stub version whenCONFIG_MFD_WM5102is deselectedSigned-off-by Richard Fitzgerald <[email protected]>Acked-by Lee Jones <[email protected]>--- include/linux/mfd/arizona/core.h | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
Applied, thanks.
Quoted 20 lines
include/linux/mfd/arizona/core.h +8
-0@@ -153,7 +153,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);
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog