summaryrefslogtreecommitdiff
path: root/drivers/staging/fbtft/fbtft-core.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-09-29 01:52:40 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-09-29 01:52:40 +0200
commitbcabc6f32888435932364702ebf368164dea6678 (patch)
tree34e88561ca4acf1b663e972ea48e7f3e3f4c9efc /drivers/staging/fbtft/fbtft-core.c
parent60d6a21b1ec25629e93f11464fae3b2045c3370f (diff)
parent9ffecb10283508260936b96022d4ee43a7798b4c (diff)
Merge 4.3-rc3 into staging-next
We want the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/fbtft/fbtft-core.c')
-rw-r--r--drivers/staging/fbtft/fbtft-core.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c
index b318dafd5ce4..4691bccaf7c4 100644
--- a/drivers/staging/fbtft/fbtft-core.c
+++ b/drivers/staging/fbtft/fbtft-core.c
@@ -1415,15 +1415,11 @@ int fbtft_probe_common(struct fbtft_display *display,
/* 9-bit SPI setup */
if (par->spi && display->buswidth == 9) {
- par->spi->bits_per_word = 9;
- ret = par->spi->master->setup(par->spi);
- if (ret) {
+ if (par->spi->master->bits_per_word_mask & SPI_BPW_MASK(9)) {
+ par->spi->bits_per_word = 9;
+ } else {
dev_warn(&par->spi->dev,
"9-bit SPI not available, emulating using 8-bit.\n");
- par->spi->bits_per_word = 8;
- ret = par->spi->master->setup(par->spi);
- if (ret)
- goto out_release;
/* allocate buffer with room for dc bits */
par->extra = devm_kzalloc(par->info->device,
par->txbuf.len + (par->txbuf.len / 8) + 8,