Commit e14d7749 authored by Grant Erickson's avatar Grant Erickson Committed by Paul Mackerras

powerpc: Const-qualify Device Node Argument to DCR Resource Extent API

Add const qualifier to device_node argument for
dcr_resource_{start,len} as of_get_property also const-qualifies this
argument.
Signed-off-by: default avatarGrant Erickson <gerickson@nuovations.com>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 9dce3ce5
...@@ -68,9 +68,9 @@ typedef dcr_host_mmio_t dcr_host_t; ...@@ -68,9 +68,9 @@ typedef dcr_host_mmio_t dcr_host_t;
* additional helpers to read the DCR * base from the device-tree * additional helpers to read the DCR * base from the device-tree
*/ */
struct device_node; struct device_node;
extern unsigned int dcr_resource_start(struct device_node *np, extern unsigned int dcr_resource_start(const struct device_node *np,
unsigned int index); unsigned int index);
extern unsigned int dcr_resource_len(struct device_node *np, extern unsigned int dcr_resource_len(const struct device_node *np,
unsigned int index); unsigned int index);
#endif /* CONFIG_PPC_DCR */ #endif /* CONFIG_PPC_DCR */
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
......
...@@ -124,7 +124,8 @@ EXPORT_SYMBOL_GPL(dcr_write_generic); ...@@ -124,7 +124,8 @@ EXPORT_SYMBOL_GPL(dcr_write_generic);
#endif /* defined(CONFIG_PPC_DCR_NATIVE) && defined(CONFIG_PPC_DCR_MMIO) */ #endif /* defined(CONFIG_PPC_DCR_NATIVE) && defined(CONFIG_PPC_DCR_MMIO) */
unsigned int dcr_resource_start(struct device_node *np, unsigned int index) unsigned int dcr_resource_start(const struct device_node *np,
unsigned int index)
{ {
unsigned int ds; unsigned int ds;
const u32 *dr = of_get_property(np, "dcr-reg", &ds); const u32 *dr = of_get_property(np, "dcr-reg", &ds);
...@@ -136,7 +137,7 @@ unsigned int dcr_resource_start(struct device_node *np, unsigned int index) ...@@ -136,7 +137,7 @@ unsigned int dcr_resource_start(struct device_node *np, unsigned int index)
} }
EXPORT_SYMBOL_GPL(dcr_resource_start); EXPORT_SYMBOL_GPL(dcr_resource_start);
unsigned int dcr_resource_len(struct device_node *np, unsigned int index) unsigned int dcr_resource_len(const struct device_node *np, unsigned int index)
{ {
unsigned int ds; unsigned int ds;
const u32 *dr = of_get_property(np, "dcr-reg", &ds); const u32 *dr = of_get_property(np, "dcr-reg", &ds);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment