[PATCH net-next v2 2/5] net: dsa: microchip: add irq in i2c probe

From: Rakesh Sankaranarayanan
Date: Sun Nov 06 2022 - 22:57:43 EST


add device irq in i2c probe function.

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

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. */
--
2.34.1