aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-pxa2xx.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2015-10-22 09:44:40 -0400
committerMark Brown <broonie@kernel.org>2015-10-22 19:56:05 -0400
commitd2c2f6a47633a36bc8db8c802f7c284da36a7a53 (patch)
treeddccc26a96ae33c849d0b192a09d76d405056c24 /drivers/spi/spi-pxa2xx.c
parentd74c4b1c61ecc5ad8158ac649245fdfc9601c1b5 (diff)
spi: pxa2xx: derive struct chip_data from struct drv_data
Since we call pxa2xx_ssp_get_clk_div() from pump_transfers() we may derive pointer to struct chip_data from struct drv_data like it's done in the rest of the functions. This will make it less errorprone. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-pxa2xx.c')
-rw-r--r--drivers/spi/spi-pxa2xx.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
index 986a2911e94e..4fddc2a37a81 100644
--- a/drivers/spi/spi-pxa2xx.c
+++ b/drivers/spi/spi-pxa2xx.c
@@ -814,8 +814,9 @@ static unsigned int ssp_get_clk_div(struct driver_data *drv_data, int rate)
814} 814}
815 815
816static unsigned int pxa2xx_ssp_get_clk_div(struct driver_data *drv_data, 816static unsigned int pxa2xx_ssp_get_clk_div(struct driver_data *drv_data,
817 struct chip_data *chip, int rate) 817 int rate)
818{ 818{
819 struct chip_data *chip = drv_data->cur_chip;
819 unsigned int clk_div; 820 unsigned int clk_div;
820 821
821 switch (drv_data->ssp_type) { 822 switch (drv_data->ssp_type) {
@@ -921,7 +922,7 @@ static void pump_transfers(unsigned long data)
921 bits = transfer->bits_per_word; 922 bits = transfer->bits_per_word;
922 speed = transfer->speed_hz; 923 speed = transfer->speed_hz;
923 924
924 clk_div = pxa2xx_ssp_get_clk_div(drv_data, chip, speed); 925 clk_div = pxa2xx_ssp_get_clk_div(drv_data, speed);
925 926
926 if (bits <= 8) { 927 if (bits <= 8) {
927 drv_data->n_bytes = 1; 928 drv_data->n_bytes = 1;