netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com,
	uwe@kleine-koenig.org,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Ido Schimmel" <idosch@nvidia.com>
Subject: [PATCH net-next v2 04/12] net/mlxsw: Convert to i2c's .probe_new()
Date: Tue, 22 Nov 2022 20:54:59 -0800	[thread overview]
Message-ID: <20221123045507.2091409-5-kuba@kernel.org> (raw)
In-Reply-To: <20221123045507.2091409-1-kuba@kernel.org>

From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

.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 <u.kleine-koenig@pengutronix.de>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
---
 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);
 }
-- 
2.38.1


  parent reply	other threads:[~2022-11-23  4:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-23  4:54 [PATCH net-next v2 00/12] net: Complete conversion to i2c_probe_new Jakub Kicinski
2022-11-23  4:54 ` [PATCH net-next v2 01/12] net: dsa: lan9303: Convert to i2c's .probe_new() Jakub Kicinski
2022-11-23  4:54 ` [PATCH net-next v2 02/12] net: dsa: microchip: ksz9477: " Jakub Kicinski
2022-11-23  4:54 ` [PATCH net-next v2 03/12] net: dsa: xrs700x: " Jakub Kicinski
2022-11-23  4:54 ` Jakub Kicinski [this message]
2022-11-23  4:55 ` [PATCH net-next v2 05/12] nfc: microread: " Jakub Kicinski
2022-11-23  4:55 ` [PATCH net-next v2 06/12] nfc: mrvl: " Jakub Kicinski
2022-11-23  4:55 ` [PATCH net-next v2 07/12] NFC: nxp-nci: " Jakub Kicinski
2022-11-23  4:55 ` [PATCH net-next v2 08/12] nfc: pn533: " Jakub Kicinski
2022-11-23  4:55 ` [PATCH net-next v2 09/12] nfc: pn544: " Jakub Kicinski
2022-11-23  4:55 ` [PATCH net-next v2 10/12] nfc: s3fwrn5: " Jakub Kicinski
2022-11-23  4:55 ` [PATCH net-next v2 11/12] nfc: st-nci: " Jakub Kicinski
2022-11-23  4:55 ` [PATCH net-next v2 12/12] nfc: st21nfca: i2c: " Jakub Kicinski
2022-11-23 21:00 ` [PATCH net-next v2 00/12] net: Complete conversion to i2c_probe_new patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221123045507.2091409-5-kuba@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=idosch@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=uwe@kleine-koenig.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).