[PATCH] extcon: sm5502: Extend match data support for ID tables

Biju Das posted 1 patch 2 years, 3 months ago
drivers/extcon/extcon-sm5502.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] extcon: sm5502: Extend match data support for ID tables
Posted by Biju Das 2 years, 3 months ago
The driver has ID tables but there is no ID matching support.
So extend match data support for ID tables using i2c_match_data().

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
 drivers/extcon/extcon-sm5502.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/extcon/extcon-sm5502.c b/drivers/extcon/extcon-sm5502.c
index c8c4b9ef72aa..c4768060c7cd 100644
--- a/drivers/extcon/extcon-sm5502.c
+++ b/drivers/extcon/extcon-sm5502.c
@@ -689,7 +689,7 @@ static int sm5022_muic_i2c_probe(struct i2c_client *i2c)
 	info->dev = &i2c->dev;
 	info->i2c = i2c;
 	info->irq = i2c->irq;
-	info->type = device_get_match_data(info->dev);
+	info->type = i2c_get_match_data(i2c);
 	if (!info->type)
 		return -EINVAL;
 	if (!info->type->parse_irq) {
-- 
2.25.1