dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] drm/i2c: tda998x: remove redundant of_match_ptr
@ 2023-07-31 13:02 Zhu Wang
  2023-07-31 23:18 ` kernel test robot
  2023-08-01  3:23 ` kernel test robot
  0 siblings, 2 replies; 3+ messages in thread
From: Zhu Wang @ 2023-07-31 13:02 UTC (permalink / raw)
  To: linux, airlied, daniel, dri-devel, u.kleine-koenig, arnd; +Cc: wangzhu9

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@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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-08-01  3:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-31 13:02 [PATCH -next] drm/i2c: tda998x: remove redundant of_match_ptr Zhu Wang
2023-07-31 23:18 ` kernel test robot
2023-08-01  3:23 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox