summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuis R. Rodriguez <mcgrof@do-not-panic.com>2013-04-10 04:35:18 -0700
committerJohannes Berg <johannes.berg@intel.com>2013-04-10 15:48:57 +0200
commit959a7c01cfc5c7c4d914d3a452fc4169b51fd733 (patch)
tree3a6aa42df20672107bfcfe0278d7212ff5aa331d
parent01cf5be5adde73c9370f8eaa8df313722a753ef0 (diff)
compat: backport dev_get_regmap()
We can't backport dev_get_regmap() unless we backport regmap fully onto compat, but users typically try to get the regmap in other ways first: if (config->regmap) rdev->regmap = config->regmap; else if (dev_get_regmap(dev, NULL)) rdev->regmap = dev_get_regmap(dev, NULL); else if (dev->parent) rdev->regmap = dev_get_regmap(dev->parent, NULL); So this would option would just not be available for. mcgrof@frijol ~/linux-stable (git::master)$ git describe --contains 72b39f6f v3.5-rc1~117^2~7^3 commit 72b39f6f2b5a6b0beff14b80bed9756f151218a9 Author: Mark Brown <broonie@opensource.wolfsonmicro.com> Date: Tue May 8 17:44:40 2012 +0100 regmap: Implement dev_get_regmap() Use devres to implement dev_get_regmap(). This should mean that in almost all cases devices wishing to take advantage of framework features based on regmap shouldn't need to explicitly pass the regmap into the framework. This simplifies device setup a bit. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--backport/include/linux/compat-3.5.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/backport/include/linux/compat-3.5.h b/backport/include/linux/compat-3.5.h
index 1515a5b6..e21048dd 100644
--- a/backport/include/linux/compat-3.5.h
+++ b/backport/include/linux/compat-3.5.h
@@ -11,6 +11,15 @@
#include <net/netlink.h>
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
+#include <linux/regmap.h>
+
+#define dev_get_regmap LINUX_BACKPORT(dev_get_regmap)
+static inline
+struct regmap *dev_get_regmap(struct device *dev, const char *name)
+{
+ return NULL;
+}
+
#define devres_release LINUX_BACKPORT(devres_release)
extern int devres_release(struct device *dev, dr_release_t release,
dr_match_t match, void *match_data);