diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-03-29 20:30:12 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-03-29 20:30:12 +0200 |
commit | 13776ebb9964b2ea66ffb8c824c0762eed6da784 (patch) | |
tree | 69ea0774f51da790f26b096a8be1ac93be4c51e9 /drivers/base | |
parent | Merge tag 'pm-5.18-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ra... (diff) | |
parent | device property: Don't split fwnode_get_irq*() APIs in the code (diff) | |
download | linux-13776ebb9964b2ea66ffb8c824c0762eed6da784.tar.xz linux-13776ebb9964b2ea66ffb8c824c0762eed6da784.zip |
Merge tag 'devprop-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull device properties code update from Rafael Wysocki:
"This is based on new i2c material for 5.18-rc1 and simply reorganizes
the code on top of it so as to group similar functions together (Andy
Shevchenko)"
* tag 'devprop-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
device property: Don't split fwnode_get_irq*() APIs in the code
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/property.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/base/property.c b/drivers/base/property.c index fc59e0f7f9cc..c0e94cce9c29 100644 --- a/drivers/base/property.c +++ b/drivers/base/property.c @@ -896,6 +896,22 @@ int device_get_phy_mode(struct device *dev) EXPORT_SYMBOL_GPL(device_get_phy_mode); /** + * fwnode_iomap - Maps the memory mapped IO for a given fwnode + * @fwnode: Pointer to the firmware node + * @index: Index of the IO range + * + * Returns a pointer to the mapped memory. + */ +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; +} +EXPORT_SYMBOL(fwnode_iomap); + +/** * fwnode_irq_get - Get IRQ directly from a fwnode * @fwnode: Pointer to the firmware node * @index: Zero-based index of the IRQ @@ -920,22 +936,6 @@ int fwnode_irq_get(const struct fwnode_handle *fwnode, unsigned int index) EXPORT_SYMBOL(fwnode_irq_get); /** - * fwnode_iomap - Maps the memory mapped IO for a given fwnode - * @fwnode: Pointer to the firmware node - * @index: Index of the IO range - * - * Returns a pointer to the mapped memory. - */ -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; -} -EXPORT_SYMBOL(fwnode_iomap); - -/** * fwnode_irq_get_byname - Get IRQ from a fwnode using its name * @fwnode: Pointer to the firmware node * @name: IRQ name |