From 959a7c01cfc5c7c4d914d3a452fc4169b51fd733 Mon Sep 17 00:00:00 2001 From: "Luis R. Rodriguez" Date: Wed, 10 Apr 2013 04:35:18 -0700 Subject: [PATCH] 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 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 Signed-off-by: Luis R. Rodriguez Signed-off-by: Johannes Berg --- backport/include/linux/compat-3.5.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/backport/include/linux/compat-3.5.h b/backport/include/linux/compat-3.5.h index 1515a5b6028c..e21048dd3fd1 100644 --- a/backport/include/linux/compat-3.5.h +++ b/backport/include/linux/compat-3.5.h @@ -11,6 +11,15 @@ #include #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)) +#include + +#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); -- 2.30.2