drm/i915: Remove redundant bit shifting from intel_gmbus_set_speed
authorAdam Jackson <ajax@redhat.com>
Thu, 16 Jun 2011 20:36:28 +0000 (16:36 -0400)
committerKeith Packard <keithp@keithp.com>
Thu, 20 Oct 2011 21:11:16 +0000 (14:11 -0700)
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Keith Packard <keithp@keithp.com>
drivers/gpu/drm/i915/intel_i2c.c
drivers/gpu/drm/i915/intel_sdvo.c

index d98cee60b602650063225ce9fbbf4f01220de562..9ed5380e5a53795db3bd73fa73fa5407c8dc727a 100644 (file)
@@ -422,13 +422,7 @@ void intel_gmbus_set_speed(struct i2c_adapter *adapter, int speed)
 {
        struct intel_gmbus *bus = to_intel_gmbus(adapter);
 
-       /* speed:
-        * 0x0 = 100 KHz
-        * 0x1 = 50 KHz
-        * 0x2 = 400 KHz
-        * 0x3 = 1000 Khz
-        */
-       bus->reg0 = (bus->reg0 & ~(0x3 << 8)) | (speed << 8);
+       bus->reg0 = (bus->reg0 & ~(0x3 << 8)) | speed;
 }
 
 void intel_gmbus_force_bit(struct i2c_adapter *adapter, bool force_bit)
index 643b5d72d9b7b5cc43856a44b6406a73bcc492e1..1b97d1f48fb012dd803c61e5f177adf8bcf5ecbf 100644 (file)
@@ -1908,7 +1908,7 @@ intel_sdvo_select_i2c_bus(struct drm_i915_private *dev_priv,
 
        if (pin < GMBUS_NUM_PORTS) {
                sdvo->i2c = &dev_priv->gmbus[pin].adapter;
-               intel_gmbus_set_speed(sdvo->i2c, GMBUS_RATE_1MHZ >> 8);
+               intel_gmbus_set_speed(sdvo->i2c, GMBUS_RATE_1MHZ);
                intel_gmbus_force_bit(sdvo->i2c, true);
        } else {
                sdvo->i2c = &dev_priv->gmbus[GMBUS_PORT_DPB].adapter;