Skip to content

Commit

Permalink
clk: vc7: Use device_get_match_data() instead of of_device_get_match_…
Browse files Browse the repository at this point in the history
…data()

Use device_get_match_data() which, unlike of_device_get_match_data(),
is compatible with other firmware interfaces than just OF.

Signed-off-by: Marek Vasut <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
  • Loading branch information
Marek Vasut authored and bebarino committed Jun 9, 2023
1 parent d3d1c5e commit 893911e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/clk/clk-versaclock7.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_platform.h>
#include <linux/property.h>
#include <linux/regmap.h>
#include <linux/swab.h>

Expand Down Expand Up @@ -1108,7 +1109,7 @@ static int vc7_probe(struct i2c_client *client)

i2c_set_clientdata(client, vc7);
vc7->client = client;
vc7->chip_info = of_device_get_match_data(&client->dev);
vc7->chip_info = device_get_match_data(&client->dev);

vc7->pin_xin = devm_clk_get(&client->dev, "xin");
if (PTR_ERR(vc7->pin_xin) == -EPROBE_DEFER) {
Expand Down

0 comments on commit 893911e

Please sign in to comment.