[Intel-gfx] [PATCH 1/4] drm/i915/dp: make intel_dp_aux_native_read() return bool
Chris Wilson
chris at chris-wilson.co.uk
Thu Jan 30 11:07:46 CET 2014
On Thu, Jan 30, 2014 at 11:37:01AM +0200, Jani Nikula wrote:
> +static inline bool
> +intel_dp_aux_native_read(struct intel_dp *intel_dp,
> + uint16_t address, uint8_t *recv, int recv_bytes)
> +{
> + return _intel_dp_aux_native_read(intel_dp, address,
> + recv, recv_bytes) == recv_bytes;
> +}
> +
> static int
> intel_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode,
> uint8_t write_byte, uint8_t *read_byte)
> @@ -1986,8 +1994,8 @@ intel_dp_aux_native_read_retry(struct intel_dp *intel_dp, uint16_t address,
> * but we're also supposed to retry 3 times per the spec.
> */
> for (i = 0; i < 3; i++) {
> - ret = intel_dp_aux_native_read(intel_dp, address, recv,
> - recv_bytes);
> + ret = _intel_dp_aux_native_read(intel_dp, address, recv,
> + recv_bytes);
> if (ret == recv_bytes)
> return true;
ret is not being used other than to evaulate the boolean exactly like
the new intel_dp_aux_native_read().
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list