diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-09-14 11:46:59 -0400 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-09-14 16:08:36 -0400 |
commit | 890f3359f7b84d7015104360d647ccac5f515542 (patch) | |
tree | 88c65ad9638fd84d3921fbe9a9fbecb42816c1ec /drivers/gpu/drm/i915/intel_dvo.c | |
parent | 2cf34d7b7ee99c27c1a6bdd2f91344cbfa5fef5c (diff) |
drm/i915/i2c: Track the parent encoder rather than just the dev
The SDVO proxy i2c adapter wants to be able to use information stored in
the encoder, so pass that through intel_i2c rather than iterate over all
known encoders every time.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_dvo.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_dvo.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/intel_dvo.c b/drivers/gpu/drm/i915/intel_dvo.c index df42a9c9afc1..7de7d1a68c07 100644 --- a/drivers/gpu/drm/i915/intel_dvo.c +++ b/drivers/gpu/drm/i915/intel_dvo.c | |||
@@ -362,7 +362,8 @@ void intel_dvo_init(struct drm_device *dev) | |||
362 | intel_encoder = &intel_dvo->base; | 362 | intel_encoder = &intel_dvo->base; |
363 | 363 | ||
364 | /* Set up the DDC bus */ | 364 | /* Set up the DDC bus */ |
365 | intel_encoder->ddc_bus = intel_i2c_create(dev, GPIOD, "DVODDC_D"); | 365 | intel_encoder->ddc_bus = intel_i2c_create(intel_encoder, |
366 | GPIOD, "DVODDC_D"); | ||
366 | if (!intel_encoder->ddc_bus) | 367 | if (!intel_encoder->ddc_bus) |
367 | goto free_intel; | 368 | goto free_intel; |
368 | 369 | ||
@@ -389,10 +390,10 @@ void intel_dvo_init(struct drm_device *dev) | |||
389 | */ | 390 | */ |
390 | if (i2cbus != NULL) | 391 | if (i2cbus != NULL) |
391 | intel_i2c_destroy(i2cbus); | 392 | intel_i2c_destroy(i2cbus); |
392 | if (!(i2cbus = intel_i2c_create(dev, gpio, | 393 | i2cbus = intel_i2c_create(intel_encoder, gpio, |
393 | gpio == GPIOB ? "DVOI2C_B" : "DVOI2C_E"))) { | 394 | gpio == GPIOB ? "DVOI2C_B" : "DVOI2C_E"); |
395 | if (i2cbus == NULL) | ||
394 | continue; | 396 | continue; |
395 | } | ||
396 | 397 | ||
397 | intel_dvo->dev = *dvo; | 398 | intel_dvo->dev = *dvo; |
398 | ret = dvo->dev_ops->init(&intel_dvo->dev, i2cbus); | 399 | ret = dvo->dev_ops->init(&intel_dvo->dev, i2cbus); |