drm/tinydrm: Clean up tinydrm_spi_transfer()
authorNoralf Trønnes <noralf@tronnes.org>
Fri, 19 Jul 2019 15:59:11 +0000 (17:59 +0200)
committerNoralf Trønnes <noralf@tronnes.org>
Tue, 23 Jul 2019 13:46:56 +0000 (15:46 +0200)
commit083a6c23b9ecf478265bb27ccacb8d587732058e
tree8eb5c8f95bc4b54f2180375b98d4eb153e87d5f1
parente143364b4c1774f68e923a5a0bb0fca28ac25888
drm/tinydrm: Clean up tinydrm_spi_transfer()

Prep work before moving the function to mipi-dbi.

tinydrm_spi_transfer() was made to support one class of drivers in
drivers/staging/fbtft that has not been converted to DRM yet, so strip
away the unused functionality:
- Start byte (header) is not used.
- No driver relies on the automatic 16-bit byte swapping on little endian
  machines with SPI controllers only supporting 8 bits per word.

Other changes:
- No need to initialize ret
- No need for the WARN since mipi-dbi only uses 8 and 16 bpw.
- Use spi_message_init_with_transfers()

Cc: David Lechner <david@lechnology.com>
Acked-by: : David Lechner <david@lechnology.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190719155916.62465-7-noralf@tronnes.org
drivers/gpu/drm/tinydrm/core/tinydrm-helpers.c
drivers/gpu/drm/tinydrm/ili9225.c
drivers/gpu/drm/tinydrm/mipi-dbi.c
include/drm/tinydrm/tinydrm-helpers.h