Skip to content

Commit

Permalink
media: ov772x: omit consumer ID when getting clock reference
Browse files Browse the repository at this point in the history
Currently the ov772x driver obtains a clock with a specific consumer ID.
As there's a single clock for this driver, we could omit clock-names
property in device tree by passing NULL as a consumer ID to clk_get().

Cc: Laurent Pinchart <[email protected]>
Cc: Hans Verkuil <[email protected]>
Suggested-by: Laurent Pinchart <[email protected]>
Tested-by: Jacopo Mondi <[email protected]>
Signed-off-by: Akinobu Mita <[email protected]>
Signed-off-by: Sakari Ailus <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
mita authored and mchehab committed Jun 28, 2018
1 parent 40519d5 commit 89ce93f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion arch/sh/boards/mach-migor/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ static int __init migor_devices_setup(void)
}

/* Add a clock alias for ov7725 xclk source. */
clk_add_alias("xclk", "0-0021", "video_clk", NULL);
clk_add_alias(NULL, "0-0021", "video_clk", NULL);

/* Register GPIOs for video sources. */
gpiod_add_lookup_table(&ov7725_gpios);
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/i2c/ov772x.c
Original file line number Diff line number Diff line change
Expand Up @@ -1300,7 +1300,7 @@ static int ov772x_probe(struct i2c_client *client,
if (priv->hdl.error)
return priv->hdl.error;

priv->clk = clk_get(&client->dev, "xclk");
priv->clk = clk_get(&client->dev, NULL);
if (IS_ERR(priv->clk)) {
dev_err(&client->dev, "Unable to get xclk clock\n");
ret = PTR_ERR(priv->clk);
Expand Down

0 comments on commit 89ce93f

Please sign in to comment.