Skip to content

Commit

Permalink
powerpc: Const-qualify Device Node Argument to DCR Resource Extent API
Browse files Browse the repository at this point in the history
Add const qualifier to device_node argument for
dcr_resource_{start,len} as of_get_property also const-qualifies this
argument.

Signed-off-by: Grant Erickson <gerickson@nuovations.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Grant Erickson authored and Paul Mackerras committed Dec 21, 2008
1 parent 9dce3ce commit e14d774
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions arch/powerpc/include/asm/dcr.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ typedef dcr_host_mmio_t dcr_host_t;
* additional helpers to read the DCR * base from the device-tree
*/
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);
extern unsigned int dcr_resource_len(struct device_node *np,
extern unsigned int dcr_resource_len(const struct device_node *np,
unsigned int index);
#endif /* CONFIG_PPC_DCR */
#endif /* __ASSEMBLY__ */
Expand Down
5 changes: 3 additions & 2 deletions arch/powerpc/sysdev/dcr.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ EXPORT_SYMBOL_GPL(dcr_write_generic);

#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;
const u32 *dr = of_get_property(np, "dcr-reg", &ds);
Expand All @@ -136,7 +137,7 @@ unsigned int dcr_resource_start(struct device_node *np, unsigned int index)
}
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;
const u32 *dr = of_get_property(np, "dcr-reg", &ds);
Expand Down

0 comments on commit e14d774

Please sign in to comment.