diff mbox series

[-next] of: unittest: Remove redundant of_match_ptr()

Message ID 20230808094043.2732158-1-ruanjinjie@huawei.com
State Accepted, archived
Headers show
Series [-next] of: unittest: Remove redundant of_match_ptr() | expand

Checks

Context Check Description
robh/checkpatch success
robh/patch-applied fail build log

Commit Message

Jinjie Ruan Aug. 8, 2023, 9:40 a.m. UTC
The driver depends on CONFIG_OF, it is not necessary to use
of_match_ptr() here.

Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
---
 drivers/of/unittest.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Rob Herring (Arm) Aug. 10, 2023, 10:15 p.m. UTC | #1
On Tue, 08 Aug 2023 17:40:43 +0800, Ruan Jinjie wrote:
> The driver depends on CONFIG_OF, it is not necessary to use
> of_match_ptr() here.
> 
> Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
> ---
>  drivers/of/unittest.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 

Applied, thanks!
diff mbox series

Patch

diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
index e5b0eea8011c..3444386ceb02 100644
--- a/drivers/of/unittest.c
+++ b/drivers/of/unittest.c
@@ -1696,7 +1696,7 @@  static struct platform_driver unittest_driver = {
 	.remove_new		= unittest_remove,
 	.driver = {
 		.name		= "unittest",
-		.of_match_table	= of_match_ptr(unittest_match),
+		.of_match_table	= unittest_match,
 	},
 };
 
@@ -1797,7 +1797,7 @@  static struct platform_driver unittest_gpio_driver = {
 	.remove_new = unittest_gpio_remove,
 	.driver	= {
 		.name		= "unittest-gpio",
-		.of_match_table	= of_match_ptr(unittest_gpio_id),
+		.of_match_table	= unittest_gpio_id,
 	},
 };
 
@@ -2624,7 +2624,7 @@  static struct platform_driver unittest_i2c_bus_driver = {
 	.remove_new		= unittest_i2c_bus_remove,
 	.driver = {
 		.name		= "unittest-i2c-bus",
-		.of_match_table	= of_match_ptr(unittest_i2c_bus_match),
+		.of_match_table	= unittest_i2c_bus_match,
 	},
 };