diff options
author | Geliang Tang <geliangtang@163.com> | 2015-12-23 00:18:43 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-07 19:42:23 -0800 |
commit | 5d5ccf21968d0de82f3eed9ab924fadbc872e739 (patch) | |
tree | 5a49b5b027934e1e87c8f8a1087bc9a2b0344b9d /drivers/staging/fbtft/fbtft_device.c | |
parent | 817d1648ec2ca32888a78aa9f9086b6ea00add86 (diff) |
staging: fbtft: use to_spi_device
Use to_spi_device() instead of open-coding it.
Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/fbtft/fbtft_device.c')
-rw-r--r-- | drivers/staging/fbtft/fbtft_device.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/fbtft/fbtft_device.c b/drivers/staging/fbtft/fbtft_device.c index a0366e5e5c15..08d0597ced5b 100644 --- a/drivers/staging/fbtft/fbtft_device.c +++ b/drivers/staging/fbtft/fbtft_device.c @@ -1312,7 +1312,7 @@ Device 'xxx' does not have a release() function, it is broken and must be fixed static int spi_device_found(struct device *dev, void *data) { - struct spi_device *spi = container_of(dev, struct spi_device, dev); + struct spi_device *spi = to_spi_device(dev); dev_info(dev, "%s %s %dkHz %d bits mode=0x%02X\n", spi->modalias, dev_name(dev), spi->max_speed_hz / 1000, spi->bits_per_word, |