cpumask: convert kernel time functions
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / kernel / time / tick-common.c
index f8372be74122aa3f10b3dfc6642ffde2dc297920..63e05d423a09903907558d7d2aba661f5b426db6 100644 (file)
@@ -254,7 +254,7 @@ static int tick_check_new_device(struct clock_event_device *newdev)
                curdev = NULL;
        }
        clockevents_exchange_device(curdev, newdev);
-       tick_setup_device(td, newdev, cpu, &cpumask_of_cpu(cpu));
+       tick_setup_device(td, newdev, cpu, cpumask_of(cpu));
        if (newdev->features & CLOCK_EVT_FEAT_ONESHOT)
                tick_oneshot_notify();
 
@@ -299,9 +299,9 @@ static void tick_shutdown(unsigned int *cpup)
        }
        /* Transfer the do_timer job away from this cpu */
        if (*cpup == tick_do_timer_cpu) {
-               int cpu = first_cpu(cpu_online_map);
+               int cpu = cpumask_first(cpu_online_mask);
 
-               tick_do_timer_cpu = (cpu != NR_CPUS) ? cpu :
+               tick_do_timer_cpu = (cpu < nr_cpu_ids) ? cpu :
                        TICK_DO_TIMER_NONE;
        }
        spin_unlock_irqrestore(&tick_device_lock, flags);