From patchwork Fri Nov 18 22:38:42 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: 22823 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp471264wrr; Fri, 18 Nov 2022 15:56:18 -0800 (PST) X-Google-Smtp-Source: AA0mqf4PZ1SAswM8ZnfaSqmwzEII0sMHHXoMtv37y6nWuAFdu/PULYqJn0odg7p0/BFUqOU6gYvX X-Received: by 2002:a17:906:d8ad:b0:7ae:9187:eb70 with SMTP id qc13-20020a170906d8ad00b007ae9187eb70mr7334722ejb.533.1668815778439; Fri, 18 Nov 2022 15:56:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668815778; cv=none; d=google.com; s=arc-20160816; b=tatBshlP+dO23DpC5cPTXZOl7W99i0L92hCy/atl8yfMsu1w69gS2ve6G4UMv7PXq6 qXNYpiMV79GAcC1LqpjfBX7kxIJb66sM+ONZIaY9Uf/S51qfQCFDw8lCpFGYzmm7TWow oNuZFgzDA6zSKNrsMrMSk+gF20+fO7S9Ho3S+aOZrpn2IUclHFugf+6z6GziK/5ax9Jc 8C643Ww2vqZ8kBe8NSDDcuQdf9jCDpWLFUkggsUnJRxpefftRpUSWThlBeIi594DuwRg 110SKGIWxRG4vXtPLB5S5M0c4AjOGWnWAIWdqXOzy7wQbrX+su6ytbPCUGijHA+o4n1P WJ8g== 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=3a4ypwsoJU0OiT2uFRSovjopr41Y7mX9dgADFmmIYgc=; b=wd0priVd9ELg5uwQEmLAdKFbqf7gOk0k6HYxGiL9KFDnviebgWPFeWwvN3VFxfex37 5S072zOUY9l/zK54S2hasz3jfo0AFfO3rq7YoFxchewwDcb0RSvcmAz6Q19rpCeT90I0 MqNd3pFtrsxyvu4b8KhvszKp6TRU4aiqvWh8xRNzYarlSXjwXJu9AUbPpAx5Ft6wcnAi olkVPuWKKwIh4O4uOVBLntjECz//iUH6B8VGYwzoYbDqaiLB9mPW+1vMUDTKM1/q9dg6 my/HV5btFeOf7RNYwedxO7KMorZmYbBmzAP5eIrS0zfdjKO/kQSqrnA0cceYZxb5OiBu DkXg== 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 cw7-20020a170906478700b007ae8b1704b9si4730576ejc.406.2022.11.18.15.55.54; Fri, 18 Nov 2022 15:56:18 -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 S236763AbiKRXnZ (ORCPT + 99 others); Fri, 18 Nov 2022 18:43:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236853AbiKRXmA (ORCPT ); Fri, 18 Nov 2022 18:42:00 -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 16197C68BB for ; Fri, 18 Nov 2022 15:23:15 -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-0001U0-CS; 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-0058Mh-Gc; Fri, 18 Nov 2022 23:46:50 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1owA8H-00Hb73-98; Fri, 18 Nov 2022 23:46:49 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Angel Iglesias , Lee Jones , Grant Likely , Wolfram Sang , Jonathan Cameron , Paul Cercueil , Manivannan Sadhasivam 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 188/606] iio: temperature: tmp007: Convert to i2c's .probe_new() Date: Fri, 18 Nov 2022 23:38:42 +0100 Message-Id: <20221118224540.619276-189-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?1749880173920473266?= X-GMAIL-MSGID: =?utf-8?q?1749880173920473266?= 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/tmp007.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/iio/temperature/tmp007.c b/drivers/iio/temperature/tmp007.c index f3420d8a0e35..8d27aa3bdd6d 100644 --- a/drivers/iio/temperature/tmp007.c +++ b/drivers/iio/temperature/tmp007.c @@ -446,9 +446,9 @@ static void tmp007_powerdown_action_cb(void *priv) tmp007_powerdown(data); } -static int tmp007_probe(struct i2c_client *client, - const struct i2c_device_id *tmp007_id) +static int tmp007_probe(struct i2c_client *client) { + const struct i2c_device_id *tmp007_id = i2c_client_get_device_id(client); struct tmp007_data *data; struct iio_dev *indio_dev; int ret; @@ -574,7 +574,7 @@ static struct i2c_driver tmp007_driver = { .of_match_table = tmp007_of_match, .pm = pm_sleep_ptr(&tmp007_pm_ops), }, - .probe = tmp007_probe, + .probe_new = tmp007_probe, .id_table = tmp007_id, }; module_i2c_driver(tmp007_driver);