Skip to content

Commit cde8e3a

Browse files
Minghao Chi (CGEL ZTE)bebarino
authored andcommitted
clk: Use of_device_get_match_data()
Use of_device_get_match_data() to simplify the code. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Minghao Chi (CGEL ZTE) <chi.minghao@zte.com.cn> Link: https://lore.kernel.org/r/20220303014856.2059307-1-chi.minghao@zte.com.cn Acked-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
1 parent 09e3b18 commit cde8e3a

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

drivers/clk/clk-oxnas.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -209,15 +209,11 @@ static int oxnas_stdclk_probe(struct platform_device *pdev)
209209
{
210210
struct device_node *np = pdev->dev.of_node;
211211
const struct oxnas_stdclk_data *data;
212-
const struct of_device_id *id;
213212
struct regmap *regmap;
214213
int ret;
215214
int i;
216215

217-
id = of_match_device(oxnas_stdclk_dt_ids, &pdev->dev);
218-
if (!id)
219-
return -ENODEV;
220-
data = id->data;
216+
data = of_device_get_match_data(&pdev->dev);
221217

222218
regmap = syscon_node_to_regmap(of_get_parent(np));
223219
if (IS_ERR(regmap)) {

0 commit comments

Comments
 (0)