linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/14] mfd: convert subsystem to i2c_new_dummy_device()
@ 2019-07-22 17:26 Wolfram Sang
  2019-07-22 17:26 ` [PATCH 03/14] mfd: ab3100-core: convert to i2c_new_dummy_device Wolfram Sang
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfram Sang @ 2019-07-22 17:26 UTC (permalink / raw)
  To: linux-i2c; +Cc: Wolfram Sang, linux-omap, linux-kernel, linux-arm-kernel

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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 03/14] mfd: ab3100-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 ` Wolfram Sang
  2019-07-23  8:30   ` Linus Walleij
  2019-08-12  7:46   ` Lee Jones
  0 siblings, 2 replies; 4+ messages in thread
From: Wolfram Sang @ 2019-07-22 17:26 UTC (permalink / raw)
  To: linux-i2c
  Cc: Wolfram Sang, Linus Walleij, Lee Jones, linux-kernel,
	linux-arm-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/ab3100-core.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mfd/ab3100-core.c b/drivers/mfd/ab3100-core.c
index e350ab64238e..7e007df857b8 100644
--- a/drivers/mfd/ab3100-core.c
+++ b/drivers/mfd/ab3100-core.c
@@ -896,10 +896,10 @@ static int ab3100_probe(struct i2c_client *client,
 		 &ab3100->chip_name[0]);
 
 	/* Attach a second dummy i2c_client to the test register address */
-	ab3100->testreg_client = i2c_new_dummy(client->adapter,
+	ab3100->testreg_client = i2c_new_dummy_device(client->adapter,
 					       client->addr + 1);
-	if (!ab3100->testreg_client) {
-		err = -ENOMEM;
+	if (IS_ERR(ab3100->testreg_client)) {
+		err = PTR_ERR(ab3100->testreg_client);
 		goto exit_no_testreg_client;
 	}
 
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 03/14] mfd: ab3100-core: convert to i2c_new_dummy_device
  2019-07-22 17:26 ` [PATCH 03/14] mfd: ab3100-core: convert to i2c_new_dummy_device Wolfram Sang
@ 2019-07-23  8:30   ` Linus Walleij
  2019-08-12  7:46   ` Lee Jones
  1 sibling, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2019-07-23  8:30 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Lee Jones, linux-i2c, Linux ARM, linux-kernel@vger.kernel.org

On Mon, Jul 22, 2019 at 7:26 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> 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>

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 03/14] mfd: ab3100-core: convert to i2c_new_dummy_device
  2019-07-22 17:26 ` [PATCH 03/14] mfd: ab3100-core: convert to i2c_new_dummy_device Wolfram Sang
  2019-07-23  8:30   ` Linus Walleij
@ 2019-08-12  7:46   ` Lee Jones
  1 sibling, 0 replies; 4+ messages in thread
From: Lee Jones @ 2019-08-12  7:46 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: Linus Walleij, linux-i2c, linux-arm-kernel, 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/ab3100-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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2019-08-12  7:47 UTC | newest]

Thread overview: 4+ 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 03/14] mfd: ab3100-core: convert to i2c_new_dummy_device Wolfram Sang
2019-07-23  8:30   ` Linus Walleij
2019-08-12  7:46   ` 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).