[PATCH 4.14 12/77] parisc: Skip registering LED when running in QEMU

From: Greg Kroah-Hartman
Date: Thu May 23 2019 - 15:13:42 EST


From: Helge Deller <deller@xxxxxx>

commit b438749044356dd1329c45e9b5a9377b6ea13eb2 upstream.

No need to spend CPU cycles when we run on QEMU.

Signed-off-by: Helge Deller <deller@xxxxxx>
CC: stable@xxxxxxxxxxxxxxx # v4.9+
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
drivers/parisc/led.c | 3 +++
1 file changed, 3 insertions(+)

--- a/drivers/parisc/led.c
+++ b/drivers/parisc/led.c
@@ -568,6 +568,9 @@ int __init register_led_driver(int model
break;

case DISPLAY_MODEL_LASI:
+ /* Skip to register LED in QEMU */
+ if (running_on_qemu)
+ return 1;
LED_DATA_REG = data_reg;
led_func_ptr = led_LASI_driver;
printk(KERN_INFO "LED display at %lx registered\n", LED_DATA_REG);