Skip to content

Commit

Permalink
clk: meson: use dev pointer where possible
Browse files Browse the repository at this point in the history
The 'dev' pointer is directly available in gxbb and axg clock
controller, so consistently use it instead of going the through the
'pdev' pointer once in while

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
  • Loading branch information
Jerome Brunet authored and Neil Armstrong committed Mar 13, 2018
1 parent 867a5a1 commit 323346d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions drivers/clk/meson/axg.c
Original file line number Diff line number Diff line change
Expand Up @@ -804,17 +804,17 @@ static int axg_clkc_probe(struct platform_device *pdev)
void __iomem *clk_base;
int ret, clkid, i;

clkc_data = of_device_get_match_data(&pdev->dev);
clkc_data = of_device_get_match_data(dev);
if (!clkc_data)
return -EINVAL;

/* Generic clocks and PLLs */
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res)
return -EINVAL;
clk_base = devm_ioremap(&pdev->dev, res->start, resource_size(res));
clk_base = devm_ioremap(dev, res->start, resource_size(res));
if (!clk_base) {
dev_err(&pdev->dev, "Unable to map clk base\n");
dev_err(dev, "Unable to map clk base\n");
return -ENXIO;
}

Expand Down Expand Up @@ -849,7 +849,7 @@ static int axg_clkc_probe(struct platform_device *pdev)
ret = devm_clk_hw_register(dev,
clkc_data->hw_onecell_data->hws[clkid]);
if (ret) {
dev_err(&pdev->dev, "Clock registration failed\n");
dev_err(dev, "Clock registration failed\n");
return ret;
}
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/clk/meson/gxbb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1950,7 +1950,7 @@ static int gxbb_clkc_probe(struct platform_device *pdev)
int ret, clkid, i;
struct device *dev = &pdev->dev;

clkc_data = of_device_get_match_data(&pdev->dev);
clkc_data = of_device_get_match_data(dev);
if (!clkc_data)
return -EINVAL;

Expand Down

0 comments on commit 323346d

Please sign in to comment.