Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp501806ybl; Tue, 7 Jan 2020 09:49:42 -0800 (PST) X-Google-Smtp-Source: APXvYqyd5QGIEDCFHLM4mK8YMJBrx1kZ62FoDLIb+c6OmNESOOGVzk1fDQuAZqq8bMXN333sNNL7 X-Received: by 2002:a9d:600e:: with SMTP id h14mr934915otj.113.1578419381927; Tue, 07 Jan 2020 09:49:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578419381; cv=none; d=google.com; s=arc-20160816; b=N6CvL5I3cZXe/mpeaowI53YxyavDztQxfM1xBea4kMlE+q2hGl1XTeHB0pum7ChBLg koQP5dv42bBm6LCkrWCPINDteAKRqy9Uh6+O77sap+v839bw8ZAjhKNU4QAeroqagQT4 PEuKeg98mFtd3WpjxLmlOXZtvd+ologV8m1UpG6ByCjMCHvoIxdBpfNPXy+xtTA7Fq0O 2WYdgeMGbNRqPyiuNepVHTPtLH0AMXf1LRX4YkIhlqGTapH1mOltQOxgDzr2Wt4fh1bu 8GdGjjXbJ3Q6HdItX/2rm9437AqWA2nlW99wIt5LAseSs6FtC2mPjHMeYm2aHO2DBnXA yXxA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=VYJQRovVlrOyL9otOmvqmEYJ+zKyRl+7VNeE4RmY3CY=; b=cgnl8eBiYTHkI0t2ZTRXNA0pz7QoRgxqsKMf2l1IhXJ8/wn9K6P0QhOldslMxicqeb FECqzJk7Mplyfga08xR0HWstOO7WyFeKo0cBlnawZ4alLynivUeiinUIEG4rtUrwkr15 IXnzvhaypzvVS5LCacUSOgoxBgFb71TTmaDtTYNJ8ibvMZ30GMzQZSB8t0dXGr2ptDoh +4TAck/JOfd7xuQ/MbV0cmjgvEEf1bDOU9F84OsnG9MpNc6iPCmzW8oIW3jeotYWRaNu RfI6xE8n6pYGkS+xrSAi1vtVt5cO4GuO/nY5CHRsegduNRIx5GNgS1WQfglXvBDfjyl8 qYDA== 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 b4si344534oiy.97.2020.01.07.09.49.29; Tue, 07 Jan 2020 09:49:41 -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 S1728596AbgAGRsX (ORCPT + 99 others); Tue, 7 Jan 2020 12:48:23 -0500 Received: from sauhun.de ([88.99.104.3]:53338 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728494AbgAGRsS (ORCPT ); Tue, 7 Jan 2020 12:48:18 -0500 Received: from localhost (p5486CF8B.dip0.t-ipconnect.de [84.134.207.139]) by pokefinder.org (Postfix) with ESMTPSA id 1B8B62C394D; Tue, 7 Jan 2020 18:48:17 +0100 (CET) From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: Wolfram Sang , Ajay Gupta , linux-kernel@vger.kernel.org Subject: [PATCH 03/12] i2c: nvidia-gpu: convert to use i2c_new_client_device() Date: Tue, 7 Jan 2020 18:47:37 +0100 Message-Id: <20200107174748.9616-4-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200107174748.9616-1-wsa+renesas@sang-engineering.com> References: <20200107174748.9616-1-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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-nvidia-gpu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-nvidia-gpu.c b/drivers/i2c/busses/i2c-nvidia-gpu.c index 5a1235fd86bb..62e18b4db0ed 100644 --- a/drivers/i2c/busses/i2c-nvidia-gpu.c +++ b/drivers/i2c/busses/i2c-nvidia-gpu.c @@ -280,9 +280,9 @@ static int gpu_populate_client(struct gpu_i2c_dev *i2cd, int irq) i2cd->gpu_ccgx_ucsi->addr = 0x8; i2cd->gpu_ccgx_ucsi->irq = irq; i2cd->gpu_ccgx_ucsi->properties = ccgx_props; - i2cd->ccgx_client = i2c_new_device(&i2cd->adapter, i2cd->gpu_ccgx_ucsi); - if (!i2cd->ccgx_client) - return -ENODEV; + i2cd->ccgx_client = i2c_new_client_device(&i2cd->adapter, i2cd->gpu_ccgx_ucsi); + if (IS_ERR(i2cd->ccgx_client)) + return PTR_ERR(i2cd->ccgx_client); return 0; } -- 2.20.1