From patchwork Fri Nov 18 22:37:17 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: 22687 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp462307wrr; Fri, 18 Nov 2022 15:29:47 -0800 (PST) X-Google-Smtp-Source: AA0mqf7DP2AoXsvBP3BeOk7mH3sGCr5q6gT+EugpXBdVtXW7dsubxYKjg4LWD2pPmdULgP8y1nUR X-Received: by 2002:a17:906:541:b0:7b2:8431:6d75 with SMTP id k1-20020a170906054100b007b284316d75mr7893653eja.329.1668814186971; Fri, 18 Nov 2022 15:29:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668814186; cv=none; d=google.com; s=arc-20160816; b=lhsYpv1Jd1NRSilObXCvEhn2nYPqwwk7lEK9uNvaoagtQaRr52QUUlP3C/EkYd12/b ieBk4Keutq+vCQ+z8xNJ0heZSng2hyQOF2Cx+JCWpPWu2I8xGKMi6Vl5ypcy8NZW+tmT eM6sjSdU86vH/O8Vve4L4gcv27gS2YM40Exe+dXVYoO9/Sx50/O2HGsymguVPYvP1/Tc sNVjt6/UY9JtR98ymm5Xb8SSZwEvWYUMe1i6bxbAL3kL5eltCEfoU6qY9mPapoDr5xUW dhLl2Frz2Umn/rFvJ73IwSEo9LbZvtYWUgNSAJIOIl3M/wgi0y0hPwVt071fhXK7JS1H 2FiQ== 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=R4qpGNzHsR9aIrUzshemLVP1VW6+YB56wxJxNieieq8=; b=AFb/hrMpRRtuD/FMOAXDGRQRofENL7PVoVxul6JzPEiAYbxbUGhy/FACYcWeoEEK+y hCdg2GALEtZ93L32DEgrl6r7X9q5VfG5T99y6WFT5ZVFVPUdCTWx6ityZykvNifYQ6lm WEJ+qZWfFrpIyuFvO1JPOVORgkF3PzO5uNh3a3wFYu/ePe/ptUDYYhcDYf90vkxOX7pD j6/B4PKMDyPrnneWlVTiz/Aw6PHuV7sRqS6SwyicpPHSs7VTxjBNREn5v3ciD1uCDaV9 U3utrUTLoMGhmNUn+/kHhpBq5usK1fiIpCBtl+CaoBPXDAniUxKCLfTU7eJP4ZgDF7iL aAWw== 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 y8-20020a056402134800b004617551556csi3780575edw.128.2022.11.18.15.29.22; Fri, 18 Nov 2022 15:29:46 -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 S235796AbiKRX2q (ORCPT + 99 others); Fri, 18 Nov 2022 18:28:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235715AbiKRX2J (ORCPT ); Fri, 18 Nov 2022 18:28:09 -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 3A08D2B3 for ; Fri, 18 Nov 2022 15:16:00 -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 1owA82-0000Ce-AD; Fri, 18 Nov 2022 23:46:34 +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 1owA7x-0058Fc-H9; Fri, 18 Nov 2022 23:46:30 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1owA7x-00Hb1Y-N5; Fri, 18 Nov 2022 23:46:29 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Angel Iglesias , Lee Jones , Grant Likely , Wolfram Sang , Lorenzo Bianconi , 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 103/606] iio: humidity: hts221_i2c: Convert to i2c's .probe_new() Date: Fri, 18 Nov 2022 23:37:17 +0100 Message-Id: <20221118224540.619276-104-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?1749878504666664607?= X-GMAIL-MSGID: =?utf-8?q?1749878504666664607?= 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/humidity/hts221_i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/iio/humidity/hts221_i2c.c b/drivers/iio/humidity/hts221_i2c.c index afbc611f7712..d81869423cf0 100644 --- a/drivers/iio/humidity/hts221_i2c.c +++ b/drivers/iio/humidity/hts221_i2c.c @@ -25,8 +25,7 @@ static const struct regmap_config hts221_i2c_regmap_config = { .read_flag_mask = HTS221_I2C_AUTO_INCREMENT, }; -static int hts221_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static int hts221_i2c_probe(struct i2c_client *client) { struct regmap *regmap; @@ -66,7 +65,7 @@ static struct i2c_driver hts221_driver = { .of_match_table = hts221_i2c_of_match, .acpi_match_table = ACPI_PTR(hts221_acpi_match), }, - .probe = hts221_i2c_probe, + .probe_new = hts221_i2c_probe, .id_table = hts221_i2c_id_table, }; module_i2c_driver(hts221_driver);