From patchwork Fri Nov 18 22:36:48 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: 23141 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp488493wrr; Fri, 18 Nov 2022 16:46:07 -0800 (PST) X-Google-Smtp-Source: AA0mqf6/0RnhqQD3RQr69b2Av8iytPXG9G1tQC7ItSlt0ty1tKSWaQsMB4YgaEBZLewcsuOgSBxE X-Received: by 2002:a17:903:2452:b0:188:edd2:317f with SMTP id l18-20020a170903245200b00188edd2317fmr1902097pls.127.1668818766932; Fri, 18 Nov 2022 16:46:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668818766; cv=none; d=google.com; s=arc-20160816; b=DLj0b08ERuidbWX+ttYT5YLl1tnLGroqq+QDiNPSXXunS6DMHmdZdp6CU67lt3sXab hpA69Rq4a0VtEcYLeqPGYq62EeA/ev/VSaKFPlOdQhyqEH+xXKUglgKCpcfbeDWQ/9l8 KOrr2NsfIoWIvr+uJXmLoQ0grYi2PvPybDBPRtu2SBkAcAtVXub4g86lAJbFRgjJFg7d K4G5upt4Hff2TMY2QoYVZvqn16T4Q1r9/RYwJtSzFzlnU5qoGtKXHx0UMp2mmsa0ExPk FrBMrYC/At2s75DOfhFG9I8HeIKtz4yoq81xrGv5viJyZX2AORS6MhvjkqbYMzuQvI2l IVFA== 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=X99CUekQlMMfpXWTo6mSbuO9SRyuqLGGCoLd4yK/fC8=; b=bH9nJZz+MqTQjGUqJVxvj9RC/838WihJ/PWgWKJzss4+YI1TEKdR3r9rssuNcZq846 SDmYE3xw609gIEUsSbKbxvQ9zliHYn/wUn33joChcGFESQFMY1KFsRU1NeZQkLegQ3P8 7aNakt7/cWPlbmo6SgLxipQJu49L+sudm6eOAy743dpRDRb7RzD2RQk818yy8DkAdkak 8pZYw6nxBaoXHThAz8JlAveuMPmFrWJ0vqIP74Oa161XiQch3wrQ9aQufo4Uz9F/7Nzu kt7VhVJAFQjWhOoLgMIU1oKSbVFToJbPFTC6J9t4RNvUmxdoodspsGGBSmriuQH3jWWH zniQ== 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 d20-20020a056a00199400b005618039550fsi5243523pfl.271.2022.11.18.16.45.51; Fri, 18 Nov 2022 16:46:06 -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 S235896AbiKSAkr (ORCPT + 99 others); Fri, 18 Nov 2022 19:40:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233142AbiKSAjX (ORCPT ); Fri, 18 Nov 2022 19:39: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 478CC240AB for ; Fri, 18 Nov 2022 15:44:28 -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 1owA7w-0008Cm-N4; Fri, 18 Nov 2022 23:46:28 +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 1owA7r-0058DC-L3; Fri, 18 Nov 2022 23:46:24 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1owA7r-00Haza-6r; Fri, 18 Nov 2022 23:46:23 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Angel Iglesias , Lee Jones , Grant Likely , Wolfram Sang , Jonathan Cameron , Andy Shevchenko 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 074/606] iio: chemical: atlas-ezo-sensor: Convert to i2c's .probe_new() Date: Fri, 18 Nov 2022 23:36:48 +0100 Message-Id: <20221118224540.619276-75-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?1749883307682092918?= X-GMAIL-MSGID: =?utf-8?q?1749883307682092918?= 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/chemical/atlas-ezo-sensor.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/iio/chemical/atlas-ezo-sensor.c b/drivers/iio/chemical/atlas-ezo-sensor.c index bbcf5a59c1f4..307c3488f4bd 100644 --- a/drivers/iio/chemical/atlas-ezo-sensor.c +++ b/drivers/iio/chemical/atlas-ezo-sensor.c @@ -201,9 +201,9 @@ static const struct of_device_id atlas_ezo_dt_ids[] = { }; MODULE_DEVICE_TABLE(of, atlas_ezo_dt_ids); -static int atlas_ezo_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static int atlas_ezo_probe(struct i2c_client *client) { + const struct i2c_device_id *id = i2c_client_get_device_id(client); const struct atlas_ezo_device *chip; struct atlas_ezo_data *data; struct iio_dev *indio_dev; @@ -238,7 +238,7 @@ static struct i2c_driver atlas_ezo_driver = { .name = ATLAS_EZO_DRV_NAME, .of_match_table = atlas_ezo_dt_ids, }, - .probe = atlas_ezo_probe, + .probe_new = atlas_ezo_probe, .id_table = atlas_ezo_id, }; module_i2c_driver(atlas_ezo_driver);