summaryrefslogtreecommitdiff
path: root/drivers/staging/fbtft/flexfb.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/flexfb.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/flexfb.c')
-rw-r--r--drivers/staging/fbtft/flexfb.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/staging/fbtft/flexfb.c b/drivers/staging/fbtft/flexfb.c
index b7ed7b11b564..704b78c78f13 100644
--- a/drivers/staging/fbtft/flexfb.c
+++ b/drivers/staging/fbtft/flexfb.c
@@ -453,15 +453,12 @@ static int flexfb_probe_common(struct spi_device *sdev,
}
par->fbtftops.write_register = fbtft_write_reg8_bus9;
par->fbtftops.write_vmem = fbtft_write_vmem16_bus9;
- sdev->bits_per_word = 9;
- ret = sdev->master->setup(sdev);
- if (ret) {
+ if (par->spi->master->bits_per_word_mask
+ & SPI_BPW_MASK(9)) {
+ par->spi->bits_per_word = 9;
+ } else {
dev_warn(dev,
"9-bit SPI not available, emulating using 8-bit.\n");
- sdev->bits_per_word = 8;
- ret = sdev->master->setup(sdev);
- 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,