diff mbox

fix typo in 915_read_blc_pwm_ctl

Message ID 1308233537-26489-1-git-send-email-florian@mickler.org
State New, archived
Headers show

Commit Message

Florian Mickler June 16, 2011, 2:12 p.m. UTC
The taken action if saveBLC_PWM_CTL2 != 0 is surprising looking only at this
single function.
Out of the general habit of having a 1:1 mapping between registers and save*
variables, I suspect this is a typo. So here is a fix.
(Don't know if this is a user-visible bug though.)

Signed-off-by: Florian Mickler <florian@mickler.org>
---
 drivers/gpu/drm/i915/intel_panel.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c
index a06ff07..459ab82 100644
--- a/drivers/gpu/drm/i915/intel_panel.c
+++ b/drivers/gpu/drm/i915/intel_panel.c
@@ -137,8 +137,8 @@  static u32 i915_read_blc_pwm_ctl(struct drm_i915_private *dev_priv)
 			dev_priv->saveBLC_PWM_CTL2 = val;
 		} else if (val == 0) {
 			I915_WRITE(BLC_PWM_PCH_CTL2,
-				   dev_priv->saveBLC_PWM_CTL);
-			val = dev_priv->saveBLC_PWM_CTL;
+				   dev_priv->saveBLC_PWM_CTL2);
+			val = dev_priv->saveBLC_PWM_CTL2;
 		}
 	} else {
 		val = I915_READ(BLC_PWM_CTL);