From patchwork Fri Nov 18 22:38:34 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: 22886 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp472306wrr; Fri, 18 Nov 2022 16:00:00 -0800 (PST) X-Google-Smtp-Source: AA0mqf4F/zOi0U8U/iZ0Kuzua7pEPJsJY+FMhuFMlOzAsCWKnPIhOJzCSaP+F5vl3cZpWC5QB0Kf X-Received: by 2002:a63:444b:0:b0:46f:eb81:c997 with SMTP id t11-20020a63444b000000b0046feb81c997mr8644406pgk.379.1668816000627; Fri, 18 Nov 2022 16:00:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668816000; cv=none; d=google.com; s=arc-20160816; b=Oj6F20g24v1UF4rZcPpZZ6xEJcDb3StZiYtX1ur5Ft17BeO2tWGAbLAElwnqsmuU3O 9GObjZAzYE3/SkjMVW+5spKPJwPtud3YiL7gulYLRr9mPqb1EZtcZivEF3lDBXTX2E8S /rvn/QKL+APq+TAtq8yrVCrVHIlGt79CqYjzYSvpFKhMjPS0Xmjf9ia998zjvMNSzasP dYBgOyAWxA+4AZdMwZI2e/KNji1ZCumcYLTdyyYjC1ANBVWX5QjMR7YgOP1NowZGsfct dNdNohGQVZ6QI2F41ivBHpXZ4N0ue398xmv6L3j1mEhVshphHU+qw/DaG4TOanrgrfls a/wg== 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=qJI2te22s4o7EIzj2uyOYKFQS5ZgfwzP2YLg/VhaavA=; b=lvFivdxA8bJEShZCN1cgEnCrD1zfX97frZKl1otON0qd+Tw9y5KvF4UrLkmZIu5zv0 7HtohQd7Kfd9vlfTO3aYhznAZ7r3WFzfeJK+iZHQsPoF09Hro/Y7WYE+U7n5j8kZWfO2 Ty+rlDfnrTTMWm3vbwU4zkzBIGN7nCM9hhjoDXjl9ZlvKBmdrhn4D0AvLkDkPj13CbvI wRBPBbbR9xh7H2Uui7UoCJpTAsXTgHpglf4tjDcoWKiwGv5eqRDgqIxDecBjidPOsEoC zBtAqBIpkrd8NZplYJXuY6NAcroMEVfeiy2QIZyPo37Hbta4UVjEkhOo2MdHKfhAdNik /ndA== 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 e6-20020a056a001a8600b0056ce934bea2si5336685pfv.353.2022.11.18.15.59.45; Fri, 18 Nov 2022 16:00:00 -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 S231954AbiKRXx5 (ORCPT + 99 others); Fri, 18 Nov 2022 18:53:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236896AbiKRXvo (ORCPT ); Fri, 18 Nov 2022 18:51:44 -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 10BB0DDFBB for ; Fri, 18 Nov 2022 15:27:10 -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 1owA8I-0001Ku-Q5; Fri, 18 Nov 2022 23:46:50 +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 1owA8F-0058Lw-2C; Fri, 18 Nov 2022 23:46:48 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1owA8F-00Hb6Z-9U; Fri, 18 Nov 2022 23:46:47 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Angel Iglesias , Lee Jones , Grant Likely , Wolfram Sang , Andreas Klinger , 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 180/606] iio: proximity: mb1232: Convert to i2c's .probe_new() Date: Fri, 18 Nov 2022 23:38:34 +0100 Message-Id: <20221118224540.619276-181-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?1749880406581055990?= X-GMAIL-MSGID: =?utf-8?q?1749880406581055990?= 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/proximity/mb1232.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/iio/proximity/mb1232.c b/drivers/iio/proximity/mb1232.c index 0bca5f74de68..e70cac8240af 100644 --- a/drivers/iio/proximity/mb1232.c +++ b/drivers/iio/proximity/mb1232.c @@ -180,9 +180,9 @@ static const struct iio_info mb1232_info = { .read_raw = mb1232_read_raw, }; -static int mb1232_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static int mb1232_probe(struct i2c_client *client) { + const struct i2c_device_id *id = i2c_client_get_device_id(client); struct iio_dev *indio_dev; struct mb1232_data *data; int ret; @@ -264,7 +264,7 @@ static struct i2c_driver mb1232_driver = { .name = "maxbotix-mb1232", .of_match_table = of_mb1232_match, }, - .probe = mb1232_probe, + .probe_new = mb1232_probe, .id_table = mb1232_id, }; module_i2c_driver(mb1232_driver);