Skip to content

Commit 3988795

Browse files
Chen Jiahaobroonie
authored andcommitted
regulator: mcp16502: Remove redundant of_match_ptr() macros
Since the driver mcp16502 depends on CONFIG_OF, it makes no difference to wrap of_match_ptr() here. Remove of_match_ptr() macros to clean it up. Signed-off-by: Chen Jiahao <chenjiahao16@huawei.com> Link: https://lore.kernel.org/r/20230809100428.2669817-5-chenjiahao16@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 656ed74 commit 3988795

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/regulator/mcp16502.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ static unsigned int mcp16502_of_map_mode(unsigned int mode)
110110
#define MCP16502_REGULATOR(_name, _id, _ranges, _ops, _ramp_table) \
111111
[_id] = { \
112112
.name = _name, \
113-
.regulators_node = of_match_ptr("regulators"), \
113+
.regulators_node = "regulators", \
114114
.id = _id, \
115115
.ops = &(_ops), \
116116
.type = REGULATOR_VOLTAGE, \
@@ -119,7 +119,7 @@ static unsigned int mcp16502_of_map_mode(unsigned int mode)
119119
.linear_ranges = _ranges, \
120120
.linear_min_sel = VDD_LOW_SEL, \
121121
.n_linear_ranges = ARRAY_SIZE(_ranges), \
122-
.of_match = of_match_ptr(_name), \
122+
.of_match = _name, \
123123
.of_map_mode = mcp16502_of_map_mode, \
124124
.vsel_reg = (((_id) + 1) << 4), \
125125
.vsel_mask = MCP16502_VSEL, \
@@ -587,7 +587,7 @@ static struct i2c_driver mcp16502_drv = {
587587
.driver = {
588588
.name = "mcp16502-regulator",
589589
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
590-
.of_match_table = of_match_ptr(mcp16502_ids),
590+
.of_match_table = mcp16502_ids,
591591
#ifdef CONFIG_PM
592592
.pm = &mcp16502_pm_ops,
593593
#endif

0 commit comments

Comments
 (0)