aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/time.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/time.c')
-rw-r--r--arch/powerpc/kernel/time.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index a124499e65d9..7a3c3f791ade 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -860,19 +860,17 @@ EXPORT_SYMBOL(do_settimeofday);
860static int __init get_freq(char *name, int cells, unsigned long *val) 860static int __init get_freq(char *name, int cells, unsigned long *val)
861{ 861{
862 struct device_node *cpu; 862 struct device_node *cpu;
863 unsigned int *fp; 863 const unsigned int *fp;
864 int found = 0; 864 int found = 0;
865 865
866 /* The cpu node should have timebase and clock frequency properties */ 866 /* The cpu node should have timebase and clock frequency properties */
867 cpu = of_find_node_by_type(NULL, "cpu"); 867 cpu = of_find_node_by_type(NULL, "cpu");
868 868
869 if (cpu) { 869 if (cpu) {
870 fp = (unsigned int *)get_property(cpu, name, NULL); 870 fp = get_property(cpu, name, NULL);
871 if (fp) { 871 if (fp) {
872 found = 1; 872 found = 1;
873 *val = 0; 873 *val = of_read_ulong(fp, cells);
874 while (cells--)
875 *val = (*val << 32) | *fp++;
876 } 874 }
877 875
878 of_node_put(cpu); 876 of_node_put(cpu);