lkml.org 
[lkml]   [2020]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 01/12] i2c: cht-wc: convert to use i2c_new_client_device()
From
Date
Hi,

On 07-01-2020 18:47, Wolfram Sang wrote:
> Move away from the deprecated API and return the shiny new ERRPTR where
> useful.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> > ---
> Build tested only.

I've given this a quick test spin on hw which uses this drivers,
I've not noticed any regressions:

Tested-by: Hans de Goede <hdegoede@redhat.com>

Also the changes look good to me:

Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans


>
> drivers/i2c/busses/i2c-cht-wc.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-cht-wc.c b/drivers/i2c/busses/i2c-cht-wc.c
> index b8fde61bb5d8..35e55feda763 100644
> --- a/drivers/i2c/busses/i2c-cht-wc.c
> +++ b/drivers/i2c/busses/i2c-cht-wc.c
> @@ -388,9 +388,9 @@ static int cht_wc_i2c_adap_i2c_probe(struct platform_device *pdev)
> */
> if (acpi_dev_present("INT33FE", NULL, -1)) {
> board_info.irq = adap->client_irq;
> - adap->client = i2c_new_device(&adap->adapter, &board_info);
> - if (!adap->client) {
> - ret = -ENOMEM;
> + adap->client = i2c_new_client_device(&adap->adapter, &board_info);
> + if (IS_ERR(adap->client)) {
> + ret = PTR_ERR(adap->client);
> goto del_adapter;
> }
> }
>

\
 
 \ /
  Last update: 2020-01-10 00:06    [W:0.118 / U:4.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site