diff options
author | Stefan Wahren <stefan.wahren@i2se.com> | 2015-08-25 21:04:12 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-09-13 09:33:58 -0700 |
commit | dd3afa57c515801f37071734f56be9035fdeaa8c (patch) | |
tree | e7a9b597eea0c704f97ff57753f547c1dc73dcd2 /drivers/staging/fbtft/fb_uc1611.c | |
parent | staging: fbtft: fix 9-bit SPI support detection (diff) | |
download | linux-dev-dd3afa57c515801f37071734f56be9035fdeaa8c.tar.xz linux-dev-dd3afa57c515801f37071734f56be9035fdeaa8c.zip |
staging: fbtft: replace master->setup() with spi_setup()
Calling the setup of the SPI master directly causes a NULL pointer
dereference with master drivers without a separate setup function.
This problem is reproduceable on ARM MXS platform.
So fix this issue by using spi_setup() instead.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Acked-by: Noralf Trønnes <noralf@tronnes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/fbtft/fb_uc1611.c')
-rw-r--r-- | drivers/staging/fbtft/fb_uc1611.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/fbtft/fb_uc1611.c b/drivers/staging/fbtft/fb_uc1611.c index 32f3a9d921d6..5cafa50d1fac 100644 --- a/drivers/staging/fbtft/fb_uc1611.c +++ b/drivers/staging/fbtft/fb_uc1611.c @@ -76,7 +76,7 @@ static int init_display(struct fbtft_par *par) /* Set CS active high */ par->spi->mode |= SPI_CS_HIGH; - ret = par->spi->master->setup(par->spi); + ret = spi_setup(par->spi); if (ret) { dev_err(par->info->device, "Could not set SPI_CS_HIGH\n"); return ret; |