From: Shubhrajyoti D <shubhrajyoti@ti.com>
To: <spi-devel-general@lists.sourceforge.net>
Cc: <linux-omap@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Shubhrajyoti D <shubhrajyoti@ti.com>
Subject: [PATCHv3 3/3] spi: omap2-mcspi: Trivial optimisation
Date: Sat, 31 Mar 2012 17:06:58 +0530 [thread overview]
Message-ID: <1333193818-3984-4-git-send-email-shubhrajyoti@ti.com> (raw)
In-Reply-To: <1333193818-3984-1-git-send-email-shubhrajyoti@ti.com>
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>
---
drivers/spi/spi-omap2-mcspi.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
index 0b0da2f..f374eee 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)
{
struct spi_master *master = mcspi->master;
struct omap2_mcspi_regs *ctx = &mcspi->ctx;
- u32 tmp;
int ret = 0;
ret = omap2_mcspi_enable_clocks(mcspi);
if (ret < 0)
return ret;
- tmp = OMAP2_MCSPI_WAKEUPENABLE_WKEN;
- mcspi_write_reg(master, OMAP2_MCSPI_WAKEUPENABLE, tmp);
- ctx->wakeupenable = tmp;
+ mcspi_write_reg(master, OMAP2_MCSPI_WAKEUPENABLE,
+ OMAP2_MCSPI_WAKEUPENABLE_WKEN);
+ ctx->wakeupenable = OMAP2_MCSPI_WAKEUPENABLE_WKEN;
omap2_mcspi_set_master_mode(master);
omap2_mcspi_disable_clocks(mcspi);
--
1.7.1
next prev parent reply other threads:[~2012-03-31 11:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-31 11:36 [PATCHv3 0/3] spi: omap2-mcspi: driver updates Shubhrajyoti D
2012-03-31 11:36 ` [PATCHv3 1/3] spi/omap: Remove bus_num usage for instance index Shubhrajyoti D
2012-03-31 11:36 ` [PATCHv3 2/3] spi: omap2-mcspi: add support for pm_runtime autosuspend Shubhrajyoti D
2012-03-31 11:36 ` Shubhrajyoti D [this message]
2012-04-02 19:40 ` [PATCHv3 0/3] spi: omap2-mcspi: driver updates Grant Likely
2012-04-03 5:55 ` Shubhrajyoti Datta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1333193818-3984-4-git-send-email-shubhrajyoti@ti.com \
--to=shubhrajyoti@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=spi-devel-general@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®