public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alison Schofield <amsfield22@gmail.com>
To: jic23@kernel.org
Cc: sathyanarayanan.kuppuswamy@linux.intel.com, knaack.h@gmx.de,
	lars@metafoo.de, pmeerw@pmeerw.net, mranostay@gmail.com,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] iio: light: jsa1212: remove unneeded i2c check functionality test
Date: Sun, 15 May 2016 11:37:27 -0700	[thread overview]
Message-ID: <20160515183717.GA2674@d830.WORKGROUP> (raw)

This driver does not call i2c_smbus_read|write_byte_data(),
so remove the corresponding functionality test. It uses regmap
to handle byte transfers transparently.

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
---
Found & fixed by inspection based on same defect recently fixed
in light/tpl0102 driver.


 drivers/iio/light/jsa1212.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/iio/light/jsa1212.c b/drivers/iio/light/jsa1212.c
index 99a6281..e8a8931 100644
--- a/drivers/iio/light/jsa1212.c
+++ b/drivers/iio/light/jsa1212.c
@@ -325,9 +325,6 @@ static int jsa1212_probe(struct i2c_client *client,
 	struct regmap *regmap;
 	int ret;
 
-	if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA))
-		return -EOPNOTSUPP;
-
 	indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data));
 	if (!indio_dev)
 		return -ENOMEM;
-- 
2.1.4

             reply	other threads:[~2016-05-15 18:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-15 18:37 Alison Schofield [this message]
2016-05-19 18:37 ` [PATCH] iio: light: jsa1212: remove unneeded i2c check functionality test sathyanarayanan kuppuswamy
2016-05-19 20:19   ` Matt Ranostay
2016-05-21 19:18     ` Jonathan Cameron

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=20160515183717.GA2674@d830.WORKGROUP \
    --to=amsfield22@gmail.com \
    --cc=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mranostay@gmail.com \
    --cc=pmeerw@pmeerw.net \
    --cc=sathyanarayanan.kuppuswamy@linux.intel.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