PSB stores the backlight i2c adapter in lvds_priv. CDV stores it in gma_encoder. Neither place is perfect but lets pick gma_encoder to make life simple. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@xxxxxxxxx> --- drivers/gpu/drm/gma500/gma_lvds.h | 2 -- drivers/gpu/drm/gma500/psb_intel_lvds.c | 10 +++++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/gma500/gma_lvds.h b/drivers/gpu/drm/gma500/gma_lvds.h index 5c7da22400fb..dcba810dc470 100644 --- a/drivers/gpu/drm/gma500/gma_lvds.h +++ b/drivers/gpu/drm/gma500/gma_lvds.h @@ -19,8 +19,6 @@ struct gma_lvds_priv { uint32_t savePFIT_CONTROL; uint32_t savePFIT_PGM_RATIOS; uint32_t saveBLC_PWM_CTL; - - struct gma_i2c_chan *i2c_bus; }; u32 gma_lvds_get_max_backlight(struct drm_device *dev); diff --git a/drivers/gpu/drm/gma500/psb_intel_lvds.c b/drivers/gpu/drm/gma500/psb_intel_lvds.c index f129e53f0233..ea5f2f078a7f 100644 --- a/drivers/gpu/drm/gma500/psb_intel_lvds.c +++ b/drivers/gpu/drm/gma500/psb_intel_lvds.c @@ -306,14 +306,14 @@ void psb_intel_lvds_init(struct drm_device *dev, * Set up I2C bus * FIXME: distroy i2c_bus when exit */ - lvds_priv->i2c_bus = gma_i2c_create(dev, GPIOB, "LVDSBLC_B"); - if (!lvds_priv->i2c_bus) { + gma_encoder->i2c_bus = gma_i2c_create(dev, GPIOB, "LVDSBLC_B"); + if (!gma_encoder->i2c_bus) { dev_printk(KERN_ERR, dev->dev, "I2C bus registration failed.\n"); goto err_encoder_cleanup; } - lvds_priv->i2c_bus->slave_addr = 0x2C; - dev_priv->lvds_i2c_bus = lvds_priv->i2c_bus; + gma_encoder->i2c_bus->slave_addr = 0x2C; + dev_priv->lvds_i2c_bus = gma_encoder->i2c_bus; /* * LVDS discovery: @@ -390,7 +390,7 @@ void psb_intel_lvds_init(struct drm_device *dev, err_unlock: mutex_unlock(&dev->mode_config.mutex); - gma_i2c_destroy(lvds_priv->i2c_bus); + gma_i2c_destroy(gma_encoder->i2c_bus); err_encoder_cleanup: drm_encoder_cleanup(encoder); err_connector_cleanup: -- 2.36.1