Skip to contentSkip to conversation

regmap: Fix regmap compilation with CONFIG_DEBUGFS=n

PATCH In review Lars-Peter Clausen 2 participants 4 messages Sep 5, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 regmap: Fix regmap compilation with CONFIG_DEBUGFS=n

With CONFIG_DEBUGFS disabled the regmap compilation fails with the following errors:

drivers/base/regmap/regcache.o: In function `regmap_debugfs_initcall':
drivers/base/regmap/internal.h:96: multiple definition of regmap_debugfs_initcall' drivers/base/regmap/regmap.o:drivers/base/regmap/internal.h:96: first defined here drivers/base/regmap/regcache.o: In function regmap_debugfs_init':
drivers/base/regmap/internal.h:97: multiple definition of regmap_debugfs_init' drivers/base/regmap/regmap.o:drivers/base/regmap/internal.h:97: first defined here drivers/base/regmap/regcache.o: In function regmap_debugfs_exit':
...

Make the debugfs stubs static inline to fix this.

---
 drivers/base/regmap/internal.h |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/base/regmap/internal.h +3 -3
index 5ab3fef..b4acd94 100644
@@ -58,9 +58,9 @@ extern void regmap_debugfs_initcall(void);
 extern void regmap_debugfs_init(struct regmap *map);
 extern void regmap_debugfs_exit(struct regmap *map);
 #else
-void regmap_debugfs_initcall(void) { }
-void regmap_debugfs_init(struct regmap *map) { }
-void regmap_debugfs_exit(struct regmap *map) { }
+static inline void regmap_debugfs_initcall(void) { }
+static inline void regmap_debugfs_init(struct regmap *map) { }
+static inline void regmap_debugfs_exit(struct regmap *map) { }
 #endif
 
 #endif
Signature · 1 line
1.7.2.5
#1 lore raw
Quoted 7 lines · Lars-Peter Clausen

With CONFIG_DEBUGFS disabled the regmap compilation fails with the following errors:

drivers/base/regmap/regcache.o: In function `regmap_debugfs_initcall':
drivers/base/regmap/internal.h:96: multiple definition of regmap_debugfs_initcall' drivers/base/regmap/regmap.o:drivers/base/regmap/internal.h:96: first defined here drivers/base/regmap/regcache.o: In function regmap_debugfs_init':

I sense that this doesn't actually happen in mainline...

#2 lore raw
Quoted 10 lines · Mark Brown
Quoted 7 lines · Lars-Peter Clausen

With CONFIG_DEBUGFS disabled the regmap compilation fails with the following errors:

drivers/base/regmap/regcache.o: In function `regmap_debugfs_initcall':
drivers/base/regmap/internal.h:96: multiple definition of regmap_debugfs_initcall' drivers/base/regmap/regmap.o:drivers/base/regmap/internal.h:96: first defined here drivers/base/regmap/regcache.o: In function regmap_debugfs_init':

I sense that this doesn't actually happen in mainline...

Uhm, yes... the patch is still valid though, want me to resubmit it with a different patch description?

#3 lore raw
Quoted 6 lines · Lars-Peter Clausen
Quoted 1 line · Mark Brown

I sense that this doesn't actually happen in mainline...

Uhm, yes... the patch is still valid though, want me to resubmit it with a different patch description?

Yes please, no problem with the patch itself but the description was obviously bogus (it's fixing a future problem, not a current one).