diff mbox

drm/i915: register backlight device also when backlight class is a module

Message ID 1379513985-30544-1-git-send-email-jani.nikula@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jani Nikula Sept. 18, 2013, 2:19 p.m. UTC
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: stable@vger.kernel.org
CC: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/intel_panel.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Lespiau, Damien Sept. 19, 2013, 12:38 p.m. UTC | #1
On Wed, Sep 18, 2013 at 05:19:45PM +0300, Jani Nikula wrote:
> 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: stable@vger.kernel.org
> CC: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

FWIW, a quick git grep -e "#if.*def.*CONFIG" drivers/gpu/drm/i915/ did
not return anything else of this kind.

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Daniel Vetter Sept. 19, 2013, 12:40 p.m. UTC | #2
On Thu, Sep 19, 2013 at 01:38:11PM +0100, Damien Lespiau wrote:
> On Wed, Sep 18, 2013 at 05:19:45PM +0300, Jani Nikula wrote:
> > 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: stable@vger.kernel.org

I've dropped the cc: stable - since distor don't yell at us I don't think
it harms anyone ;-)

> > CC: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> 
> FWIW, a quick git grep -e "#if.*def.*CONFIG" drivers/gpu/drm/i915/ did
> not return anything else of this kind.
> 
> Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>

Queued for -next, thanks for the patch.
-Daniel
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c
index fdf9cb5..3bc89a6 100644
--- a/drivers/gpu/drm/i915/intel_panel.c
+++ b/drivers/gpu/drm/i915/intel_panel.c
@@ -659,7 +659,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);