Skip to contentSkip to conversation

regmap: Remove warning on stubbed dev_get_regmap()

PATCH In review Mark Brown 3 participants 3 messages Jun 13, 2012 Register map abstraction

lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 regmap: Remove warning on stubbed dev_get_regmap()

It's perfectly sensible to ask if there's a regmap for a device which doesn't have one so the stubbed version shouldn't complain, the caller should be prepared for this.

---
 include/linux/regmap.h |    1 -
 1 file changed, 1 deletion(-)
include/linux/regmap.h +0 -1
index 4c9e642..c3508d0 100644
@@ -388,7 +388,6 @@ static inline int regmap_register_patch(struct regmap *map,
 static inline struct regmap *dev_get_regmap(struct device *dev,
 					    const char *name)
 {
-	WARN_ONCE(1, "regmap API is disabled");
 	return NULL;
 }
 
Signature · 1 line
1.7.10
Tested-by on v1 1/1
#1 lore raw
Quoted 14 lines · Mark Brown

It's perfectly sensible to ask if there's a regmap for a device which doesn't have one so the stubbed version shouldn't complain, the caller should be prepared for this.

---
  include/linux/regmap.h |    1 -
  1 file changed, 1 deletion(-)
include/linux/regmap.h +0 -0
index 4c9e642..c3508d0 100644

include/linux/regmap.h static inline int regmap_register_patch(struct regmap *map, · line 392

Quoted 6 lines
include/linux/regmap.h +0 -1
@@ -388,7 +388,6 @@ static inline int regmap_register_patch(struct regmap *map,
  static inline struct regmap *dev_get_regmap(struct device *dev,
  					    const char *name)
  {
-	WARN_ONCE(1, "regmap API is disabled");
  	return NULL;
  }

Thanks Mark.

Signature · 5 lines
Lee Jones
Linaro ST-Ericsson Landing Team Lead
M: +44 77 88 633 515
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog