From 4967d53dbbcebf590c5ae07c0aea38619ac51954 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Fri, 4 May 2012 09:16:57 -0300 Subject: [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 Acked-by: Tobias Lorenz Signed-off-by: Mauro Carvalho Chehab --- drivers/media/radio/si470x/radio-si470x.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'drivers/media/radio/si470x/radio-si470x.h') 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 #include #include +#include +#include +#include #include @@ -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); -- cgit