aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-omap2-mcspi.c
diff options
context:
space:
mode:
authorShubhrajyoti D <shubhrajyoti@ti.com>2012-03-29 12:41:07 -0400
committerGrant Likely <grant.likely@secretlab.ca>2012-04-10 16:11:03 -0400
commit39f8052d2e0c35533e776ef1235e4cc32cc35d02 (patch)
tree61a2ffa627caab8724d9c3cb7192f9aaf4068ce5 /drivers/spi/spi-omap2-mcspi.c
parent27b5284cfbe187732ebb184b03ea693f44837f9d (diff)
spi/omap2-mcspi: Trivial optimisation
Trivial optimisation of tmp variable by directly writing the value to the register. Cc: Tarun Kanti DebBarma <tarun.kanti@ti.com> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Diffstat (limited to 'drivers/spi/spi-omap2-mcspi.c')
-rw-r--r--drivers/spi/spi-omap2-mcspi.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
index 0b0da2f7ce23..f374eeebb8c2 100644
--- a/drivers/spi/spi-omap2-mcspi.c
+++ b/drivers/spi/spi-omap2-mcspi.c
@@ -1050,16 +1050,15 @@ static int __init omap2_mcspi_master_setup(struct omap2_mcspi *mcspi)
1050{ 1050{
1051 struct spi_master *master = mcspi->master; 1051 struct spi_master *master = mcspi->master;
1052 struct omap2_mcspi_regs *ctx = &mcspi->ctx; 1052 struct omap2_mcspi_regs *ctx = &mcspi->ctx;
1053 u32 tmp;
1054 int ret = 0; 1053 int ret = 0;
1055 1054
1056 ret = omap2_mcspi_enable_clocks(mcspi); 1055 ret = omap2_mcspi_enable_clocks(mcspi);
1057 if (ret < 0) 1056 if (ret < 0)
1058 return ret; 1057 return ret;
1059 1058
1060 tmp = OMAP2_MCSPI_WAKEUPENABLE_WKEN; 1059 mcspi_write_reg(master, OMAP2_MCSPI_WAKEUPENABLE,
1061 mcspi_write_reg(master, OMAP2_MCSPI_WAKEUPENABLE, tmp); 1060 OMAP2_MCSPI_WAKEUPENABLE_WKEN);
1062 ctx->wakeupenable = tmp; 1061 ctx->wakeupenable = OMAP2_MCSPI_WAKEUPENABLE_WKEN;
1063 1062
1064 omap2_mcspi_set_master_mode(master); 1063 omap2_mcspi_set_master_mode(master);
1065 omap2_mcspi_disable_clocks(mcspi); 1064 omap2_mcspi_disable_clocks(mcspi);