Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp633267ybl; Wed, 8 Jan 2020 03:20:39 -0800 (PST) X-Google-Smtp-Source: APXvYqz8LY+JAjAP0mLBF9kziD5EfDwuTbSUpR4YLqARpHqbipR2L3NiH4tJBmF3zAsDIQUrAqMR X-Received: by 2002:a9d:7586:: with SMTP id s6mr3711429otk.342.1578482438996; Wed, 08 Jan 2020 03:20:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578482438; cv=none; d=google.com; s=arc-20160816; b=ihxePRLj+B0grrD4F79APoSF6cYbfhDQng6D/DCIXKFxRs0hIyGqMfKQVNVZUMhHsj JV7RypkNgUargr36l6HU/GP0r21YUaQZPUcZZ+HMVEpy5wUqXHW6T1pyYr7k2NuS0CCB XRsBsNCZ2L0Zs9E2UY9piFYmHgiFZxIkDAjgoAeamsySJOATDT0HyKiesx8mFquoRoF/ YcjyNW9nhmpIb7WgpRqTILp+PKsEgqumcpK4YmGH5qMJFD2L+S4uLDlGIGnb+0ScjzGz skljfZZ4v5l72z53su6pv52pM5MvKORUlpA6neRuBQ+b2uIc68JdP8JRlWzNJvKZ4mno GQRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=t2S7Wyibsqo15plnlLUdPkhl/UTmWtLYN4cDS3r5yEs=; b=btO8qaj700jTTpZWx++fNJtkmtvAwqGh6rb/z81uzyKWIsBO/1zruTxMF3MnIN/UPw eDXhxoYzgtRAq5Ag3nEgKA0iz3XlIyZ6skafF35Qthhbkxp41+24GBG6DyALbp8Ru5fI twnfzXskHzMIXUUuCVTqCTG4ifQ6eWcJOc7zwArOdoZ5zHEXXXc8G4CkaPA2X336XNDs EEi4/EPycp13hKIMniyZ7dLy8PgBjVqKTgXMceLqUGnKVNzr02b2atXu0naKjVhOes4+ 4pV3LNEmii9zjpset+wgzIUkiIH9Gpx6RCJMwaJRHjBdbaw7DnkdM0O1h/86pZJ2QbXY dqMA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l20si1646993otr.227.2020.01.08.03.20.27; Wed, 08 Jan 2020 03:20:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727630AbgAHK6Z (ORCPT + 99 others); Wed, 8 Jan 2020 05:58:25 -0500 Received: from mx2.suse.de ([195.135.220.15]:34348 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726290AbgAHK6Z (ORCPT ); Wed, 8 Jan 2020 05:58:25 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 582E2AD54; Wed, 8 Jan 2020 10:58:23 +0000 (UTC) Date: Wed, 8 Jan 2020 11:58:22 +0100 From: Jean Delvare To: Wolfram Sang Cc: , Subject: Re: [PATCH 06/12] i2c: taos-evm: convert to use i2c_new_client_device() Message-ID: <20200108115822.20871d77@endymion> In-Reply-To: <20200107174748.9616-7-wsa+renesas@sang-engineering.com> References: <20200107174748.9616-1-wsa+renesas@sang-engineering.com> <20200107174748.9616-7-wsa+renesas@sang-engineering.com> Organization: SUSE Linux X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Wolfram, On Tue, 7 Jan 2020 18:47:40 +0100, Wolfram Sang wrote: > Move away from the deprecated API and return the shiny new ERRPTR where > useful. > > Signed-off-by: Wolfram Sang > --- > Build tested only. > > drivers/i2c/busses/i2c-taos-evm.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/i2c/busses/i2c-taos-evm.c b/drivers/i2c/busses/i2c-taos-evm.c > index 0bff3f3a8779..b4050f5b6746 100644 > --- a/drivers/i2c/busses/i2c-taos-evm.c > +++ b/drivers/i2c/busses/i2c-taos-evm.c > @@ -49,10 +49,10 @@ static struct i2c_client *taos_instantiate_device(struct i2c_adapter *adapter) > if (!strncmp(adapter->name, "TAOS TSL2550 EVM", 16)) { > dev_info(&adapter->dev, "Instantiating device %s at 0x%02x\n", > tsl2550_info.type, tsl2550_info.addr); > - return i2c_new_device(adapter, &tsl2550_info); > + return i2c_new_client_device(adapter, &tsl2550_info); > } > > - return NULL; > + return ERR_PTR(-ENODEV); > } > > static int taos_smbus_xfer(struct i2c_adapter *adapter, u16 addr, Looks good to me, although ideally the caller should handle the error instead of ignoring it. But that's out of scope for this conversion patch, I'll look into submitting an update on top. So: Reviewed-by: Jean Delvare I'll also try to revive my evaluation module to give it some testing. Thanks, -- Jean Delvare SUSE L3 Support