[MIPS] Use ARRAY_SIZE macro when appropriate
[sfrench/cifs-2.6.git] / arch / mips / jmr3927 / rbhma3100 / setup.c
index 16e5dfe7aa8a445d79a86a9d6019c29db4d26f24..7ca3d6d07b34f9c9998ed7e136c2722fcfbe9e92 100644 (file)
@@ -170,7 +170,7 @@ static void jmr3927_machine_power_off(void)
        while (1);
 }
 
-static unsigned int jmr3927_hpt_read(void)
+static cycle_t jmr3927_hpt_read(void)
 {
        /* We assume this function is called xtime_lock held. */
        return jiffies * (JMR3927_TIMER_CLK / HZ) + jmr3927_tmrptr->trr;
@@ -182,7 +182,7 @@ extern void rtc_ds1742_init(unsigned long base);
 #endif
 static void __init jmr3927_time_init(void)
 {
-       mips_hpt_read = jmr3927_hpt_read;
+       clocksource_mips.read = jmr3927_hpt_read;
        mips_hpt_frequency = JMR3927_TIMER_CLK;
 #ifdef USE_RTC_DS1742
        if (jmr3927_have_nvram()) {
@@ -434,7 +434,7 @@ void __init tx3927_setup(void)
 
        /* DMA */
        tx3927_dmaptr->mcr = 0;
-       for (i = 0; i < sizeof(tx3927_dmaptr->ch) / sizeof(tx3927_dmaptr->ch[0]); i++) {
+       for (i = 0; i < ARRAY_SIZE(tx3927_dmaptr->ch); i++) {
                /* reset channel */
                tx3927_dmaptr->ch[i].ccr = TX3927_DMA_CCR_CHRST;
                tx3927_dmaptr->ch[i].ccr = 0;