aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/cinergyT2/cinergyT2.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/dvb/cinergyT2/cinergyT2.c')
-rw-r--r--drivers/media/dvb/cinergyT2/cinergyT2.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/media/dvb/cinergyT2/cinergyT2.c b/drivers/media/dvb/cinergyT2/cinergyT2.c
index 8a7dd507cf6e..206c13e47a06 100644
--- a/drivers/media/dvb/cinergyT2/cinergyT2.c
+++ b/drivers/media/dvb/cinergyT2/cinergyT2.c
@@ -128,7 +128,7 @@ struct cinergyt2 {
128 128
129 struct dvbt_set_parameters_msg param; 129 struct dvbt_set_parameters_msg param;
130 struct dvbt_get_status_msg status; 130 struct dvbt_get_status_msg status;
131 struct work_struct query_work; 131 struct delayed_work query_work;
132 132
133 wait_queue_head_t poll_wq; 133 wait_queue_head_t poll_wq;
134 int pending_fe_events; 134 int pending_fe_events;
@@ -142,7 +142,7 @@ struct cinergyt2 {
142#ifdef ENABLE_RC 142#ifdef ENABLE_RC
143 struct input_dev *rc_input_dev; 143 struct input_dev *rc_input_dev;
144 char phys[64]; 144 char phys[64];
145 struct work_struct rc_query_work; 145 struct delayed_work rc_query_work;
146 int rc_input_event; 146 int rc_input_event;
147 u32 rc_last_code; 147 u32 rc_last_code;
148 unsigned long last_event_jiffies; 148 unsigned long last_event_jiffies;
@@ -723,9 +723,10 @@ static struct dvb_device cinergyt2_fe_template = {
723 723
724#ifdef ENABLE_RC 724#ifdef ENABLE_RC
725 725
726static void cinergyt2_query_rc (void *data) 726static void cinergyt2_query_rc (struct work_struct *work)
727{ 727{
728 struct cinergyt2 *cinergyt2 = data; 728 struct cinergyt2 *cinergyt2 =
729 container_of(work, struct cinergyt2, rc_query_work.work);
729 char buf[1] = { CINERGYT2_EP1_GET_RC_EVENTS }; 730 char buf[1] = { CINERGYT2_EP1_GET_RC_EVENTS };
730 struct cinergyt2_rc_event rc_events[12]; 731 struct cinergyt2_rc_event rc_events[12];
731 int n, len, i; 732 int n, len, i;
@@ -806,7 +807,7 @@ static int cinergyt2_register_rc(struct cinergyt2 *cinergyt2)
806 strlcat(cinergyt2->phys, "/input0", sizeof(cinergyt2->phys)); 807 strlcat(cinergyt2->phys, "/input0", sizeof(cinergyt2->phys));
807 cinergyt2->rc_input_event = KEY_MAX; 808 cinergyt2->rc_input_event = KEY_MAX;
808 cinergyt2->rc_last_code = ~0; 809 cinergyt2->rc_last_code = ~0;
809 INIT_WORK(&cinergyt2->rc_query_work, cinergyt2_query_rc, cinergyt2); 810 INIT_DELAYED_WORK(&cinergyt2->rc_query_work, cinergyt2_query_rc);
810 811
811 input_dev->name = DRIVER_NAME " remote control"; 812 input_dev->name = DRIVER_NAME " remote control";
812 input_dev->phys = cinergyt2->phys; 813 input_dev->phys = cinergyt2->phys;
@@ -847,9 +848,10 @@ static inline void cinergyt2_resume_rc(struct cinergyt2 *cinergyt2) { }
847 848
848#endif /* ENABLE_RC */ 849#endif /* ENABLE_RC */
849 850
850static void cinergyt2_query (void *data) 851static void cinergyt2_query (struct work_struct *work)
851{ 852{
852 struct cinergyt2 *cinergyt2 = (struct cinergyt2 *) data; 853 struct cinergyt2 *cinergyt2 =
854 container_of(work, struct cinergyt2, query_work.work);
853 char cmd [] = { CINERGYT2_EP1_GET_TUNER_STATUS }; 855 char cmd [] = { CINERGYT2_EP1_GET_TUNER_STATUS };
854 struct dvbt_get_status_msg *s = &cinergyt2->status; 856 struct dvbt_get_status_msg *s = &cinergyt2->status;
855 uint8_t lock_bits; 857 uint8_t lock_bits;
@@ -893,7 +895,7 @@ static int cinergyt2_probe (struct usb_interface *intf,
893 895
894 mutex_init(&cinergyt2->sem); 896 mutex_init(&cinergyt2->sem);
895 init_waitqueue_head (&cinergyt2->poll_wq); 897 init_waitqueue_head (&cinergyt2->poll_wq);
896 INIT_WORK(&cinergyt2->query_work, cinergyt2_query, cinergyt2); 898 INIT_DELAYED_WORK(&cinergyt2->query_work, cinergyt2_query);
897 899
898 cinergyt2->udev = interface_to_usbdev(intf); 900 cinergyt2->udev = interface_to_usbdev(intf);
899 cinergyt2->param.cmd = CINERGYT2_EP1_SET_TUNER_PARAMETERS; 901 cinergyt2->param.cmd = CINERGYT2_EP1_SET_TUNER_PARAMETERS;