* [PATCH 00/14] mfd: convert subsystem to i2c_new_dummy_device()
@ 2019-07-22 17:26 Wolfram Sang
  2019-07-22 17:26 ` [PATCH 13/14] mfd: palmas: convert to i2c_new_dummy_device Wolfram Sang
  2019-07-22 17:26 ` [PATCH 14/14] mfd: twl-core: " Wolfram Sang
  0 siblings, 2 replies; 5+ messages in thread
From: Wolfram Sang @ 2019-07-22 17:26 UTC (permalink / raw)
  To: linux-i2c; +Cc: Wolfram Sang, linux-arm-kernel, linux-kernel, linux-omap
This series is part of a tree-wide movement to replace the I2C API call
'i2c_new_dummy' which returns NULL with its new counterpart returning an
ERRPTR.
The series was generated with coccinelle (audited afterwards, of course) and
build tested by me and by buildbot. No tests on HW have been performed.
The branch is based on v5.3-rc1. A branch (with some more stuff included) can
be found here:
git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/i2c/new_dummy
Some drivers still need to be manually converted. Patches for those will be
sent out individually.
Wolfram Sang (14):
  mfd: 88pm800: convert to i2c_new_dummy_device
  mfd: 88pm860x-core: convert to i2c_new_dummy_device
  mfd: ab3100-core: convert to i2c_new_dummy_device
  mfd: bcm590xx: convert to i2c_new_dummy_device
  mfd: da9150-core: convert to i2c_new_dummy_device
  mfd: max14577: convert to i2c_new_dummy_device
  mfd: max77693: convert to i2c_new_dummy_device
  mfd: max77843: convert to i2c_new_dummy_device
  mfd: max8907: convert to i2c_new_dummy_device
  mfd: max8925-i2c: convert to i2c_new_dummy_device
  mfd: max8997: convert to i2c_new_dummy_device
  mfd: max8998: convert to i2c_new_dummy_device
  mfd: palmas: convert to i2c_new_dummy_device
  mfd: twl-core: convert to i2c_new_dummy_device
 drivers/mfd/88pm800.c       | 12 ++++++------
 drivers/mfd/88pm860x-core.c |  6 +++---
 drivers/mfd/ab3100-core.c   |  6 +++---
 drivers/mfd/bcm590xx.c      |  6 +++---
 drivers/mfd/da9150-core.c   |  6 +++---
 drivers/mfd/max14577.c      |  6 +++---
 drivers/mfd/max77693.c      | 12 ++++++------
 drivers/mfd/max77843.c      |  6 +++---
 drivers/mfd/max8907.c       |  6 +++---
 drivers/mfd/max8925-i2c.c   | 12 ++++++------
 drivers/mfd/max8997.c       | 18 +++++++++---------
 drivers/mfd/max8998.c       |  6 +++---
 drivers/mfd/palmas.c        |  6 +++---
 drivers/mfd/twl-core.c      |  6 +++---
 14 files changed, 57 insertions(+), 57 deletions(-)
-- 
2.20.1
^ permalink raw reply	[flat|nested] 5+ messages in thread
* [PATCH 13/14] mfd: palmas: convert to i2c_new_dummy_device
  2019-07-22 17:26 [PATCH 00/14] mfd: convert subsystem to i2c_new_dummy_device() Wolfram Sang
@ 2019-07-22 17:26 ` Wolfram Sang
  2019-08-12  7:48   ` Lee Jones
  2019-07-22 17:26 ` [PATCH 14/14] mfd: twl-core: " Wolfram Sang
  1 sibling, 1 reply; 5+ messages in thread
From: Wolfram Sang @ 2019-07-22 17:26 UTC (permalink / raw)
  To: linux-i2c
  Cc: Wolfram Sang, Tony Lindgren, Lee Jones, linux-omap, linux-kernel
Move from i2c_new_dummy() to i2c_new_dummy_device(), so we now get an
ERRPTR which we use in error handling.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
Generated with coccinelle. Build tested by me and buildbot. Not tested on HW.
 drivers/mfd/palmas.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/mfd/palmas.c b/drivers/mfd/palmas.c
index 6818ff34837c..f5b3fa973b13 100644
--- a/drivers/mfd/palmas.c
+++ b/drivers/mfd/palmas.c
@@ -549,12 +549,12 @@ static int palmas_i2c_probe(struct i2c_client *i2c,
 			palmas->i2c_clients[i] = i2c;
 		else {
 			palmas->i2c_clients[i] =
-					i2c_new_dummy(i2c->adapter,
+					i2c_new_dummy_device(i2c->adapter,
 							i2c->addr + i);
-			if (!palmas->i2c_clients[i]) {
+			if (IS_ERR(palmas->i2c_clients[i])) {
 				dev_err(palmas->dev,
 					"can't attach client %d\n", i);
-				ret = -ENOMEM;
+				ret = PTR_ERR(palmas->i2c_clients[i]);
 				goto err_i2c;
 			}
 			palmas->i2c_clients[i]->dev.of_node = of_node_get(node);
-- 
2.20.1
^ permalink raw reply related	[flat|nested] 5+ messages in thread* Re: [PATCH 13/14] mfd: palmas: convert to i2c_new_dummy_device
  2019-07-22 17:26 ` [PATCH 13/14] mfd: palmas: convert to i2c_new_dummy_device Wolfram Sang
