Skip to contentSkip to conversation

Constify & voidify get_property()

PATCH New Jeremy Kerr 1 participant 1 message Jul 12, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 13/16 Constify & voidify get_property()

Now that get_property() returns a void *, there's no need to cast its return value. Also, treat the return value as const, so we can constify get_property later.

tpm_atmel changes

---

resend: rebase after benh's IRQ changes

 tpm_atmel.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/char/tpm/tpm_atmel.h +2 -2
Index: linux-2.6/drivers/char/tpm/tpm_atmel.h
===================================================================
@@ -37,7 +37,7 @@ static void __iomem * atmel_get_base_add
 {
 	struct device_node *dn;
 	unsigned long address, size;
-	unsigned int *reg;
+	const unsigned int *reg;
 	int reglen;
 	int naddrc;
 	int nsizec;
@@ -52,7 +52,7 @@ static void __iomem * atmel_get_base_add
 		return NULL;
 	}
 
-	reg = (unsigned int *) get_property(dn, "reg", &reglen);
+	reg = get_property(dn, "reg", &reglen);
 	naddrc = prom_n_addr_cells(dn);
 	nsizec = prom_n_size_cells(dn);