From: Ruan Jinjie Date: Mon, 7 Aug 2023 13:41:27 +0000 (+0800) Subject: regulator: rpi-panel-attiny-regulator: Remove redundant of_match_ptr() X-Git-Tag: v6.6.7~1951^2~35 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=200ee464f7a9a4e8d7a51a2083b28cf240e7cb91;p=platform%2Fkernel%2Flinux-starfive.git regulator: rpi-panel-attiny-regulator: Remove redundant of_match_ptr() The driver depends on CONFIG_OF, so it is not necessary to use of_match_ptr() here, and __maybe_unused can also be removed. 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. Signed-off-by: Ruan Jinjie Link: https://lore.kernel.org/r/20230807134127.2380390-1-ruanjinjie@huawei.com Signed-off-by: Mark Brown --- diff --git a/drivers/regulator/rpi-panel-attiny-regulator.c b/drivers/regulator/rpi-panel-attiny-regulator.c index e9719a3..ed046cc 100644 --- a/drivers/regulator/rpi-panel-attiny-regulator.c +++ b/drivers/regulator/rpi-panel-attiny-regulator.c @@ -397,7 +397,7 @@ static struct i2c_driver attiny_regulator_driver = { .driver = { .name = "rpi_touchscreen_attiny", .probe_type = PROBE_PREFER_ASYNCHRONOUS, - .of_match_table = of_match_ptr(attiny_dt_ids), + .of_match_table = attiny_dt_ids, }, .probe = attiny_i2c_probe, .remove = attiny_i2c_remove,