From: Wolfram Sang <w.sang@pengutronix.de>
To: linux-input@vger.kernel.org
Cc: Michael Hennerich <michael.hennerich@analog.com>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
device-drivers-devel@blackfin.uclinux.org,
Wolfram Sang <w.sang@pengutronix.de>
Subject: [PATCH 1/4] input: adxl34x: consistently use read/write encapsulation
Date: Thu, 20 Dec 2012 14:51:08 +0100 [thread overview]
Message-ID: <1356011471-18757-2-git-send-email-w.sang@pengutronix.de> (raw)
In-Reply-To: <1356011471-18757-1-git-send-email-w.sang@pengutronix.de>
Don't open code the AC_READ and AC_WRITE macros.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
---
drivers/input/misc/adxl34x.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/input/misc/adxl34x.c b/drivers/input/misc/adxl34x.c
index 1cf72fe..b18d3e2 100644
--- a/drivers/input/misc/adxl34x.c
+++ b/drivers/input/misc/adxl34x.c
@@ -732,7 +732,7 @@ struct adxl34x *adxl34x_probe(struct device *dev, int irq,
mutex_init(&ac->mutex);
input_dev->name = "ADXL34x accelerometer";
- revid = ac->bops->read(dev, DEVID);
+ revid = AC_READ(ac, DEVID);
switch (revid) {
case ID_ADXL345:
@@ -809,7 +809,7 @@ struct adxl34x *adxl34x_probe(struct device *dev, int irq,
if (FIFO_MODE(pdata->fifo_mode) == FIFO_BYPASS)
ac->fifo_delay = false;
- ac->bops->write(dev, POWER_CTL, 0);
+ AC_WRITE(ac, POWER_CTL, 0);
err = request_threaded_irq(ac->irq, NULL, adxl34x_irq,
IRQF_TRIGGER_HIGH | IRQF_ONESHOT,
--
1.7.10.4
next prev parent reply other threads:[~2012-12-20 13:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-20 13:51 [PATCH 0/4] input adxl34x: give a little love to the driver Wolfram Sang
2012-12-20 13:51 ` Wolfram Sang [this message]
2012-12-20 13:51 ` [PATCH 2/4] input: adxl34x: don't set THRESH_TAP twice Wolfram Sang
2012-12-20 13:51 ` [PATCH 3/4] input: adxl34x: make platform_data include self contained Wolfram Sang
2012-12-20 13:51 ` [PATCH 4/4] input: adxl34x: default platform_data should not use defines from driver Wolfram Sang
2012-12-20 14:00 ` [PATCH 0/4] input adxl34x: give a little love to the driver Michael Hennerich
2012-12-24 17:53 ` Dmitry Torokhov
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=1356011471-18757-2-git-send-email-w.sang@pengutronix.de \
--to=w.sang@pengutronix.de \
--cc=device-drivers-devel@blackfin.uclinux.org \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=michael.hennerich@analog.com \
/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;
as well as URLs for NNTP newsgroup(s).