diff options
author | Sakari Ailus <sakari.ailus@linux.intel.com> | 2022-03-31 15:54:49 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2022-04-05 15:30:47 +0200 |
commit | 68b979d068d3d0dceb14c446f664433d96f20a7e (patch) | |
tree | e4d79df7a341cd7e2bae877b3c70084d40979d25 /drivers/base/property.c | |
parent | 55dcbc05827ebcefe888a2829e0a59343ce6ae0a (diff) |
device property: Add iomap to fwnode operations
Add iomap() fwnode operation to implement fwnode_iomap() through fwnode
operations, moving the code in fwnode_iomap() to OF framework.
Note that the IS_ENABLED(CONFIG_OF_ADDRESS) && is_of_node(fwnode) check is
needed for Sparc that has its own implementation of of_iomap anyway. Let
the pre-compiler to handle that check.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/base/property.c')
-rw-r--r-- | drivers/base/property.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/base/property.c b/drivers/base/property.c index 09686e2e903e..83dd22e7cb81 100644 --- a/drivers/base/property.c +++ b/drivers/base/property.c @@ -887,10 +887,7 @@ EXPORT_SYMBOL_GPL(device_get_phy_mode); */ void __iomem *fwnode_iomap(struct fwnode_handle *fwnode, int index) { - if (IS_ENABLED(CONFIG_OF_ADDRESS) && is_of_node(fwnode)) - return of_iomap(to_of_node(fwnode), index); - - return NULL; + return fwnode_call_ptr_op(fwnode, iomap, index); } EXPORT_SYMBOL(fwnode_iomap); |