[PATCH -next v2 6/7] regulator: pfuze100-regulator: Remove redundant of_match_ptr() macro

Chen Jiahao chenjiahao16 at huawei.com
Wed Aug 9 03:04:27 PDT 2023


Since the driver pfuze100-regulator depends on CONFIG_OF,
it makes no difference to wrap of_match_ptr() here.

Remove the of_match_ptr() macro to clean it up.

Signed-off-by: Chen Jiahao <chenjiahao16 at huawei.com>
---
 drivers/regulator/pfuze100-regulator.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/regulator/pfuze100-regulator.c b/drivers/regulator/pfuze100-regulator.c
index 8d7e6c323324..46854602b3ea 100644
--- a/drivers/regulator/pfuze100-regulator.c
+++ b/drivers/regulator/pfuze100-regulator.c
@@ -699,8 +699,7 @@ static int pfuze100_regulator_probe(struct i2c_client *client)
 		return -ENOMEM;
 
 	if (client->dev.of_node) {
-		match = of_match_device(of_match_ptr(pfuze_dt_ids),
-				&client->dev);
+		match = of_match_device(pfuze_dt_ids, &client->dev);
 		if (!match) {
 			dev_err(&client->dev, "Error: No device match found\n");
 			return -ENODEV;
-- 
2.34.1




More information about the linux-arm-kernel mailing list