]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit343f1e983dbcfcd93e474dd2cdf65902f8965eed
tree34eaf30593a662d858e6fc58d9cce48f14f7c1e4
parent7cb564bb3338de9d146ad021908a74b6cbc5f4d7
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