OSDN Git Service

drm/i915: Replace the aux ddc name switch statement with kasprintf()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 11 Nov 2015 18:34:11 +0000 (20:34 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 16 Nov 2015 13:59:50 +0000 (15:59 +0200)
commita121f4e5fae5d7542e1c4158bc9a47de825547f3
tree34eaf30593a662d858e6fc58d9cce48f14f7c1e4
parentf3c6a3a70d6768038fb005cb8d745e21b4511ca9
drm/i915: Replace the aux ddc name switch statement with kasprintf()

Use kasprintf() to generate the "DPDDC-<port>" name for the aux helper.

To deal with errors properly make intel_dp_aux_init() return something,
and adjust the caller to match. It seems we were also missing a
intel_dp_mst_encoder_cleanup() call on edp (non-port A) init failures,
so add that too.

The whole error/cleanup ordering doesn't feel entirely sane to me, but
I'll leave that part alone for now.

v2: Use kasprintf() instead of a table, reorder patches (Chis)

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1447266856-30249-3-git-send-email-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/intel_dp.c