From patchwork Fri Nov 18 22:38:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 22724 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp464049wrr; Fri, 18 Nov 2022 15:33:56 -0800 (PST) X-Google-Smtp-Source: AA0mqf7YwGTpcUcjJYGiciLdhy3K0P3/EFPB/MBxYHIek3KNEbdG+2T4lBJX6AnKWOgmQ0MuIY0u X-Received: by 2002:a17:906:eb54:b0:7ae:415:3fb5 with SMTP id mc20-20020a170906eb5400b007ae04153fb5mr7336671ejb.255.1668814436067; Fri, 18 Nov 2022 15:33:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668814436; cv=none; d=google.com; s=arc-20160816; b=BGVJWgD9gtD+uN4Mh5tH7FaMTPb4aTkoASRTHUKrGWrvjNkX/JjtwBG/kqgBMh7xv2 P3tQLpYmddQ6oe8C1/GHyPTZcMK6PTjuICO6eDaDizZJiQuSeIemfuX/bE+giroLGao1 UYUILeQfWV36+C/pMQ7aqE9yVgPOyM+U+n6FayeTbp4wBDWhqsSMGYIkQpEfM+wAf1X8 HV++JkSpp396DKQ09sWVwEaH6Jcn3MVD3Tc5rnokOraAndrQgAmg82gyQ8fsq7Vlq4KV br5bD35bT5i3J/w4NBx4t+S46TEzwUaxyyf/Kj8IV5dG9REsX7U+GSSvDfSecVVipFYu c6fQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=pcFU4R9nwaaKzGeK4otUl83NIPIBgOJ7QyvpwbJ0zAI=; b=nNoTi170/shPCXPeccPKNFNwX3CFnxI/9pz6a0NPd+BctbjjCY2wEsq/i9h2OuUMz+ XWW2hnuiLdvaUL8XTISxSgMS0UISV7jIw0Id3cRZqQ+5J3ea6Ibof080QEpoC/sJ6fTD Rf1LRjYWNsDlMw7DFv0bxzgEC1cNFSFcB/jD04K1kac+88UwstVkypjCvfqKFC/NaElU ZH+rtzQfwEn/BNTZgzG7pEghG0vnqAffpqEfCiUZ2949CKZEURZ4GlIZx93e6iAYulbT 5vV98D9p4MLh69JiqxP46ExL/sfw0FkSUWjuw5qyqKcM4RKdNnTiTudEbnKdleGu7l+M eJbw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hv20-20020a17090760d400b007ad8218a472si4106092ejc.242.2022.11.18.15.33.32; Fri, 18 Nov 2022 15:33:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235577AbiKRXbp (ORCPT + 99 others); Fri, 18 Nov 2022 18:31:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235963AbiKRXaX (ORCPT ); Fri, 18 Nov 2022 18:30:23 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A8B575D9A for ; Fri, 18 Nov 2022 15:18:14 -0800 (PST) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1owA8L-0001S8-4i; Fri, 18 Nov 2022 23:46:53 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1owA8H-0058MX-0X; Fri, 18 Nov 2022 23:46:49 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1owA8G-00Hb6w-Oi; Fri, 18 Nov 2022 23:46:48 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Angel Iglesias , Lee Jones , Grant Likely , Wolfram Sang , Crt Mori , Jonathan Cameron Cc: linux-i2c@vger.kernel.org, kernel@pengutronix.de, =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Lars-Peter Clausen , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 186/606] iio: temperature: mlx90632: Convert to i2c's .probe_new() Date: Fri, 18 Nov 2022 23:38:40 +0100 Message-Id: <20221118224540.619276-187-uwe@kleine-koenig.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221118224540.619276-1-uwe@kleine-koenig.org> References: <20221118224540.619276-1-uwe@kleine-koenig.org> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749878095915217732?= X-GMAIL-MSGID: =?utf-8?q?1749878766378991336?= From: Uwe Kleine-König .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König --- drivers/iio/temperature/mlx90632.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/iio/temperature/mlx90632.c b/drivers/iio/temperature/mlx90632.c index f1f5ebc145b1..19e30cfca8a7 100644 --- a/drivers/iio/temperature/mlx90632.c +++ b/drivers/iio/temperature/mlx90632.c @@ -1168,9 +1168,9 @@ static int mlx90632_enable_regulator(struct mlx90632_data *data) return ret; } -static int mlx90632_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static int mlx90632_probe(struct i2c_client *client) { + const struct i2c_device_id *id = i2c_client_get_device_id(client); struct mlx90632_data *mlx90632; struct iio_dev *indio_dev; struct regmap *regmap; @@ -1337,7 +1337,15 @@ static struct i2c_driver mlx90632_driver = { .of_match_table = mlx90632_of_match, .pm = pm_ptr(&mlx90632_pm_ops), }, +<<<<<<< ours .probe = mlx90632_probe, +||||||| base + .probe = mlx90632_probe, + .remove = mlx90632_remove, +======= + .probe_new = mlx90632_probe, + .remove = mlx90632_remove, +>>>>>>> theirs .id_table = mlx90632_id, }; module_i2c_driver(mlx90632_driver);