From patchwork Fri Nov 18 22:44:03 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: 22762 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp465824wrr; Fri, 18 Nov 2022 15:38:34 -0800 (PST) X-Google-Smtp-Source: AA0mqf4PGL6eg921eUbeKtEHoJNNgVhActjNBnCZsKeR0BFSjILVkrQMNfJZM8grdtonpz9h/cCJ X-Received: by 2002:a17:906:cf85:b0:78d:b66d:749f with SMTP id um5-20020a170906cf8500b0078db66d749fmr7526500ejb.566.1668814713876; Fri, 18 Nov 2022 15:38:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668814713; cv=none; d=google.com; s=arc-20160816; b=XAQ/nonQXwRu8FAPkYqu65PdiRupg1H47KB/RLI5MFhp4NHmZvSAckL1jUQWggqnvh 1s79cFAb/v2mp5IKFgALGDIbVgkmfQOTyLYlY6lkBsSWJrFKZEOS3h+WwNWPZyx6Vyih 5z+uOEdxHufUQbjiR5gdEglAdVzECmfxCMoqg14sgnri7baP2Egm/Qf7iJYg8ezAjYZH 0WxlMFGhe+1K/0nSaSzdnzByN8fd+eBNyfU+cndm3HDOYuWXY3A9wU/RSbtCWhSB/HZo sesl9XbKp4T2LRcsP0hC1fzjBQwbMjMC5E408AYKzrp1gK1L01WS+cqgEvMyWXhLDXpu OnhQ== 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=zSulsYfqQyJlnhoBFGL+28II5t6XtDx+9jgIQKkJN2Q=; b=rMKv94kJChJ8vSKr3Z7p3K9Zm469sW3iqv/Yy6rOdY1K5kTHrScLeWZzVPcc4/DH8U KyffcA/hNPBo+4/p7TdyhrNPrQRwCB6MZAF6U7iDrzjTlLTBvksrL/sJ8vre9pxpZEJC hycBZz4ETCithnZIYJ35iUo4CbrlSlr3ZpnCRgcjQDoN3+MMokYfGMXwnasuKS2V0naA sMCiSA8T80Vgg0eoCqYZdHEAY964IFjEo5s7B6pZIwkmYYvDAWeudRXUCdbLy/0nSEt8 zmyZXgDv7jy2nlDLpCPVmdXdHW9yaj/y/ShPTev8lHtnSfk1JRrgNF5M5uQ/xAR7tTsX 8J4Q== 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 v6-20020a056402348600b004661ece3fabsi4587742edc.575.2022.11.18.15.38.09; Fri, 18 Nov 2022 15:38:33 -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 S236404AbiKRXgU (ORCPT + 99 others); Fri, 18 Nov 2022 18:36:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236374AbiKRXct (ORCPT ); Fri, 18 Nov 2022 18:32:49 -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 1CE5E65E42 for ; Fri, 18 Nov 2022 15:20:24 -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 1owA9U-0004kI-F9; Fri, 18 Nov 2022 23:48:04 +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 1owA9R-0058mk-PI; Fri, 18 Nov 2022 23:48:02 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1owA9R-0000Pr-H2; Fri, 18 Nov 2022 23:48:01 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Angel Iglesias , Lee Jones , Grant Likely , Wolfram Sang , Rob Herring , Frank Rowand Cc: linux-i2c@vger.kernel.org, kernel@pengutronix.de, =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 509/606] of: unittest: Convert to i2c's .probe_new() Date: Fri, 18 Nov 2022 23:44:03 +0100 Message-Id: <20221118224540.619276-510-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?1749879057523856952?= X-GMAIL-MSGID: =?utf-8?q?1749879057523856952?= 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 Reviewed-by: Frank Rowand --- drivers/of/unittest.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c index 1d810c0e18f8..bc0f1e50a4be 100644 --- a/drivers/of/unittest.c +++ b/drivers/of/unittest.c @@ -2508,8 +2508,7 @@ static struct platform_driver unittest_i2c_bus_driver = { }, }; -static int unittest_i2c_dev_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static int unittest_i2c_dev_probe(struct i2c_client *client) { struct device *dev = &client->dev; struct device_node *np = client->dev.of_node; @@ -2541,7 +2540,7 @@ static struct i2c_driver unittest_i2c_dev_driver = { .driver = { .name = "unittest-i2c-dev", }, - .probe = unittest_i2c_dev_probe, + .probe_new = unittest_i2c_dev_probe, .remove = unittest_i2c_dev_remove, .id_table = unittest_i2c_dev_id, }; @@ -2553,8 +2552,7 @@ static int unittest_i2c_mux_select_chan(struct i2c_mux_core *muxc, u32 chan) return 0; } -static int unittest_i2c_mux_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static int unittest_i2c_mux_probe(struct i2c_client *client) { int i, nchans; struct device *dev = &client->dev; @@ -2619,7 +2617,7 @@ static struct i2c_driver unittest_i2c_mux_driver = { .driver = { .name = "unittest-i2c-mux", }, - .probe = unittest_i2c_mux_probe, + .probe_new = unittest_i2c_mux_probe, .remove = unittest_i2c_mux_remove, .id_table = unittest_i2c_mux_id, };