.mask = (_mask),                                        \
        }
 
+static bool lirc_is_present(void)
+{
+#if defined(CONFIG_LIRC_MODULE)
+       struct module *lirc;
+
+       mutex_lock(&module_mutex);
+       lirc = find_module("lirc_dev");
+       mutex_unlock(&module_mutex);
+
+       return lirc ? true : false;
+#elif defined(CONFIG_LIRC)
+       return true;
+#else
+       return false;
+#endif
+}
+
 /**
  * show_protocols() - shows the current/wakeup IR protocol(s)
  * @device:    the device descriptor
                        allowed &= ~proto_names[i].type;
        }
 
-       if (dev->driver_type == RC_DRIVER_IR_RAW)
+       if (dev->driver_type == RC_DRIVER_IR_RAW && lirc_is_present())
                tmp += sprintf(tmp, "[lirc] ");
 
        if (tmp != buf)