All of lore.kernel.org
 help / color / mirror / Atom feed
From: "郑 祎" <yzheng@techyauld.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] SPI: fixup typo in omap2_spi.c
Date: Fri, 4 Nov 2016 22:53:35 +0800	[thread overview]
Message-ID: <20161104145335.GE1570@techyauld.com> (raw)

  regs->channel[] is an array of registers in SoC. It is indexed by CS#
  Fixup the typo which will cause the index error when accessing the hardware.

  In the all other code, regs->channel[] is indexed by 'priv->cs', so I think
  it is reasonable to fix that wrongly register accessing.
  
---
 drivers/spi/omap3_spi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/omap3_spi.c b/drivers/spi/omap3_spi.c
index 60e9d6e..2380a0e 100644
--- a/drivers/spi/omap3_spi.c
+++ b/drivers/spi/omap3_spi.c
@@ -416,7 +416,7 @@ static void _omap3_spi_set_wordlen(struct omap3_spi_priv *priv)
 	unsigned int confr;
 
 	/* McSPI individual channel configuration */
-	confr = readl(&priv->regs->channel[priv->wordlen].chconf);
+	confr = readl(&priv->regs->channel[priv->cs].chconf);
 
 	/* wordlength */
 	confr &= ~OMAP3_MCSPI_CHCONF_WL_MASK;
-- 
2.10.2

             reply	other threads:[~2016-11-04 14:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-04 14:53 郑 祎 [this message]
2016-11-11 11:50 ` [U-Boot] [PATCH] SPI: fixup typo in omap2_spi.c Jagan Teki

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=20161104145335.GE1570@techyauld.com \
    --to=yzheng@techyauld.com \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.