]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
powerpc: Const-qualify Device Node Argument to DCR Resource Extent API
authorGrant Erickson <gerickson@nuovations.com>
Fri, 19 Dec 2008 08:17:54 +0000 (08:17 +0000)
committerPaul Mackerras <paulus@samba.org>
Sun, 21 Dec 2008 03:21:16 +0000 (14:21 +1100)
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>
arch/powerpc/include/asm/dcr.h
arch/powerpc/sysdev/dcr.c

index d13fb68bb5c0e3daf5a965635b548f18bc00a648..9d6851cfb84149ee0d042acb7b17408c77ab080a 100644 (file)
@@ -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__ */
index a8ba9983dd5a8ab0ccc8e04bd82816796e02282b..bb44aa9fd47028cabab4b57a472867e0f77f9136 100644 (file)
@@ -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);
@@ -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);