2020-03-26 21:12:05

by Wolfram Sang

[permalink] [raw]
Subject: [PATCH 1/1] ARM: mach-s3c64xx: convert to use i2c_new_client_device()

Move away from the deprecated API and remove printing a stale 'ret'
value.

Signed-off-by: Wolfram Sang <[email protected]>
---
arch/arm/mach-s3c64xx/mach-crag6410-module.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-s3c64xx/mach-crag6410-module.c b/arch/arm/mach-s3c64xx/mach-crag6410-module.c
index 937d0a83f8fd..34f1baa10c54 100644
--- a/arch/arm/mach-s3c64xx/mach-crag6410-module.c
+++ b/arch/arm/mach-s3c64xx/mach-crag6410-module.c
@@ -405,10 +405,9 @@ static int wlf_gf_module_probe(struct i2c_client *i2c,
gf_mods[i].name, rev + 1);

for (j = 0; j < gf_mods[i].num_i2c_devs; j++) {
- if (!i2c_new_device(i2c->adapter,
- &(gf_mods[i].i2c_devs[j])))
- dev_err(&i2c->dev,
- "Failed to register dev: %d\n", ret);
+ if (IS_ERR(i2c_new_client_device(i2c->adapter,
+ &(gf_mods[i].i2c_devs[j]))))
+ dev_err(&i2c->dev, "Failed to register\n");
}

spi_register_board_info(gf_mods[i].spi_devs,
--
2.20.1


2020-03-27 11:51:56

by Charles Keepax

[permalink] [raw]
Subject: Re: [PATCH 1/1] ARM: mach-s3c64xx: convert to use i2c_new_client_device()

On Thu, Mar 26, 2020 at 10:10:14PM +0100, Wolfram Sang wrote:
> Move away from the deprecated API and remove printing a stale 'ret'
> value.
>
> Signed-off-by: Wolfram Sang <[email protected]>
> ---

Acked-by: Charles Keepax <[email protected]>

Thanks,
Charles

2020-04-14 01:06:52

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 1/1] ARM: mach-s3c64xx: convert to use i2c_new_client_device()

On Thu, Mar 26, 2020 at 10:10:14PM +0100, Wolfram Sang wrote:
> Move away from the deprecated API and remove printing a stale 'ret'
> value.
>
> Signed-off-by: Wolfram Sang <[email protected]>
> ---
> arch/arm/mach-s3c64xx/mach-crag6410-module.c | 7 +++----

Thanks, applied.

Best regards,
Krzysztof