[PATCH] drm/bridge/analogix/anx78xx: Extend match data support for ID table
Biju Das
biju.das.jz at bp.renesas.com
Sun Aug 13 08:51:37 UTC 2023
The driver has ID table, but still it uses device_get_match_data()
for retrieving match data. Replace device_get_match_data->
i2c_get_match_data() for retrieving OF/ACPI/I2C match data by adding
match data for ID table similar to OF table.
Signed-off-by: Biju Das <biju.das.jz at bp.renesas.com>
---
This patch is only compile tested
---
drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c b/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c
index 800555aef97f..f56a46b993a7 100644
--- a/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c
+++ b/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c
@@ -1259,7 +1259,7 @@ static int anx78xx_i2c_probe(struct i2c_client *client)
}
/* Map slave addresses of ANX7814 */
- i2c_addresses = device_get_match_data(&client->dev);
+ i2c_addresses = i2c_get_match_data(client);
for (i = 0; i < I2C_NUM_ADDRESSES; i++) {
struct i2c_client *i2c_dummy;
@@ -1368,7 +1368,7 @@ static void anx78xx_i2c_remove(struct i2c_client *client)
}
static const struct i2c_device_id anx78xx_id[] = {
- { "anx7814", 0 },
+ { "anx7814", (kernel_ulong_t)anx781x_i2c_addresses },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(i2c, anx78xx_id);
--
2.25.1
More information about the dri-devel
mailing list