Skip to contentSkip to conversation

fix typo in 915_read_blc_pwm_ctl

PATCH New Florian Mickler 1 participant 1 message Jun 16, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix typo in 915_read_blc_pwm_ctl

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.)

---
 drivers/gpu/drm/i915/intel_panel.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_panel.c +2 -2
index a06ff07..459ab82 100644
@@ -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);
Signature · 1 line
1.7.5.3