Skip to contentSkip to conversation

regmap: Rejig struct declarations for stubbed API

PATCH In review Mark Brown 2 participants 2 messages Mar 11, 2012 Register map abstraction

lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 regmap: Rejig struct declarations for stubbed API

Ensure we have a forward declaration of struct regmap that isn't just the return value of regmap_init() and make the definition of the register defaults available.

---
 include/linux/regmap.h |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
include/linux/regmap.h +3 -2
index 33d5f1d..14b8252 100644
@@ -16,11 +16,10 @@
 #include <linux/device.h>
 #include <linux/list.h>
 
-#ifdef CONFIG_REGMAP
-
 struct module;
 struct i2c_client;
 struct spi_device;
+struct regmap;
 
 /* An enum of all the supported cache types */
 enum regcache_type {
@@ -42,6 +41,8 @@ struct reg_default {
 	unsigned int def;
 };
 
+#ifdef CONFIG_REGMAP
+
 /**
  * Configuration for the register map of a device.
  *
Signature · 1 line
1.7.9.1
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Mark Brown

Ensure we have a forward declaration of struct regmap that isn't just the return value of regmap_init() and make the definition of the register defaults available.

Thanks.

Quoted 30 lines
---
 include/linux/regmap.h |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
include/linux/regmap.h +3 -2
index 33d5f1d..14b8252 100644
@@ -16,11 +16,10 @@
 #include <linux/device.h>
 #include <linux/list.h>
 
-#ifdef CONFIG_REGMAP
-
 struct module;
 struct i2c_client;
 struct spi_device;
+struct regmap;
 
 /* An enum of all the supported cache types */
 enum regcache_type {
@@ -42,6 +41,8 @@ struct reg_default {
 	unsigned int def;
 };
 
+#ifdef CONFIG_REGMAP
+
 /**
  * Configuration for the register map of a device.
  *
Signature · 1 line
~Randy