From patchwork Fri Nov 18 22:43:54 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: 23116 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp488078wrr; Fri, 18 Nov 2022 16:44:56 -0800 (PST) X-Google-Smtp-Source: AA0mqf6fjXQ7yEP/ftYYYAdpZ2JfabQljiD2VJQgoZ2lMXw+vR8W+wpeB2S/Clvr6sazQ7YMygM5 X-Received: by 2002:a17:906:86c9:b0:78d:9324:6f18 with SMTP id j9-20020a17090686c900b0078d93246f18mr8106138ejy.664.1668818696780; Fri, 18 Nov 2022 16:44:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668818696; cv=none; d=google.com; s=arc-20160816; b=iAT7pb/o1zyM+iuFd/AkvA/X+Tx+oF00hIQUs+H5yIr7XOZtRYnT9IX478U0vvbJbn a1z71ll5wm4iclUMrR06nDymY6Xl3osXvBREXKOa3WWQN2p5s8EvyxHnU2oeG0lu0+2C UvkiHoUv9nVDo4ZQDjyY2FpNHmhMsdSNlcJFNMv/CIg+iQhQUR+qgla+1yRMzgtmSG1c qy1H8nwNwg0J5DOLJBuFSnFZEIQL2S9YcXczN504K3QICDYYKJzbz+RUGJMZd85IYBfL HR+ahUezKX6NWPpgq860hNbFwFC3G0GzO+uWFF8uUS56HvdNdbtJAc2vXc6KDo5K3tLp h/FQ== 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=yeBnKEyiKADyKKM7D8Dw8cSHLowZYq4S+4Rhio+rRgE=; b=jXtRv8FQPCCsUf5MTTyd3OwvtgkFkGTuOWqW5eauAWkbr5KLidxHeI6EVDG2hvcTQ8 NgmKIAIj0zN6TIa9Jll16dd40T2p1SDubD64zLVAzJG9wtng4eH/miO0oHYIlIrb1ozQ l29SgUk0ZyMVHn79+zqWJljpY7fQNU/6rzNOZpSAB/N8vSKy4MkLTt+0jNzTfL+mS5L0 r/i9/er2t18yI4JEOAjayc3Nbd/Gy3tUAdKZvZWru/7hn99rECfPUapWNhMpStHZGU6v r5m2vk3TUtg1esYeugw2ojMLfn/GYa0fglGSU/8iLrMv7PfWpwHb+Wr2ue0gsI9UsX+4 PnTA== 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 oz40-20020a1709077da800b0078e1246e7d6si4083742ejc.748.2022.11.18.16.44.33; Fri, 18 Nov 2022 16:44:56 -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 S237099AbiKSAl1 (ORCPT + 99 others); Fri, 18 Nov 2022 19:41:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235017AbiKSAkC (ORCPT ); Fri, 18 Nov 2022 19:40:02 -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 40156C76AD for ; Fri, 18 Nov 2022 15:44:37 -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 1owA9S-0004db-6d; Fri, 18 Nov 2022 23:48:02 +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 1owA9P-0058lr-LM; Fri, 18 Nov 2022 23:48:00 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1owA9P-0000PI-NS; Fri, 18 Nov 2022 23:47:59 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Angel Iglesias , Lee Jones , Grant Likely , Wolfram Sang , Ido Schimmel , Petr Machata , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: linux-i2c@vger.kernel.org, kernel@pengutronix.de, =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 500/606] net/mlx5: Convert to i2c's .probe_new() Date: Fri, 18 Nov 2022 23:43:54 +0100 Message-Id: <20221118224540.619276-501-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?1749883233946405630?= X-GMAIL-MSGID: =?utf-8?q?1749883233946405630?= 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/net/ethernet/mellanox/mlxsw/i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/i2c.c b/drivers/net/ethernet/mellanox/mlxsw/i2c.c index f5f5f8dc3d19..2c586c2308ae 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/i2c.c +++ b/drivers/net/ethernet/mellanox/mlxsw/i2c.c @@ -632,9 +632,9 @@ static const struct mlxsw_bus mlxsw_i2c_bus = { .cmd_exec = mlxsw_i2c_cmd_exec, }; -static int mlxsw_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static int mlxsw_i2c_probe(struct i2c_client *client) { + const struct i2c_device_id *id = i2c_client_get_device_id(client); const struct i2c_adapter_quirks *quirks = client->adapter->quirks; struct mlxsw_i2c *mlxsw_i2c; u8 status; @@ -751,7 +751,7 @@ static void mlxsw_i2c_remove(struct i2c_client *client) int mlxsw_i2c_driver_register(struct i2c_driver *i2c_driver) { - i2c_driver->probe = mlxsw_i2c_probe; + i2c_driver->probe_new = mlxsw_i2c_probe; i2c_driver->remove = mlxsw_i2c_remove; return i2c_add_driver(i2c_driver); }