Received: by 2002:a17:90a:1609:0:0:0:0 with SMTP id n9csp2377143pja; Thu, 26 Mar 2020 14:14:13 -0700 (PDT) X-Google-Smtp-Source: ADFU+vt8tL8S7SnHVM2YAiAKuR8d8NbT8ARjARaR4KFisFB7uMLIo9sl/HIi9Pzfg/QylWYOSmkP X-Received: by 2002:aca:ab16:: with SMTP id u22mr1643863oie.133.1585257253607; Thu, 26 Mar 2020 14:14:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585257253; cv=none; d=google.com; s=arc-20160816; b=pJ2V9zKlBhmUhkua6Ixd+LNJ4CdnSqZdAwVfCDW9QoUwTNGqtbecWJjMcqi9GdNLWH UxMN44ueiWO4/fjHUK7snUO2Vy/OeRaGC5yABvYM2Pf/ZRyZEu6aLBHMa10r9Q7+HDEK +TEJHVdij52+r4pofZGRbzuQ+jhtavlMU5eCQ9rKuxp4C6nEuf7LGjM0XU9ESYxuElES Es/A0MoRWn2z6s+bhG+MEFD6Sxm9e1FSmgrupn3VVdDTOPHlbXc2jSfabMZwjFoMdw2n fU+1CuanX1uorNQc5Fz4JCJIX/7RZokITYEnFwIb44gE2mhVvQrEvnB3ueEIy/m7Tj1D EMLA== 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=LajVmWFNK2fLBBbnQDL5oDvJ3MHG+BiboEtrS3JuSYI=; b=vsRif0pYviNiHVmEvuX20XLnXuAlGEarYPev2KgOvA/E/BH3KVGszjFJ3pJz/Z93fv pCOg230slueJ3DwgMxp2JUwoL0v/slzzNtv9mF0OfjTo6DJZDjscKmqsCwazZfkXhWr2 hzEHCqK2XJfgWIZCXfSOS0LPAUwrINV+g05jRJ1vzyjD9B/kioBMYkIeT6StDVDOGDjT s1H4hp9Pvd4liOLr6Bg3niguamuJKhnfQ86SXfjbKIEX8nUu3VgentC/JzWEtLg+9b1O pJ5SbEO8gl0YyxOeoFtWCZM6k0lc9OtevU0yA/2yNvzjzZh5tsOFNfchlkBdJieNtFjp f6vg== 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 l131si1471658oih.10.2020.03.26.14.14.01; Thu, 26 Mar 2020 14:14:13 -0700 (PDT) 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 S1728096AbgCZVMN (ORCPT + 99 others); Thu, 26 Mar 2020 17:12:13 -0400 Received: from sauhun.de ([88.99.104.3]:54372 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727806AbgCZVJ7 (ORCPT ); Thu, 26 Mar 2020 17:09:59 -0400 Received: from localhost (p54B3331F.dip0.t-ipconnect.de [84.179.51.31]) by pokefinder.org (Postfix) with ESMTPSA id 8B2B82C1F87; Thu, 26 Mar 2020 22:09:57 +0100 (CET) From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: Wolfram Sang , Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/1] iio: imu: inv_mpu6050: convert to use i2c_new_client_device() Date: Thu, 26 Mar 2020 22:09:55 +0100 Message-Id: <20200326210955.12991-2-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200326210955.12991-1-wsa+renesas@sang-engineering.com> References: <20200326210955.12991-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 --- drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c index 2f8560ba4572..c27d06035c8b 100644 --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c @@ -135,6 +135,7 @@ int inv_mpu_acpi_create_mux_client(struct i2c_client *client) st->mux_client = NULL; if (ACPI_HANDLE(&client->dev)) { struct i2c_board_info info; + struct i2c_client *mux_client; struct acpi_device *adev; int ret = -1; @@ -172,9 +173,10 @@ int inv_mpu_acpi_create_mux_client(struct i2c_client *client) } else return 0; /* no secondary addr, which is OK */ } - st->mux_client = i2c_new_device(st->muxc->adapter[0], &info); - if (!st->mux_client) - return -ENODEV; + mux_client = i2c_new_client_device(st->muxc->adapter[0], &info); + if (IS_ERR(mux_client)) + return PTR_ERR(mux_client); + st->mux_client = mux_client; } return 0; -- 2.20.1