Skip to content

Commit b2638e5

Browse files
andy-shevrafaeljw
authored andcommitted
device property: Don't split fwnode_get_irq*() APIs in the code
New fwnode_get_irq_byname() landed after an unrelated function by ordering. Move fwnode_iomap(), so fwnode_get_irq*() APIs will go together. No functional change intended. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent a473810 commit b2638e5

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

drivers/base/property.c

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -895,6 +895,22 @@ int device_get_phy_mode(struct device *dev)
895895
}
896896
EXPORT_SYMBOL_GPL(device_get_phy_mode);
897897

898+
/**
899+
* fwnode_iomap - Maps the memory mapped IO for a given fwnode
900+
* @fwnode: Pointer to the firmware node
901+
* @index: Index of the IO range
902+
*
903+
* Returns a pointer to the mapped memory.
904+
*/
905+
void __iomem *fwnode_iomap(struct fwnode_handle *fwnode, int index)
906+
{
907+
if (IS_ENABLED(CONFIG_OF_ADDRESS) && is_of_node(fwnode))
908+
return of_iomap(to_of_node(fwnode), index);
909+
910+
return NULL;
911+
}
912+
EXPORT_SYMBOL(fwnode_iomap);
913+
898914
/**
899915
* fwnode_irq_get - Get IRQ directly from a fwnode
900916
* @fwnode: Pointer to the firmware node
@@ -919,22 +935,6 @@ int fwnode_irq_get(const struct fwnode_handle *fwnode, unsigned int index)
919935
}
920936
EXPORT_SYMBOL(fwnode_irq_get);
921937

922-
/**
923-
* fwnode_iomap - Maps the memory mapped IO for a given fwnode
924-
* @fwnode: Pointer to the firmware node
925-
* @index: Index of the IO range
926-
*
927-
* Returns a pointer to the mapped memory.
928-
*/
929-
void __iomem *fwnode_iomap(struct fwnode_handle *fwnode, int index)
930-
{
931-
if (IS_ENABLED(CONFIG_OF_ADDRESS) && is_of_node(fwnode))
932-
return of_iomap(to_of_node(fwnode), index);
933-
934-
return NULL;
935-
}
936-
EXPORT_SYMBOL(fwnode_iomap);
937-
938938
/**
939939
* fwnode_irq_get_byname - Get IRQ from a fwnode using its name
940940
* @fwnode: Pointer to the firmware node

include/linux/property.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,6 @@ void fwnode_handle_put(struct fwnode_handle *fwnode);
123123
int fwnode_irq_get(const struct fwnode_handle *fwnode, unsigned int index);
124124
int fwnode_irq_get_byname(const struct fwnode_handle *fwnode, const char *name);
125125

126-
void __iomem *fwnode_iomap(struct fwnode_handle *fwnode, int index);
127-
128126
unsigned int device_get_child_node_count(struct device *dev);
129127

130128
static inline bool device_property_read_bool(struct device *dev,
@@ -388,8 +386,10 @@ enum dev_dma_attr device_get_dma_attr(struct device *dev);
388386
const void *device_get_match_data(struct device *dev);
389387

390388
int device_get_phy_mode(struct device *dev);
391-
392389
int fwnode_get_phy_mode(struct fwnode_handle *fwnode);
390+
391+
void __iomem *fwnode_iomap(struct fwnode_handle *fwnode, int index);
392+
393393
struct fwnode_handle *fwnode_graph_get_next_endpoint(
394394
const struct fwnode_handle *fwnode, struct fwnode_handle *prev);
395395
struct fwnode_handle *

0 commit comments

Comments
 (0)