Message ID | 20230924172320.15165-2-biju.das.jz@bp.renesas.com |
---|---|
State | Superseded |
Headers | show |
Series | [v3,1/3] pinctrl: mcp23s08_i2c: Extend match support for OF tables | expand |
diff --git a/drivers/pinctrl/pinctrl-mcp23s08_i2c.c b/drivers/pinctrl/pinctrl-mcp23s08_i2c.c index 3dd1bd8e73eb..41ea2650a7e4 100644 --- a/drivers/pinctrl/pinctrl-mcp23s08_i2c.c +++ b/drivers/pinctrl/pinctrl-mcp23s08_i2c.c @@ -10,16 +10,16 @@ static int mcp230xx_probe(struct i2c_client *client) { - const struct i2c_device_id *id = i2c_client_get_device_id(client); struct device *dev = &client->dev; - unsigned int type = id->driver_data; struct mcp23s08 *mcp; + unsigned int type; int ret; mcp = devm_kzalloc(dev, sizeof(*mcp), GFP_KERNEL); if (!mcp) return -ENOMEM; + type = (uintptr_t)i2c_get_match_data(client); switch (type) { case MCP_TYPE_008: mcp->regmap = devm_regmap_init_i2c(client, &mcp23x08_regmap);