Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp502366ybl; Tue, 7 Jan 2020 09:50:22 -0800 (PST) X-Google-Smtp-Source: APXvYqxn6+IwzXk+LkIPHmoqhsm6FBws2bmfiizPZNLlaqa9na7oTGBO8T3tGQTNy9ZBGP6uRBly X-Received: by 2002:a9d:6b03:: with SMTP id g3mr988597otp.200.1578419422101; Tue, 07 Jan 2020 09:50:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578419422; cv=none; d=google.com; s=arc-20160816; b=q/WtCWpPZpeU5NRjzBuCxrTxJTjNdGEfPCVbbTzi7/sCbQRWX2dbMgJH/2o9WVZ9CK ZwCKVr9ry0iRie/U5Rx0nczaMGcTN3icOsJsqF8q0wQA5fXo4z1LgAaBOYH8ULI9m7/a EYZgd37KVBEKvRSZiDLxmE+OiWwSElF0y3SSDY/iTXcUHqt/N6aBFodR9s4tTYQ8REBY W7SS3yUIBGAHm9Ngg631iKgfYt+VvGM2fo1zFbKp0tbOImY4KTJ8Ewz5gNwKaTuOmGm6 XbrH84RvGyR/LapDabLdMfhwjZUshLeG5hHICyM3jKO3cz/iuKGYfT+l9AqgrtBfcAjm hW/Q== 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=Uw8dsTCNC297D952xB0cy5X9aopSS9QunaNJPTrtEGc=; b=A5HCyuozEDelLm+vG7hNOsY3SlfEcQpA3cjDsFRORSwGBsAuQBwTkJk8RQrH6w0rsy vjMqOZRtNgc+4ibv3oshGiea21DKZqg1HTP02wAsHsAQ8uUMGlEMTwEq8bIhKKIvPaM1 /VNWxOB/ZV5E0yaXWiBif5e+7Ftpeo6hn4+9kXP7FUpNArPHuLE3s9SMC6Ob5rAKssV5 Y13NHHUemYr4QlHEp/Zx+RTofTpVtj5IG9HHlX4H4iw9RgNzK5VOOIldja6sBcxPEVOW X4NoIe5CMIXBjrSPT7RpeB5DGojAwamEZGbAtPKI62jCxLj/rsgjSBkJ3O1gjZ4Gwkre vuJw== 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 b25si239224otp.212.2020.01.07.09.50.09; Tue, 07 Jan 2020 09:50:22 -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 S1728569AbgAGRsV (ORCPT + 99 others); Tue, 7 Jan 2020 12:48:21 -0500 Received: from sauhun.de ([88.99.104.3]:53350 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728553AbgAGRsU (ORCPT ); Tue, 7 Jan 2020 12:48:20 -0500 Received: from localhost (p5486CF8B.dip0.t-ipconnect.de [84.134.207.139]) by pokefinder.org (Postfix) with ESMTPSA id 3D5822C3951; Tue, 7 Jan 2020 18:48:18 +0100 (CET) From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: Wolfram Sang , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH 05/12] i2c: powermac: convert to use i2c_new_client_device() Date: Tue, 7 Jan 2020 18:47:39 +0100 Message-Id: <20200107174748.9616-6-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-powermac.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/i2c/busses/i2c-powermac.c b/drivers/i2c/busses/i2c-powermac.c index 504f5bf0e625..973e5339033c 100644 --- a/drivers/i2c/busses/i2c-powermac.c +++ b/drivers/i2c/busses/i2c-powermac.c @@ -240,8 +240,8 @@ static void i2c_powermac_create_one(struct i2c_adapter *adap, strncpy(info.type, type, sizeof(info.type)); info.addr = addr; - newdev = i2c_new_device(adap, &info); - if (!newdev) + newdev = i2c_new_client_device(adap, &info); + if (IS_ERR(newdev)) dev_err(&adap->dev, "i2c-powermac: Failure to register missing %s\n", type); @@ -359,8 +359,8 @@ static void i2c_powermac_register_devices(struct i2c_adapter *adap, info.irq = irq_of_parse_and_map(node, 0); info.of_node = of_node_get(node); - newdev = i2c_new_device(adap, &info); - if (!newdev) { + newdev = i2c_new_client_device(adap, &info); + if (IS_ERR(newdev)) { dev_err(&adap->dev, "i2c-powermac: Failure to register" " %pOF\n", node); of_node_put(node); -- 2.20.1