drm/i915: Store DVO SRCDIM register offset under intel_dvo_device

Store the DVO SRCDIM register offset alongside the DVO control register
offset in intel_dvo_device. This gets rid of the switch statement whose
case values are the DVO control register offsets. Such a construct would
cause problems for register type safety.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1446672017-24497-12-git-send-email-ville.syrjala@linux.intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Ville Syrjälä
2015-11-04 23:19:59 +02:00
parent 2a5c08323d
commit 78e0d2e347
2 changed files with 10 additions and 14 deletions

View File

@@ -33,6 +33,7 @@ struct intel_dvo_device {
int type;
/* DVOA/B/C output register */
u32 dvo_reg;
u32 dvo_srcdim_reg;
/* GPIO register used for i2c bus to control this device */
u32 gpio;
int slave_addr;