@ 2019-08-12  7:48   ` Lee Jones
  0 siblings, 0 replies; 5+ messages in thread
From: Lee Jones @ 2019-08-12  7:48 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c, Tony Lindgren, linux-omap, linux-kernel
On Mon, 22 Jul 2019, Wolfram Sang wrote:
> Move from i2c_new_dummy() to i2c_new_dummy_device(), so we now get an
> ERRPTR which we use in error handling.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
> 
> Generated with coccinelle. Build tested by me and buildbot. Not tested on HW.
> 
>  drivers/mfd/palmas.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
Applied, thanks.
-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply	[flat|nested] 5+ messages in thread
* [PATCH 14/14] mfd: twl-core: convert to i2c_new_dummy_device
  2019-07-22 17:26 [PATCH 00/14] mfd: convert subsystem to i2c_new_dummy_device() Wolfram Sang
  2019-07-22 17:26 ` [PATCH 13/14] mfd: palmas: convert to i2c_new_dummy_device Wolfram Sang
@ 2019-07-22 17:26 ` Wolfram Sang
  2019-08-12  7:48   ` Lee Jones
  1 sibling, 1 reply; 5+ messages in thread
From: Wolfram Sang @ 2019-07-22 17:26 UTC (permalink / raw)
  To: linux-i2c
  Cc: Wolfram Sang, Tony Lindgren, Lee Jones, linux-omap, linux-kernel
Move from i2c_new_dummy() to i2c_new_dummy_device(), so we now get an
ERRPTR which we use in error handling.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
Generated with coccinelle. Build tested by me and buildbot. Not tested on HW.
 drivers/mfd/twl-core.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
index 448d9397ff04..20cf8cfe4f3b 100644
--- a/drivers/mfd/twl-core.c
+++ b/drivers/mfd/twl-core.c
@@ -1141,12 +1141,12 @@ twl_probe(struct i2c_client *client, const struct i2c_device_id *id)
 		if (i == 0) {
 			twl->client = client;
 		} else {
-			twl->client = i2c_new_dummy(client->adapter,
+			twl->client = i2c_new_dummy_device(client->adapter,
 						    client->addr + i);
-			if (!twl->client) {
+			if (IS_ERR(twl->client)) {
 				dev_err(&client->dev,
 					"can't attach client %d\n", i);
-				status = -ENOMEM;
+				status = PTR_ERR(twl->client);
 				goto fail;
 			}
 		}
-- 
2.20.1
^ permalink raw reply related	[flat|nested] 5+ messages in thread* Re: [PATCH 14/14] mfd: twl-core: convert to i2c_new_dummy_device
  2019-07-22 17:26 ` [PATCH 14/14] mfd: twl-core: " Wolfram Sang
@ 2019-08-12  7:48   ` Lee Jones
  0 siblings, 0 replies; 5+ messages in thread
From: Lee Jones @ 2019-08-12  7:48 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c, Tony Lindgren, linux-omap, linux-kernel
On Mon, 22 Jul 2019, Wolfram Sang wrote:
> Move from i2c_new_dummy() to i2c_new_dummy_device(), so we now get an
> ERRPTR which we use in error handling.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
> 
> Generated with coccinelle. Build tested by me and buildbot. Not tested on HW.
> 
>  drivers/mfd/twl-core.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
Applied, thanks.
-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply	[flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-08-12  7:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-22 17:26 [PATCH 00/14] mfd: convert subsystem to i2c_new_dummy_device() Wolfram Sang
2019-07-22 17:26 ` [PATCH 13/14] mfd: palmas: convert to i2c_new_dummy_device Wolfram Sang
2019-08-12  7:48   ` Lee Jones
2019-07-22 17:26 ` [PATCH 14/14] mfd: twl-core: " Wolfram Sang
2019-08-12  7:48   ` Lee Jones
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).