Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 366724
b: refs/heads/master
c: 385624a
h: refs/heads/master
v: v3
  • Loading branch information
Eduardo Valentin authored and Mauro Carvalho Chehab committed Mar 23, 2013
1 parent 91c7fce commit 33184ee
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 28 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b09e71a8de288bbd2e8ad48e6537d64214aad51b
refs/heads/master: 385624a8e74374f19a3db4f066dd21f213447a7a
53 changes: 26 additions & 27 deletions trunk/drivers/media/radio/radio-si4713.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,15 @@ static int radio_si4713_querycap(struct file *file, void *priv,
{
strlcpy(capability->driver, "radio-si4713", sizeof(capability->driver));
strlcpy(capability->card, "Silicon Labs Si4713 Modulator",
sizeof(capability->card));
sizeof(capability->card));
capability->capabilities = V4L2_CAP_MODULATOR | V4L2_CAP_RDS_OUTPUT;

return 0;
}

/* radio_si4713_queryctrl - enumerate control items */
static int radio_si4713_queryctrl(struct file *file, void *priv,
struct v4l2_queryctrl *qc)
struct v4l2_queryctrl *qc)
{
/* Must be sorted from low to high control ID! */
static const u32 user_ctrls[] = {
Expand Down Expand Up @@ -152,7 +152,7 @@ static int radio_si4713_queryctrl(struct file *file, void *priv,
return v4l2_ctrl_query_fill(qc, 0, 0, 0, 0);

return v4l2_device_call_until_err(&rsdev->v4l2_dev, 0, core,
queryctrl, qc);
queryctrl, qc);
}

/*
Expand All @@ -165,66 +165,66 @@ static inline struct v4l2_device *get_v4l2_dev(struct file *file)
}

static int radio_si4713_g_ext_ctrls(struct file *file, void *p,
struct v4l2_ext_controls *vecs)
struct v4l2_ext_controls *vecs)
{
return v4l2_device_call_until_err(get_v4l2_dev(file), 0, core,
g_ext_ctrls, vecs);
g_ext_ctrls, vecs);
}

static int radio_si4713_s_ext_ctrls(struct file *file, void *p,
struct v4l2_ext_controls *vecs)
struct v4l2_ext_controls *vecs)
{
return v4l2_device_call_until_err(get_v4l2_dev(file), 0, core,
s_ext_ctrls, vecs);
s_ext_ctrls, vecs);
}

static int radio_si4713_g_ctrl(struct file *file, void *p,
struct v4l2_control *vc)
struct v4l2_control *vc)
{
return v4l2_device_call_until_err(get_v4l2_dev(file), 0, core,
g_ctrl, vc);
g_ctrl, vc);
}

static int radio_si4713_s_ctrl(struct file *file, void *p,
struct v4l2_control *vc)
struct v4l2_control *vc)
{
return v4l2_device_call_until_err(get_v4l2_dev(file), 0, core,
s_ctrl, vc);
s_ctrl, vc);
}

static int radio_si4713_g_modulator(struct file *file, void *p,
struct v4l2_modulator *vm)
struct v4l2_modulator *vm)
{
return v4l2_device_call_until_err(get_v4l2_dev(file), 0, tuner,
g_modulator, vm);
g_modulator, vm);
}

static int radio_si4713_s_modulator(struct file *file, void *p,
const struct v4l2_modulator *vm)
const struct v4l2_modulator *vm)
{
return v4l2_device_call_until_err(get_v4l2_dev(file), 0, tuner,
s_modulator, vm);
s_modulator, vm);
}

static int radio_si4713_g_frequency(struct file *file, void *p,
struct v4l2_frequency *vf)
struct v4l2_frequency *vf)
{
return v4l2_device_call_until_err(get_v4l2_dev(file), 0, tuner,
g_frequency, vf);
g_frequency, vf);
}

static int radio_si4713_s_frequency(struct file *file, void *p,
struct v4l2_frequency *vf)
struct v4l2_frequency *vf)
{
return v4l2_device_call_until_err(get_v4l2_dev(file), 0, tuner,
s_frequency, vf);
s_frequency, vf);
}

static long radio_si4713_default(struct file *file, void *p,
bool valid_prio, int cmd, void *arg)
bool valid_prio, int cmd, void *arg)
{
return v4l2_device_call_until_err(get_v4l2_dev(file), 0, core,
ioctl, cmd, arg);
ioctl, cmd, arg);
}

static struct v4l2_ioctl_ops radio_si4713_ioctl_ops = {
Expand Down Expand Up @@ -285,13 +285,13 @@ static int radio_si4713_pdriver_probe(struct platform_device *pdev)
adapter = i2c_get_adapter(pdata->i2c_bus);
if (!adapter) {
dev_err(&pdev->dev, "Cannot get i2c adapter %d\n",
pdata->i2c_bus);
pdata->i2c_bus);
rval = -ENODEV;
goto unregister_v4l2_dev;
}

sd = v4l2_i2c_new_subdev_board(&rsdev->v4l2_dev, adapter,
pdata->subdev_board_info, NULL);
pdata->subdev_board_info, NULL);
if (!sd) {
dev_err(&pdev->dev, "Cannot get v4l2 subdevice\n");
rval = -ENODEV;
Expand All @@ -306,7 +306,7 @@ static int radio_si4713_pdriver_probe(struct platform_device *pdev)
}

memcpy(rsdev->radio_dev, &radio_si4713_vdev_template,
sizeof(radio_si4713_vdev_template));
sizeof(radio_si4713_vdev_template));
video_set_drvdata(rsdev->radio_dev, rsdev);
if (video_register_device(rsdev->radio_dev, VFL_TYPE_RADIO, radio_nr)) {
dev_err(&pdev->dev, "Could not register video device.\n");
Expand All @@ -331,13 +331,12 @@ static int radio_si4713_pdriver_probe(struct platform_device *pdev)
static int radio_si4713_pdriver_remove(struct platform_device *pdev)
{
struct v4l2_device *v4l2_dev = platform_get_drvdata(pdev);
struct radio_si4713_device *rsdev = container_of(v4l2_dev,
struct radio_si4713_device,
v4l2_dev);
struct v4l2_subdev *sd = list_entry(v4l2_dev->subdevs.next,
struct v4l2_subdev, list);
struct i2c_client *client = v4l2_get_subdevdata(sd);
struct radio_si4713_device *rsdev;

rsdev = container_of(v4l2_dev, struct radio_si4713_device, v4l2_dev);
video_unregister_device(rsdev->radio_dev);
i2c_put_adapter(client->adapter);
v4l2_device_unregister(&rsdev->v4l2_dev);
Expand Down

0 comments on commit 33184ee

Please sign in to comment.