regmap: Fix regmap compilation with CONFIG_DEBUGFS=n
Subsystems (2)
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
@@ -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
Quoted 7 lines · Lars-Peter Clausen
With
CONFIG_DEBUGFSdisabled 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 ofregmap_debugfs_initcall' drivers/base/regmap/regmap.o:drivers/base/regmap/internal.h:96: first defined here drivers/base/regmap/regcache.o: In functionregmap_debugfs_init':
I sense that this doesn't actually happen in mainline...
Quoted 10 lines · Mark Brown
Quoted 7 lines · Lars-Peter Clausen
With
CONFIG_DEBUGFSdisabled 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 ofregmap_debugfs_initcall' drivers/base/regmap/regmap.o:drivers/base/regmap/internal.h:96: first defined here drivers/base/regmap/regcache.o: In functionregmap_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?
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).