[net-next,3/6] net: dsa: microchip: add irq in i2c probe

Message ID 20221102041058.128779-4-rakesh.sankaranarayanan@microchip.com
State New
Headers
Series net: dsa: microchip: regmap range validation and ksz_pwrite status check for lan937x and irq and error checking updates for ksz series |

Commit Message

Rakesh Sankaranarayanan Nov. 2, 2022, 4:10 a.m. UTC
  add device irq in i2c probe function.

Signed-off-by: Rakesh Sankaranarayanan <rakesh.sankaranarayanan@microchip.com>
---
 drivers/net/dsa/microchip/ksz9477_i2c.c | 2 ++
 1 file changed, 2 insertions(+)
  

Patch

diff --git a/drivers/net/dsa/microchip/ksz9477_i2c.c b/drivers/net/dsa/microchip/ksz9477_i2c.c
index 55146584e9b5..caa9acf1495c 100644
--- a/drivers/net/dsa/microchip/ksz9477_i2c.c
+++ b/drivers/net/dsa/microchip/ksz9477_i2c.c
@@ -41,6 +41,8 @@  static int ksz9477_i2c_probe(struct i2c_client *i2c,
 	if (i2c->dev.platform_data)
 		dev->pdata = i2c->dev.platform_data;
 
+	dev->irq = i2c->irq;
+
 	ret = ksz_switch_register(dev);
 
 	/* Main DSA driver may not be started yet. */