drivers/leds: Replace __get_cpu_var use through this_cpu_ptr
Would you merge this patch please?
Use this_cpu_ptr for the address calculation instead of __get_cpu_var.
Acked-by Bryan Wu <[email protected]>
Signed-off-by Christoph Lameter <[email protected]>
drivers/leds/trigger/ledtrig-cpu.c +1 -1
@@ -47,7 +47,7 @@*/ void ledtrig_cpu (enum cpu_led_event ledevt) { -struct led_trigger_cpu *trig = &__get_cpu_var (cpu_trig); +struct led_trigger_cpu *trig =this_cpu_ptr (&cpu_trig);/* Locate the correct CPU LED */ switch (ledevt) {
Quoted 3 lines · Christoph Lameter
Would you merge this patch please?
Sure, I merged it to my my tree
Thanks,
-Bryan
Quoted 18 lines
Use
this_cpu_ptrfor the address calculation instead of__get_cpu_var.Acked-by Bryan Wu <[email protected]>Signed-off-by Christoph Lameter <[email protected]>Index:
linux/drivers/leds/trigger/ledtrig-cpu.c
===================================================================drivers/leds/trigger/ledtrig-cpu.c 2014-04-14 13:24:54.825360977 -0500 renamed from drivers/leds/trigger/ledtrig-cpu.c 2014-04-14 13:24:54.833360823 -0500 +1
-1@@ -47,7 +47,7 @@ */ void ledtrig_cpu(enum cpu_led_event ledevt) { - struct led_trigger_cpu *trig = &__get_cpu_var(cpu_trig); + struct led_trigger_cpu *trig = this_cpu_ptr(&cpu_trig); /* Locate the correct CPU LED */ switch (ledevt) {