Skip to content

Commit

Permalink
clk: Use of_device_get_match_data()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Minghao Chi (CGEL ZTE) authored and Stephen Boyd committed Mar 12, 2022
1 parent 09e3b18 commit cde8e3a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/clk/clk-oxnas.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,15 +209,11 @@ static int oxnas_stdclk_probe(struct platform_device *pdev)
{
struct device_node *np = pdev->dev.of_node;
const struct oxnas_stdclk_data *data;
const struct of_device_id *id;
struct regmap *regmap;
int ret;
int i;

id = of_match_device(oxnas_stdclk_dt_ids, &pdev->dev);
if (!id)
return -ENODEV;
data = id->data;
data = of_device_get_match_data(&pdev->dev);

regmap = syscon_node_to_regmap(of_get_parent(np));
if (IS_ERR(regmap)) {
Expand Down

0 comments on commit cde8e3a

Please sign in to comment.