summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-ep93xx.c
diff options
context:
space:
mode:
authorH Hartley Sweeten <hartleys@visionengravers.com>2013-07-02 19:10:00 +0200
committerMark Brown <broonie@linaro.org>2013-07-15 12:37:14 +0200
commit22c1b69ea833de84a9505135303ff443e62b3b15 (patch)
treea927135f705d3b8338b2c61204b514d9ce6d74d0 /drivers/spi/spi-ep93xx.c
parentspi: spi-ep93xx: use devm_clk_get() (diff)
downloadlinux-22c1b69ea833de84a9505135303ff443e62b3b15.tar.xz
linux-22c1b69ea833de84a9505135303ff443e62b3b15.zip
spi: spi-ep93xx: don't bother calculating the divisors in ep93xx_spi_setup()
The divisors needed to generate the SPI clock are calculated per transfer based on the t->speed_hz. There is no reason to calculate them in ep93xx_spi_setup(). Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Mika Westerberg <mika.westerberg@iki.fi> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi-ep93xx.c')
-rw-r--r--drivers/spi/spi-ep93xx.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/drivers/spi/spi-ep93xx.c b/drivers/spi/spi-ep93xx.c
index cc2a2405bd1d..6cdfc4036b75 100644
--- a/drivers/spi/spi-ep93xx.c
+++ b/drivers/spi/spi-ep93xx.c
@@ -136,7 +136,6 @@ struct ep93xx_spi {
/**
* struct ep93xx_spi_chip - SPI device hardware settings
* @spi: back pointer to the SPI device
- * @rate: max rate in hz this chip supports
* @div_cpsr: cpsr (pre-scaler) divider
* @div_scr: scr divider
* @ops: private chip operations
@@ -147,7 +146,6 @@ struct ep93xx_spi {
*/
struct ep93xx_spi_chip {
const struct spi_device *spi;
- unsigned long rate;
u8 div_cpsr;
u8 div_scr;
struct ep93xx_spi_chip_ops *ops;
@@ -315,18 +313,6 @@ static int ep93xx_spi_setup(struct spi_device *spi)
spi_set_ctldata(spi, chip);
}
- if (spi->max_speed_hz != chip->rate) {
- int err;
-
- err = ep93xx_spi_calc_divisors(espi, chip, spi->max_speed_hz);
- if (err != 0) {
- spi_set_ctldata(spi, NULL);
- kfree(chip);
- return err;
- }
- chip->rate = spi->max_speed_hz;
- }
-
ep93xx_spi_cs_control(spi, false);
return 0;
}