mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-10 15:19:51 +00:00
spi: pxa2xx: Use local struct spi_master pointer in pump_transfers()
We will find more use for struct spi_master pointer in pump_transfers() and code will be more readable if we access it using local pointer than through the drv_data->master. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
c64e1265ae
commit
2d7537d8f6
@ -915,6 +915,7 @@ static unsigned int pxa2xx_ssp_get_clk_div(struct driver_data *drv_data,
|
|||||||
static void pump_transfers(unsigned long data)
|
static void pump_transfers(unsigned long data)
|
||||||
{
|
{
|
||||||
struct driver_data *drv_data = (struct driver_data *)data;
|
struct driver_data *drv_data = (struct driver_data *)data;
|
||||||
|
struct spi_master *master = drv_data->master;
|
||||||
struct spi_message *message = NULL;
|
struct spi_message *message = NULL;
|
||||||
struct spi_transfer *transfer = NULL;
|
struct spi_transfer *transfer = NULL;
|
||||||
struct spi_transfer *previous = NULL;
|
struct spi_transfer *previous = NULL;
|
||||||
@ -1072,12 +1073,12 @@ static void pump_transfers(unsigned long data)
|
|||||||
cr0 = pxa2xx_configure_sscr0(drv_data, clk_div, bits);
|
cr0 = pxa2xx_configure_sscr0(drv_data, clk_div, bits);
|
||||||
if (!pxa25x_ssp_comp(drv_data))
|
if (!pxa25x_ssp_comp(drv_data))
|
||||||
dev_dbg(&message->spi->dev, "%u Hz actual, %s\n",
|
dev_dbg(&message->spi->dev, "%u Hz actual, %s\n",
|
||||||
drv_data->master->max_speed_hz
|
master->max_speed_hz
|
||||||
/ (1 + ((cr0 & SSCR0_SCR(0xfff)) >> 8)),
|
/ (1 + ((cr0 & SSCR0_SCR(0xfff)) >> 8)),
|
||||||
drv_data->dma_mapped ? "DMA" : "PIO");
|
drv_data->dma_mapped ? "DMA" : "PIO");
|
||||||
else
|
else
|
||||||
dev_dbg(&message->spi->dev, "%u Hz actual, %s\n",
|
dev_dbg(&message->spi->dev, "%u Hz actual, %s\n",
|
||||||
drv_data->master->max_speed_hz / 2
|
master->max_speed_hz / 2
|
||||||
/ (1 + ((cr0 & SSCR0_SCR(0x0ff)) >> 8)),
|
/ (1 + ((cr0 & SSCR0_SCR(0x0ff)) >> 8)),
|
||||||
drv_data->dma_mapped ? "DMA" : "PIO");
|
drv_data->dma_mapped ? "DMA" : "PIO");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user