Skip to content

Commit

Permalink
[media] smiapp: Call the clock "ext_clk"
Browse files Browse the repository at this point in the history
As the clock framework makes it possible to assign a device specific name to
the clocks, remove the ability to use a named clock in the driver.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
  • Loading branch information
Sakari Ailus authored and Mauro Carvalho Chehab committed Aug 22, 2013
1 parent d0aae00 commit a354177
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
9 changes: 3 additions & 6 deletions drivers/media/i2c/smiapp/smiapp-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2363,20 +2363,17 @@ static int smiapp_registered(struct v4l2_subdev *subdev)
}

if (!sensor->platform_data->set_xclk) {
sensor->ext_clk = devm_clk_get(&client->dev,
sensor->platform_data->ext_clk_name);
sensor->ext_clk = devm_clk_get(&client->dev, "ext_clk");
if (IS_ERR(sensor->ext_clk)) {
dev_err(&client->dev, "could not get clock %s\n",
sensor->platform_data->ext_clk_name);
dev_err(&client->dev, "could not get clock\n");
return -ENODEV;
}

rval = clk_set_rate(sensor->ext_clk,
sensor->platform_data->ext_clk);
if (rval < 0) {
dev_err(&client->dev,
"unable to set clock %s freq to %u\n",
sensor->platform_data->ext_clk_name,
"unable to set clock freq to %u\n",
sensor->platform_data->ext_clk);
return -ENODEV;
}
Expand Down
1 change: 0 additions & 1 deletion include/media/smiapp.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ struct smiapp_platform_data {
struct smiapp_flash_strobe_parms *strobe_setup;

int (*set_xclk)(struct v4l2_subdev *sd, int hz);
char *ext_clk_name;
int xshutdown; /* gpio or SMIAPP_NO_XSHUTDOWN */
};

Expand Down

0 comments on commit a354177

Please sign in to comment.