regmap: Rejig struct declarations for stubbed API
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.
Reported-by Randy Dunlap <[email protected]>
Signed-off-by Mark Brown <[email protected]>
--- include/linux/regmap.h | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
include/linux/regmap.h +3 -2
@@ -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
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.Reported-by Randy Dunlap <[email protected]>Signed-off-by Mark Brown <[email protected]>
Acked-by Randy Dunlap <[email protected]>
Thanks.
Quoted 30 lines
--- include/linux/regmap.h | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)include/linux/regmap.h +3
-2@@ -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