Skip to content

Commit 360bc3a

Browse files
geertulag-linaro
authored andcommitted
mfd: core: Improve compile coverage of mfd_match_of_node_to_dev()
As of commit c7fe3bb ('mfd: core: Use of_property_read_reg() to parse "reg"'), all code in mfd_match_of_node_to_dev() compiles fine when CONFIG_OF is disabled. As the sole caller of this function is protected by IS_ENABLED(CONFIG_OF), the #ifdef inside the function can be removed to increase build coverage, without impacting code size. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://patch.msgid.link/7b9a4a355c5da3fe812ead663285d05b64b84857.1764320964.git.geert+renesas@glider.be Signed-off-by: Lee Jones <lee@kernel.org>
1 parent ed30d02 commit 360bc3a

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

drivers/mfd/mfd-core.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ static int mfd_match_of_node_to_dev(struct platform_device *pdev,
100100
struct device_node *np,
101101
const struct mfd_cell *cell)
102102
{
103-
#if IS_ENABLED(CONFIG_OF)
104103
struct mfd_of_node_entry *of_entry;
105104
u64 of_node_addr;
106105

@@ -133,7 +132,6 @@ static int mfd_match_of_node_to_dev(struct platform_device *pdev,
133132

134133
of_node_get(np);
135134
device_set_node(&pdev->dev, of_fwnode_handle(np));
136-
#endif
137135
return 0;
138136
}
139137

0 commit comments

Comments
 (0)