From patchwork Fri Nov 18 22:38:30 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: 22649 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp460571wrr; Fri, 18 Nov 2022 15:24:41 -0800 (PST) X-Google-Smtp-Source: AA0mqf5GE8drUGTRHlz4nc3hW7KgiI2zJz24tXkKb5xgIgHB36CvB6gsmscv7yQaiZ54pXK3sjf9 X-Received: by 2002:a05:6402:5299:b0:461:7291:79c1 with SMTP id en25-20020a056402529900b00461729179c1mr8195404edb.68.1668813881324; Fri, 18 Nov 2022 15:24:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668813881; cv=none; d=google.com; s=arc-20160816; b=hMKb2vu4A46ioJKht6YhXJUtlQfz75nKRkUjeoMR9xJzQ1MacpD2V6dvWBW5QXjcuo OYXtzN10RyBFpYDs79EATo+pjUrEuLYM4+yL/72AxtmqTq4ggUZjxnGUkPV4X54aOo2Q tib6xy/Zzqe9TSBnta4XylrXLbcR6eUODKaoivgVsS1F1H3TpnmQ5uu3tdK8xQdWercx zloG1zT8Pjo8JjdwZwMHrB6hVPPMIq4hCuW7acIA/soRisV6C/tSo/dl9uY0xWONWbtN 2slZFNaaMGsUq7NOh3WaRC4phC5NonU6Pq3oue1p7twcy33qK2/42IeH80jU3hIjw/ca 6/Hw== 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=uNag0u5hPAUZ2tcLhQwiR4fDC0t16GdxwwdNrwf6Wf4=; b=FxJk7FZsS/0Wb/iH/2e/X149/wgU5Nmdzye50+fInkCRPsIKcXxujQM2DBO/ElI3mn +IKY54+Zu8UUMvDllPOc9NMAXmSS3Er0YHTHCF1/GV6pjNxWJNFU2xtTXu+GIGZugX6c xnx6O4vXcgkIFl7hwBp5KWWXtYz9jnnb0eJGrjAErYGQGm5RDb5ewRzR47nY47+DNWGW 5tQzzYVLuD9jSleQBMgg54eId8YFQTqwE29xaxuS+JiafbMESmHV3mtX1EZENRwaeRfg 5UhiFy06ScuU0xlxxLGgYeM0Gb3Efguj23FNmjM4wKFf/tWrjPmc8IClANpjNqmBGq2+ v+/g== 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 y10-20020a056402440a00b004637e92aa81si4838250eda.355.2022.11.18.15.24.14; Fri, 18 Nov 2022 15:24:41 -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 S235278AbiKRXXQ (ORCPT + 99 others); Fri, 18 Nov 2022 18:23:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235311AbiKRXVN (ORCPT ); Fri, 18 Nov 2022 18:21:13 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [85.220.165.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F321E5215D for ; Fri, 18 Nov 2022 15:12:29 -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 1owA8H-0001FU-PM; Fri, 18 Nov 2022 23:46:49 +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 1owA8D-0058Lc-QR; Fri, 18 Nov 2022 23:46:46 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1owA8D-00Hb6J-V2; Fri, 18 Nov 2022 23:46:45 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Angel Iglesias , Lee Jones , Grant Likely , Wolfram Sang , Jonathan Cameron , Martyn Welch 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 176/606] iio: pressure: st_pressure_i2c: Convert to i2c's .probe_new() Date: Fri, 18 Nov 2022 23:38:30 +0100 Message-Id: <20221118224540.619276-177-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?1749878184239699999?= X-GMAIL-MSGID: =?utf-8?q?1749878184239699999?= From: Uwe Kleine-König The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König --- drivers/iio/pressure/st_pressure_i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/iio/pressure/st_pressure_i2c.c b/drivers/iio/pressure/st_pressure_i2c.c index 58fede861891..f2c3bb568d16 100644 --- a/drivers/iio/pressure/st_pressure_i2c.c +++ b/drivers/iio/pressure/st_pressure_i2c.c @@ -76,8 +76,7 @@ static const struct i2c_device_id st_press_id_table[] = { }; MODULE_DEVICE_TABLE(i2c, st_press_id_table); -static int st_press_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static int st_press_i2c_probe(struct i2c_client *client) { const struct st_sensor_settings *settings; struct st_sensor_data *press_data; @@ -117,7 +116,7 @@ static struct i2c_driver st_press_driver = { .of_match_table = st_press_of_match, .acpi_match_table = ACPI_PTR(st_press_acpi_match), }, - .probe = st_press_i2c_probe, + .probe_new = st_press_i2c_probe, .id_table = st_press_id_table, }; module_i2c_driver(st_press_driver);