From: kernel@esmil.dk (Emil Renner Berthing)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] staging: imx-drm: imx-hdmi: clean up hdmi_phy_wait_i2c_done
Date: Sat, 29 Mar 2014 13:58:11 +0100 [thread overview]
Message-ID: <1396097891-12209-1-git-send-email-kernel@esmil.dk> (raw)
Simplify hdmi_phy_wait_i2c_done so the call to hdmi_readb is
only done in one place. This also fixes a checkpatch warning.
Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
---
drivers/staging/imx-drm/imx-hdmi.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/staging/imx-drm/imx-hdmi.c b/drivers/staging/imx-drm/imx-hdmi.c
index da71d8d..cc8d232 100644
--- a/drivers/staging/imx-drm/imx-hdmi.c
+++ b/drivers/staging/imx-drm/imx-hdmi.c
@@ -660,13 +660,10 @@ static inline void hdmi_phy_test_dout(struct imx_hdmi *hdmi,
static bool hdmi_phy_wait_i2c_done(struct imx_hdmi *hdmi, int msec)
{
- unsigned char val = 0;
- val = hdmi_readb(hdmi, HDMI_IH_I2CMPHY_STAT0) & 0x3;
- while (!val) {
+ while ((hdmi_readb(hdmi, HDMI_IH_I2CMPHY_STAT0) & 0x3) == 0) {
udelay(1000);
if (msec-- == 0)
return false;
- val = hdmi_readb(hdmi, HDMI_IH_I2CMPHY_STAT0) & 0x3;
}
return true;
}
--
1.9.1
next reply other threads:[~2014-03-29 12:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-29 12:58 Emil Renner Berthing [this message]
2014-03-29 18:37 ` [PATCH] staging: imx-drm: imx-hdmi: clean up hdmi_phy_wait_i2c_done Troy Kisky
2014-03-29 23:17 ` Emil Renner Berthing
2014-03-29 23:21 ` [PATCH v2] " Emil Renner Berthing
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=1396097891-12209-1-git-send-email-kernel@esmil.dk \
--to=kernel@esmil.dk \
--cc=linux-arm-kernel@lists.infradead.org \
/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.