[PATCH -next] drm/i2c: tda998x: remove redundant of_match_ptr
Zhu Wang
wangzhu9 at huawei.com
Mon Jul 31 13:02:57 UTC 2023
The driver depends on CONFIG_OF, so it is not necessary to use
of_match_ptr here.
Even for drivers that do not depend on CONFIG_OF, it's almost always
better to leave out the of_match_ptr(), since the only thing it can
possibly do is to save a few bytes of .text if a driver can be used both
with and without it. Hence we remove of_match_ptr.
Signed-off-by: Zhu Wang <wangzhu9 at huawei.com>
---
drivers/gpu/drm/i2c/tda998x_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c
index d8d7de18dd65..d1a6c87290f2 100644
--- a/drivers/gpu/drm/i2c/tda998x_drv.c
+++ b/drivers/gpu/drm/i2c/tda998x_drv.c
@@ -2103,7 +2103,7 @@ static struct i2c_driver tda998x_driver = {
.remove = tda998x_remove,
.driver = {
.name = "tda998x",
- .of_match_table = of_match_ptr(tda998x_dt_ids),
+ .of_match_table = tda998x_dt_ids,
},
.id_table = tda998x_ids,
};
--
2.17.1
More information about the dri-devel
mailing list