diff options
Diffstat (limited to 'arch/powerpc/platforms/powermac/time.c')
-rw-r--r-- | arch/powerpc/platforms/powermac/time.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/powermac/time.c b/arch/powerpc/platforms/powermac/time.c index 5947b21a8588..4c7682a65227 100644 --- a/arch/powerpc/platforms/powermac/time.c +++ b/arch/powerpc/platforms/powermac/time.c | |||
@@ -102,7 +102,7 @@ static unsigned long from_rtc_time(struct rtc_time *tm) | |||
102 | static unsigned long cuda_get_time(void) | 102 | static unsigned long cuda_get_time(void) |
103 | { | 103 | { |
104 | struct adb_request req; | 104 | struct adb_request req; |
105 | unsigned long now; | 105 | unsigned int now; |
106 | 106 | ||
107 | if (cuda_request(&req, NULL, 2, CUDA_PACKET, CUDA_GET_TIME) < 0) | 107 | if (cuda_request(&req, NULL, 2, CUDA_PACKET, CUDA_GET_TIME) < 0) |
108 | return 0; | 108 | return 0; |
@@ -113,7 +113,7 @@ static unsigned long cuda_get_time(void) | |||
113 | req.reply_len); | 113 | req.reply_len); |
114 | now = (req.reply[3] << 24) + (req.reply[4] << 16) | 114 | now = (req.reply[3] << 24) + (req.reply[4] << 16) |
115 | + (req.reply[5] << 8) + req.reply[6]; | 115 | + (req.reply[5] << 8) + req.reply[6]; |
116 | return now - RTC_OFFSET; | 116 | return ((unsigned long)now) - RTC_OFFSET; |
117 | } | 117 | } |
118 | 118 | ||
119 | #define cuda_get_rtc_time(tm) to_rtc_time(cuda_get_time(), (tm)) | 119 | #define cuda_get_rtc_time(tm) to_rtc_time(cuda_get_time(), (tm)) |
@@ -146,7 +146,7 @@ static int cuda_set_rtc_time(struct rtc_time *tm) | |||
146 | static unsigned long pmu_get_time(void) | 146 | static unsigned long pmu_get_time(void) |
147 | { | 147 | { |
148 | struct adb_request req; | 148 | struct adb_request req; |
149 | unsigned long now; | 149 | unsigned int now; |
150 | 150 | ||
151 | if (pmu_request(&req, NULL, 1, PMU_READ_RTC) < 0) | 151 | if (pmu_request(&req, NULL, 1, PMU_READ_RTC) < 0) |
152 | return 0; | 152 | return 0; |
@@ -156,7 +156,7 @@ static unsigned long pmu_get_time(void) | |||
156 | req.reply_len); | 156 | req.reply_len); |
157 | now = (req.reply[0] << 24) + (req.reply[1] << 16) | 157 | now = (req.reply[0] << 24) + (req.reply[1] << 16) |
158 | + (req.reply[2] << 8) + req.reply[3]; | 158 | + (req.reply[2] << 8) + req.reply[3]; |
159 | return now - RTC_OFFSET; | 159 | return ((unsigned long)now) - RTC_OFFSET; |
160 | } | 160 | } |
161 | 161 | ||
162 | #define pmu_get_rtc_time(tm) to_rtc_time(pmu_get_time(), (tm)) | 162 | #define pmu_get_rtc_time(tm) to_rtc_time(pmu_get_time(), (tm)) |