public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iio: light: jsa1212: remove unneeded i2c check functionality test
@ 2016-05-15 18:37 Alison Schofield
  2016-05-19 18:37 ` sathyanarayanan kuppuswamy
  0 siblings, 1 reply; 4+ messages in thread
From: Alison Schofield @ 2016-05-15 18:37 UTC (permalink / raw)
  To: jic23
  Cc: sathyanarayanan.kuppuswamy, knaack.h, lars, pmeerw, mranostay,
	linux-iio, linux-kernel

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] iio: light: jsa1212: remove unneeded i2c check functionality test
  2016-05-15 18:37 [PATCH] iio: light: jsa1212: remove unneeded i2c check functionality test Alison Schofield
@ 2016-05-19 18:37 ` sathyanarayanan kuppuswamy
  2016-05-19 20:19   ` Matt Ranostay
  0 siblings, 1 reply; 4+ messages in thread
From: sathyanarayanan kuppuswamy @ 2016-05-19 18:37 UTC (permalink / raw)
  To: Alison Schofield, jic23
  Cc: knaack.h, lars, pmeerw, mranostay, linux-iio, linux-kernel

Looks Good.

Reviewed-by:Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>


On 05/15/2016 11:37 AM, Alison Schofield wrote:
> 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;

-- 
Sathyanarayanan Kuppuswamy
Android kernel developer

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] iio: light: jsa1212: remove unneeded i2c check functionality test
  2016-05-19 18:37 ` sathyanarayanan kuppuswamy
@ 2016-05-19 20:19   ` Matt Ranostay
  2016-05-21 19:18     ` Jonathan Cameron
  0 siblings, 1 reply; 4+ messages in thread
From: Matt Ranostay @ 2016-05-19 20:19 UTC (permalink / raw)
  To: sathyanarayanan.kuppuswamy
  Cc: Alison Schofield, Jonathan Cameron, Hartmut Knaack,
	Lars-Peter Clausen, Peter Meerwald-Stadler,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org

Reviewed-by: Matt Ranostay <matt.ranostay@intel.com>

On Thu, May 19, 2016 at 11:37 AM, sathyanarayanan kuppuswamy
<sathyanarayanan.kuppuswamy@linux.intel.com> wrote:
> Looks Good.
>
> Reviewed-by:Kuppuswamy Sathyanarayanan
> <sathyanarayanan.kuppuswamy@linux.intel.com>
>
>
> On 05/15/2016 11:37 AM, Alison Schofield wrote:
>>
>> 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;
>
>
> --
> Sathyanarayanan Kuppuswamy
> Android kernel developer
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] iio: light: jsa1212: remove unneeded i2c check functionality test
  2016-05-19 20:19   ` Matt Ranostay
@ 2016-05-21 19:18     ` Jonathan Cameron
  0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Cameron @ 2016-05-21 19:18 UTC (permalink / raw)
  To: Matt Ranostay, sathyanarayanan.kuppuswamy
  Cc: Alison Schofield, Hartmut Knaack, Lars-Peter Clausen,
	Peter Meerwald-Stadler, linux-iio@vger.kernel.org,
	linux-kernel@vger.kernel.org

On 19/05/16 21:19, Matt Ranostay wrote:
> Reviewed-by: Matt Ranostay <matt.ranostay@intel.com>
Applied to the togreg branch of iio.git.

Thanks,

Jonathan
> 
> On Thu, May 19, 2016 at 11:37 AM, sathyanarayanan kuppuswamy
> <sathyanarayanan.kuppuswamy@linux.intel.com> wrote:
>> Looks Good.
>>
>> Reviewed-by:Kuppuswamy Sathyanarayanan
>> <sathyanarayanan.kuppuswamy@linux.intel.com>
>>
>>
>> On 05/15/2016 11:37 AM, Alison Schofield wrote:
>>>
>>> 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;
>>
>>
>> --
>> Sathyanarayanan Kuppuswamy
>> Android kernel developer
>>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-05-21 19:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-15 18:37 [PATCH] iio: light: jsa1212: remove unneeded i2c check functionality test Alison Schofield
2016-05-19 18:37 ` sathyanarayanan kuppuswamy
2016-05-19 20:19   ` Matt Ranostay
2016-05-21 19:18     ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox