Skip to contentSkip to conversation

net: Complete conversion to i2c_probe_new

PATCH Applied Jakub Kicinski 2 participants 14 messages Nov 23, 2022

Subsystems (9)
lore
Share & tools
lore

Jakub Kicinski

author maintainer
#0 lore raw

v2 cover net: Complete conversion to i2c_probe_new

Reposting for Uwe the networking slice of his mega-series:
https://lore.kernel.org/all/[email protected]/
so that our build bot can confirm the obvious.

fix mlx5 -> mlxsw while at it.

v2: pull the prep into net-next first

Uwe Kleine-König (12):
net: dsa: lan9303: Convert to i2c's .probe_new()
net: dsa: microchip: ksz9477: Convert to i2c's .probe_new()
net: dsa: xrs700x: Convert to i2c's .probe_new() net/mlxsw: Convert to i2c's .probe_new()
nfc: microread: Convert to i2c's .probe_new()
nfc: mrvl: Convert to i2c's .probe_new()
NFC: nxp-nci: Convert to i2c's .probe_new()
nfc: pn533: Convert to i2c's .probe_new()
nfc: pn544: Convert to i2c's .probe_new()
nfc: s3fwrn5: Convert to i2c's .probe_new()
nfc: st-nci: Convert to i2c's .probe_new()
nfc: st21nfca: i2c: Convert to i2c's .probe_new()

 drivers/net/dsa/lan9303_i2c.c             | 5 ++---
 drivers/net/dsa/microchip/ksz9477_i2c.c   | 5 ++---
 drivers/net/dsa/xrs700x/xrs700x_i2c.c     | 5 ++---
 drivers/net/ethernet/mellanox/mlxsw/i2c.c | 6 +++---
 drivers/nfc/microread/i2c.c               | 5 ++---
 drivers/nfc/nfcmrvl/i2c.c                 | 5 ++---
 drivers/nfc/nxp-nci/i2c.c                 | 5 ++---
 drivers/nfc/pn533/i2c.c                   | 5 ++---
 drivers/nfc/pn544/i2c.c                   | 5 ++---
 drivers/nfc/s3fwrn5/i2c.c                 | 5 ++---
 drivers/nfc/st-nci/i2c.c                  | 5 ++---
 drivers/nfc/st21nfca/i2c.c                | 5 ++---
 12 files changed, 25 insertions(+), 36 deletions(-)
Signature · 1 line
2.38.1
author maintainer
#1 lore raw

PATCH v2 1/12 net: dsa: lan9303: Convert to i2c's .probe_new()

From: Uwe Kleine-König <[email protected]>

The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted.

---
 drivers/net/dsa/lan9303_i2c.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/net/dsa/lan9303_i2c.c +2 -3
index 7d746cd9ca1b..1cb41c36bd47 100644
@@ -29,8 +29,7 @@ static const struct regmap_config lan9303_i2c_regmap_config = {
 	.cache_type = REGCACHE_NONE,
 };
 
