drm/i915: register backlight device also when backlight class is a module
authorJani Nikula <jani.nikula@intel.com>
Wed, 18 Sep 2013 14:19:45 +0000 (17:19 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 19 Sep 2013 12:39:53 +0000 (14:39 +0200)
Ville and I were wondering why his laptop was missing the
intel_backlight sysfs interface. Turns out we never register it when
CONFIG_BACKLIGHT_CLASS_DEVICE=m. This has been broken ever since the
i915 native backlight interface was added.

CC: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_panel.c

index e36149d578fa2734bf31d505d2b543ec19fe798a..0aaeb8b6d6ed37e8dbbe5e419dc84f78a8779904 100644 (file)
@@ -658,7 +658,7 @@ intel_panel_detect(struct drm_device *dev)
        }
 }
 
-#ifdef CONFIG_BACKLIGHT_CLASS_DEVICE
+#if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
 static int intel_panel_update_status(struct backlight_device *bd)
 {
        struct drm_device *dev = bl_get_data(bd);