diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2012-05-04 14:16:57 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-05-14 18:44:02 +0200 |
commit | 4967d53dbbcebf590c5ae07c0aea38619ac51954 (patch) | |
tree | 0591424809d99161f6c420d263c6e23cedd8b724 /drivers/media/radio/si470x/radio-si470x.h | |
parent | [media] v4l: v4l2-ctrls: moves the forward declaration of struct file (diff) | |
download | linux-4967d53dbbcebf590c5ae07c0aea38619ac51954.tar.xz linux-4967d53dbbcebf590c5ae07c0aea38619ac51954.zip |
[media] si470x: Clean up, introduce the control framework
This cleans up the code and si470x now uses the proper v4l2 frameworks
and passes most of the v4l2-compliance tests.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/radio/si470x/radio-si470x.h')
-rw-r--r-- | drivers/media/radio/si470x/radio-si470x.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/media/radio/si470x/radio-si470x.h b/drivers/media/radio/si470x/radio-si470x.h index f300a55ed85c..4921cab8e0fa 100644 --- a/drivers/media/radio/si470x/radio-si470x.h +++ b/drivers/media/radio/si470x/radio-si470x.h @@ -36,6 +36,9 @@ #include <linux/mutex.h> #include <media/v4l2-common.h> #include <media/v4l2-ioctl.h> +#include <media/v4l2-ctrls.h> +#include <media/v4l2-event.h> +#include <media/v4l2-device.h> #include <asm/unaligned.h> @@ -141,10 +144,9 @@ * si470x_device - private data */ struct si470x_device { - struct video_device *videodev; - - /* driver management */ - unsigned int users; + struct v4l2_device v4l2_dev; + struct video_device videodev; + struct v4l2_ctrl_handler hdl; /* Silabs internal registers (0..15) */ unsigned short registers[RADIO_REGISTER_NUM]; @@ -174,9 +176,6 @@ struct si470x_device { /* scratch page */ unsigned char software_version; unsigned char hardware_version; - - /* driver management */ - unsigned char disconnected; #endif #if defined(CONFIG_I2C_SI470X) || defined(CONFIG_I2C_SI470X_MODULE) @@ -213,6 +212,7 @@ struct si470x_device { * Common Functions **************************************************************************/ extern struct video_device si470x_viddev_template; +extern const struct v4l2_ctrl_ops si470x_ctrl_ops; int si470x_get_register(struct si470x_device *radio, int regnr); int si470x_set_register(struct si470x_device *radio, int regnr); int si470x_disconnect_check(struct si470x_device *radio); |