-static int lan9303_i2c_probe(struct i2c_client *client,
-			     const struct i2c_device_id *id)
+static int lan9303_i2c_probe(struct i2c_client *client)
 {
 	struct lan9303_i2c *sw_dev;
 	int ret;
@@ -106,7 +105,7 @@ static struct i2c_driver lan9303_i2c_driver = {
 		.name = "LAN9303_I2C",
 		.of_match_table = of_match_ptr(lan9303_i2c_of_match),
 	},
-	.probe = lan9303_i2c_probe,
+	.probe_new = lan9303_i2c_probe,
 	.remove = lan9303_i2c_remove,
 	.shutdown = lan9303_i2c_shutdown,
 	.id_table = lan9303_i2c_id,
Signature · 1 line
2.38.1
author maintainer
#2 lore raw

PATCH v2 2/12 net: dsa: microchip: ksz9477: Convert to i2c's .probe_new()

In reply to Jakub Kicinski

From: Uwe Kleine-König <[email protected]>

The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted.

---
 drivers/net/dsa/microchip/ksz9477_i2c.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/net/dsa/microchip/ksz9477_i2c.c +2 -3
index db4aec0a51dc..c1a633ca1e6d 100644
@@ -14,8 +14,7 @@
 
 KSZ_REGMAP_TABLE(ksz9477, not_used, 16, 0, 0);
 
-static int ksz9477_i2c_probe(struct i2c_client *i2c,
-			     const struct i2c_device_id *i2c_id)
+static int ksz9477_i2c_probe(struct i2c_client *i2c)
 {
 	struct regmap_config rc;
 	struct ksz_device *dev;
@@ -120,7 +119,7 @@ static struct i2c_driver ksz9477_i2c_driver = {
 		.name	= "ksz9477-switch",
 		.of_match_table = of_match_ptr(ksz9477_dt_ids),
 	},
-	.probe	= ksz9477_i2c_probe,
+	.probe_new = ksz9477_i2c_probe,
 	.remove	= ksz9477_i2c_remove,
 	.shutdown = ksz9477_i2c_shutdown,
 	.id_table = ksz9477_i2c_id,
Signature · 1 line
2.38.1
author maintainer
#3 lore raw

PATCH v2 3/12 net: dsa: xrs700x: Convert to i2c's .probe_new()

In reply to Jakub Kicinski

From: Uwe Kleine-König <[email protected]>

The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted.

---
 drivers/net/dsa/xrs700x/xrs700x_i2c.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/net/dsa/xrs700x/xrs700x_i2c.c +2 -3
index 54065cdedd35..14ff6887a225 100644
@@ -76,8 +76,7 @@ static const struct regmap_config xrs700x_i2c_regmap_config = {
 	.val_format_endian = REGMAP_ENDIAN_BIG
 };
 
-static int xrs700x_i2c_probe(struct i2c_client *i2c,
-			     const struct i2c_device_id *i2c_id)
+static int xrs700x_i2c_probe(struct i2c_client *i2c)
 {
 	struct xrs700x *priv;
 	int ret;
@@ -148,7 +147,7 @@ static struct i2c_driver xrs700x_i2c_driver = {
 		.name	= "xrs700x-i2c",
 		.of_match_table = of_match_ptr(xrs700x_i2c_dt_ids),
 	},
-	.probe	= xrs700x_i2c_probe,
+	.probe_new = xrs700x_i2c_probe,
 	.remove	= xrs700x_i2c_remove,
 	.shutdown = xrs700x_i2c_shutdown,
 	.id_table = xrs700x_i2c_id,
Signature · 1 line
2.38.1
author maintainer
#4 lore raw

PATCH v2 4/12 net/mlxsw: Convert to i2c's .probe_new()

In reply to Jakub Kicinski

From: Uwe Kleine-König <[email protected]>

.probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function.

---
 drivers/net/ethernet/mellanox/mlxsw/i2c.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/mellanox/mlxsw/i2c.c +3 -3
index f5f5f8dc3d19..2c586c2308ae 100644
@@ -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);
 }
Signature · 1 line
2.38.1
author maintainer
#5 lore raw

PATCH v2 5/12 nfc: microread: Convert to i2c's .probe_new()

In reply to Jakub Kicinski

From: Uwe Kleine-König <[email protected]>

The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted.

---
 drivers/nfc/microread/i2c.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/nfc/microread/i2c.c +2 -3
index 5eaa18f81355..e72b358a2a12 100644
@@ -231,8 +231,7 @@ static const struct nfc_phy_ops i2c_phy_ops = {
 	.disable = microread_i2c_disable,
 };
 
-static int microread_i2c_probe(struct i2c_client *client,
-			       const struct i2c_device_id *id)
+static int microread_i2c_probe(struct i2c_client *client)
 {
 	struct microread_i2c_phy *phy;
 	int r;
@@ -287,7 +286,7 @@ static struct i2c_driver microread_i2c_driver = {
 	.driver = {
 		.name = MICROREAD_I2C_DRIVER_NAME,
 	},
-	.probe		= microread_i2c_probe,
+	.probe_new	= microread_i2c_probe,
 	.remove		= microread_i2c_remove,
 	.id_table	= microread_i2c_id,
 };
Signature · 1 line
2.38.1
author maintainer
#6 lore raw

PATCH v2 6/12 nfc: mrvl: Convert to i2c's .probe_new()

In reply to Jakub Kicinski

From: Uwe Kleine-König <[email protected]>

The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted.

---
 drivers/nfc/nfcmrvl/i2c.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/nfc/nfcmrvl/i2c.c +2 -3
index 24436c9e54c9..c3ab49df1e35 100644
@@ -181,8 +181,7 @@ static int nfcmrvl_i2c_parse_dt(struct device_node *node,
 	return 0;
 }
 
-static int nfcmrvl_i2c_probe(struct i2c_client *client,
-			     const struct i2c_device_id *id)
+static int nfcmrvl_i2c_probe(struct i2c_client *client)
 {
 	const struct nfcmrvl_platform_data *pdata;
 	struct nfcmrvl_i2c_drv_data *drv_data;
@@ -257,7 +256,7 @@ static const struct i2c_device_id nfcmrvl_i2c_id_table[] = {
 MODULE_DEVICE_TABLE(i2c, nfcmrvl_i2c_id_table);
 
 static struct i2c_driver nfcmrvl_i2c_driver = {
-	.probe = nfcmrvl_i2c_probe,
+	.probe_new = nfcmrvl_i2c_probe,
 	.id_table = nfcmrvl_i2c_id_table,
 	.remove = nfcmrvl_i2c_remove,
 	.driver = {
Signature · 1 line
2.38.1
author maintainer
#7 lore raw

PATCH v2 7/12 NFC: nxp-nci: Convert to i2c's .probe_new()

In reply to Jakub Kicinski

From: Uwe Kleine-König <[email protected]>

The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted.

---
 drivers/nfc/nxp-nci/i2c.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/nfc/nxp-nci/i2c.c +2 -3
index ec6446511984..d4c299be7949 100644
@@ -263,8 +263,7 @@ static const struct acpi_gpio_mapping acpi_nxp_nci_gpios[] = {
 	{ }
 };
 
-static int nxp_nci_i2c_probe(struct i2c_client *client,
-			    const struct i2c_device_id *id)
+static int nxp_nci_i2c_probe(struct i2c_client *client)
 {
 	struct device *dev = &client->dev;
 	struct nxp_nci_i2c_phy *phy;
@@ -349,7 +348,7 @@ static struct i2c_driver nxp_nci_i2c_driver = {
 		   .acpi_match_table = ACPI_PTR(acpi_id),
 		   .of_match_table = of_nxp_nci_i2c_match,
 		  },
-	.probe = nxp_nci_i2c_probe,
+	.probe_new = nxp_nci_i2c_probe,
 	.id_table = nxp_nci_i2c_id_table,
 	.remove = nxp_nci_i2c_remove,
 };
Signature · 1 line
2.38.1
author maintainer
#8 lore raw

PATCH v2 8/12 nfc: pn533: Convert to i2c's .probe_new()

In reply to Jakub Kicinski

From: Uwe Kleine-König <[email protected]>

The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted.

---
 drivers/nfc/pn533/i2c.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/nfc/pn533/i2c.c +2 -3
index ddf3db286bad..1503a98f0405 100644
@@ -163,8 +163,7 @@ static const struct pn533_phy_ops i2c_phy_ops = {
 };
 
 
-static int pn533_i2c_probe(struct i2c_client *client,
-			       const struct i2c_device_id *id)
+static int pn533_i2c_probe(struct i2c_client *client)
 {
 	struct pn533_i2c_phy *phy;
 	struct pn533 *priv;
@@ -260,7 +259,7 @@ static struct i2c_driver pn533_i2c_driver = {
 		   .name = PN533_I2C_DRIVER_NAME,
 		   .of_match_table = of_match_ptr(of_pn533_i2c_match),
 		  },
-	.probe = pn533_i2c_probe,
+	.probe_new = pn533_i2c_probe,
 	.id_table = pn533_i2c_id_table,
 	.remove = pn533_i2c_remove,
 };
Signature · 1 line
2.38.1
author maintainer
#9 lore raw

PATCH v2 9/12 nfc: pn544: Convert to i2c's .probe_new()

In reply to Jakub Kicinski

From: Uwe Kleine-König <[email protected]>

The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted.

---
 drivers/nfc/pn544/i2c.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/nfc/pn544/i2c.c +2 -3
index 9e754abcfa2a..8b0d910bee06 100644
@@ -866,8 +866,7 @@ static const struct acpi_gpio_mapping acpi_pn544_gpios[] = {
 	{ },
 };
 
-static int pn544_hci_i2c_probe(struct i2c_client *client,
-			       const struct i2c_device_id *id)
+static int pn544_hci_i2c_probe(struct i2c_client *client)
 {
 	struct device *dev = &client->dev;
 	struct pn544_i2c_phy *phy;
@@ -954,7 +953,7 @@ static struct i2c_driver pn544_hci_i2c_driver = {
 		   .of_match_table = of_match_ptr(of_pn544_i2c_match),
 		   .acpi_match_table = ACPI_PTR(pn544_hci_i2c_acpi_match),
 		  },
-	.probe = pn544_hci_i2c_probe,
+	.probe_new = pn544_hci_i2c_probe,
 	.id_table = pn544_hci_i2c_id_table,
 	.remove = pn544_hci_i2c_remove,
 };
Signature · 1 line
2.38.1
author maintainer
#10 lore raw

PATCH v2 10/12 nfc: s3fwrn5: Convert to i2c's .probe_new()

In reply to Jakub Kicinski

From: Uwe Kleine-König <[email protected]>

The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted.

---
 drivers/nfc/s3fwrn5/i2c.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/nfc/s3fwrn5/i2c.c +2 -3
index ecdee838d25d..2517ae71f9a4 100644
@@ -177,8 +177,7 @@ static int s3fwrn5_i2c_parse_dt(struct i2c_client *client)
 	return 0;
 }
 
-static int s3fwrn5_i2c_probe(struct i2c_client *client,
-				  const struct i2c_device_id *id)
+static int s3fwrn5_i2c_probe(struct i2c_client *client)
 {
 	struct s3fwrn5_i2c_phy *phy;
 	int ret;
@@ -262,7 +261,7 @@ static struct i2c_driver s3fwrn5_i2c_driver = {
 		.name = S3FWRN5_I2C_DRIVER_NAME,
 		.of_match_table = of_match_ptr(of_s3fwrn5_i2c_match),
 	},
-	.probe = s3fwrn5_i2c_probe,
+	.probe_new = s3fwrn5_i2c_probe,
 	.remove = s3fwrn5_i2c_remove,
 	.id_table = s3fwrn5_i2c_id_table,
 };
Signature · 1 line
2.38.1
author maintainer
#11 lore raw

PATCH v2 11/12 nfc: st-nci: Convert to i2c's .probe_new()

In reply to Jakub Kicinski

From: Uwe Kleine-König <[email protected]>

The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted.

---
 drivers/nfc/st-nci/i2c.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/nfc/st-nci/i2c.c +2 -3
index 89fa24d71bef..6b5eed8a1fbe 100644
@@ -195,8 +195,7 @@ static const struct acpi_gpio_mapping acpi_st_nci_gpios[] = {
 	{},
 };
 
-static int st_nci_i2c_probe(struct i2c_client *client,
-				  const struct i2c_device_id *id)
+static int st_nci_i2c_probe(struct i2c_client *client)
 {
 	struct device *dev = &client->dev;
 	struct st_nci_i2c_phy *phy;
@@ -284,7 +283,7 @@ static struct i2c_driver st_nci_i2c_driver = {
 		.of_match_table = of_match_ptr(of_st_nci_i2c_match),
 		.acpi_match_table = ACPI_PTR(st_nci_i2c_acpi_match),
 	},
-	.probe = st_nci_i2c_probe,
+	.probe_new = st_nci_i2c_probe,
 	.id_table = st_nci_i2c_id_table,
 	.remove = st_nci_i2c_remove,
 };
Signature · 1 line
2.38.1
author maintainer
#12 lore raw

PATCH v2 12/12 nfc: st21nfca: i2c: Convert to i2c's .probe_new()

In reply to Jakub Kicinski

From: Uwe Kleine-König <[email protected]>

The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted.

---
 drivers/nfc/st21nfca/i2c.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/nfc/st21nfca/i2c.c +2 -3
index 76b55986bcf8..55f7a2391bb1 100644
@@ -487,8 +487,7 @@ static const struct acpi_gpio_mapping acpi_st21nfca_gpios[] = {
 	{},
 };
 
-static int st21nfca_hci_i2c_probe(struct i2c_client *client,
-				  const struct i2c_device_id *id)
+static int st21nfca_hci_i2c_probe(struct i2c_client *client)
 {
 	struct device *dev = &client->dev;
 	struct st21nfca_i2c_phy *phy;
@@ -598,7 +597,7 @@ static struct i2c_driver st21nfca_hci_i2c_driver = {
 		.of_match_table = of_match_ptr(of_st21nfca_i2c_match),
 		.acpi_match_table = ACPI_PTR(st21nfca_hci_i2c_acpi_match),
 	},
-	.probe = st21nfca_hci_i2c_probe,
+	.probe_new = st21nfca_hci_i2c_probe,
 	.id_table = st21nfca_hci_i2c_id_table,
 	.remove = st21nfca_hci_i2c_remove,
 };
Signature · 1 line
2.38.1
#13 lore raw
In reply to Jakub Kicinski
This series was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:

Hello:

This series was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:

Quoted 9 lines · On Tue, 22 Nov 2022 20:54:55 -0800 you wrote:

Reposting for Uwe the networking slice of his mega-series:
https://lore.kernel.org/all/[email protected]/
so that our build bot can confirm the obvious.

fix mlx5 -> mlxsw while at it.

v2: pull the prep into net-next first

[...]

Here is the summary with links:
- [net-next,v2,01/12] net: dsa: lan9303: Convert to i2c's .probe_new()

    https://git.kernel.org/netdev/net-next/c/c479babce5b1
  - [net-next,v2,02/12] net: dsa: microchip: ksz9477: Convert to i2c's .probe_new()
    https://git.kernel.org/netdev/net-next/c/f925e2154de9
  - [net-next,v2,03/12] net: dsa: xrs700x: Convert to i2c's .probe_new()
    https://git.kernel.org/netdev/net-next/c/dfd5e53dd721
  - [net-next,v2,04/12] net/mlxsw: Convert to i2c's .probe_new()
    https://git.kernel.org/netdev/net-next/c/cb405c2a4040
  - [net-next,v2,05/12] nfc: microread: Convert to i2c's .probe_new()
    https://git.kernel.org/netdev/net-next/c/f72eed59eab4
  - [net-next,v2,06/12] nfc: mrvl: Convert to i2c's .probe_new()
    https://git.kernel.org/netdev/net-next/c/a9f656c88a90
  - [net-next,v2,07/12] NFC: nxp-nci: Convert to i2c's .probe_new()
    https://git.kernel.org/netdev/net-next/c/bf1f6f297528
  - [net-next,v2,08/12] nfc: pn533: Convert to i2c's .probe_new()
    https://git.kernel.org/netdev/net-next/c/d72c9828a3cb
  - [net-next,v2,09/12] nfc: pn544: Convert to i2c's .probe_new()
    https://git.kernel.org/netdev/net-next/c/2338adb2e091
  - [net-next,v2,10/12] nfc: s3fwrn5: Convert to i2c's .probe_new()
    https://git.kernel.org/netdev/net-next/c/0fc00c085d71
  - [net-next,v2,11/12] nfc: st-nci: Convert to i2c's .probe_new()
    https://git.kernel.org/netdev/net-next/c/75cc560ff661
  - [net-next,v2,12/12] nfc: st21nfca: i2c: Convert to i2c's .probe_new()
    https://git.kernel.org/netdev/net-next/c/1fa082734076

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html