From patchwork Mon Jun 15 07:58:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 11604139 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8E51A913 for ; Mon, 15 Jun 2020 07:58:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 75C8B206D7 for ; Mon, 15 Jun 2020 07:58:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b="DyV8XvSE" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728902AbgFOH66 (ORCPT ); Mon, 15 Jun 2020 03:58:58 -0400 Received: from www.zeus03.de ([194.117.254.33]:49202 "EHLO mail.zeus03.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728845AbgFOH6e (ORCPT ); Mon, 15 Jun 2020 03:58:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=sang-engineering.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=k1; bh=yWGeIQMB5D8pAO 0LP5T88hiOoA5j2pcFLVejSajzQPc=; b=DyV8XvSEKw9fiteLuo6hRnnAfgG9gD vLWIh2CXAeSXS1UmpnaYV11Hh2oukO7EbnVllnIKgy2AlfX91BcMQpFWDjj6V1MM R7NqDxdrYnaP/JQ+3Akz3wwpE+4uc43prWQcr69MzjJ2+8cuUvVajuP4eXmjaGVs hn7Vw4zjXXkr8= Received: (qmail 989221 invoked from network); 15 Jun 2020 09:58:28 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 15 Jun 2020 09:58:28 +0200 X-UD-Smtp-Session: l3s3148p1@4KfPyhqoDLYgAwDPXwRdAFnN6pRlEuNX From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: Wolfram Sang , Andy Shevchenko , Darren Hart , Andy Shevchenko , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/6] x86/platform/intel-mid: convert to use i2c_new_client_device() Date: Mon, 15 Jun 2020 09:58:12 +0200 Message-Id: <20200615075816.2848-4-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200615075816.2848-1-wsa+renesas@sang-engineering.com> References: <20200615075816.2848-1-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 Sender: platform-driver-x86-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org Move away from the deprecated API and return the shiny new ERRPTR where useful. Signed-off-by: Wolfram Sang Reviewed-by: Andy Shevchenko --- I'd like to push it via I2C for 5.8-rc2. arch/x86/platform/intel-mid/sfi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/platform/intel-mid/sfi.c b/arch/x86/platform/intel-mid/sfi.c index b8f7f193f383..30bd5714a3d4 100644 --- a/arch/x86/platform/intel-mid/sfi.c +++ b/arch/x86/platform/intel-mid/sfi.c @@ -287,8 +287,8 @@ void intel_scu_devices_create(void) adapter = i2c_get_adapter(i2c_bus[i]); if (adapter) { - client = i2c_new_device(adapter, i2c_devs[i]); - if (!client) + client = i2c_new_client_device(adapter, i2c_devs[i]); + if (IS_ERR(client)) pr_err("can't create i2c device %s\n", i2c_devs[i]->type); } else