diff options
Diffstat (limited to 'drivers/media')
77 files changed, 221 insertions, 174 deletions
diff --git a/drivers/media/common/saa7146_i2c.c b/drivers/media/common/saa7146_i2c.c index d9953f7a8b6b..5297a365c928 100644 --- a/drivers/media/common/saa7146_i2c.c +++ b/drivers/media/common/saa7146_i2c.c | |||
@@ -217,11 +217,9 @@ static int saa7146_i2c_writeout(struct saa7146_dev *dev, u32* dword, int short_d | |||
217 | } | 217 | } |
218 | /* wait until we get a transfer done or error */ | 218 | /* wait until we get a transfer done or error */ |
219 | timeout = jiffies + HZ/100 + 1; /* 10ms */ | 219 | timeout = jiffies + HZ/100 + 1; /* 10ms */ |
220 | /* first read usually delivers bogus results... */ | ||
221 | saa7146_i2c_status(dev); | ||
220 | while(1) { | 222 | while(1) { |
221 | /** | ||
222 | * first read usually delivers bogus results... | ||
223 | */ | ||
224 | saa7146_i2c_status(dev); | ||
225 | status = saa7146_i2c_status(dev); | 223 | status = saa7146_i2c_status(dev); |
226 | if ((status & 0x3) != 1) | 224 | if ((status & 0x3) != 1) |
227 | break; | 225 | break; |
@@ -232,10 +230,10 @@ static int saa7146_i2c_writeout(struct saa7146_dev *dev, u32* dword, int short_d | |||
232 | DEB_I2C(("saa7146_i2c_writeout: timed out waiting for end of xfer\n")); | 230 | DEB_I2C(("saa7146_i2c_writeout: timed out waiting for end of xfer\n")); |
233 | return -EIO; | 231 | return -EIO; |
234 | } | 232 | } |
235 | if ((++trial < 20) && short_delay) | 233 | if (++trial < 50 && short_delay) |
236 | udelay(10); | 234 | udelay(10); |
237 | else | 235 | else |
238 | msleep(1); | 236 | msleep(1); |
239 | } | 237 | } |
240 | } | 238 | } |
241 | 239 | ||
diff --git a/drivers/media/dvb/b2c2/flexcop-pci.c b/drivers/media/dvb/b2c2/flexcop-pci.c index 06893243f3d4..6e166801505d 100644 --- a/drivers/media/dvb/b2c2/flexcop-pci.c +++ b/drivers/media/dvb/b2c2/flexcop-pci.c | |||
@@ -63,7 +63,7 @@ struct flexcop_pci { | |||
63 | 63 | ||
64 | unsigned long last_irq; | 64 | unsigned long last_irq; |
65 | 65 | ||
66 | struct work_struct irq_check_work; | 66 | struct delayed_work irq_check_work; |
67 | 67 | ||
68 | struct flexcop_device *fc_dev; | 68 | struct flexcop_device *fc_dev; |
69 | }; | 69 | }; |
@@ -97,9 +97,10 @@ static int flexcop_pci_write_ibi_reg(struct flexcop_device *fc, flexcop_ibi_regi | |||
97 | return 0; | 97 | return 0; |
98 | } | 98 | } |
99 | 99 | ||
100 | static void flexcop_pci_irq_check_work(void *data) | 100 | static void flexcop_pci_irq_check_work(struct work_struct *work) |
101 | { | 101 | { |
102 | struct flexcop_pci *fc_pci = data; | 102 | struct flexcop_pci *fc_pci = |
103 | container_of(work, struct flexcop_pci, irq_check_work.work); | ||
103 | struct flexcop_device *fc = fc_pci->fc_dev; | 104 | struct flexcop_device *fc = fc_pci->fc_dev; |
104 | 105 | ||
105 | flexcop_ibi_value v = fc->read_ibi_reg(fc,sram_dest_reg_714); | 106 | flexcop_ibi_value v = fc->read_ibi_reg(fc,sram_dest_reg_714); |
@@ -371,7 +372,7 @@ static int flexcop_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
371 | if ((ret = flexcop_pci_dma_init(fc_pci)) != 0) | 372 | if ((ret = flexcop_pci_dma_init(fc_pci)) != 0) |
372 | goto err_fc_exit; | 373 | goto err_fc_exit; |
373 | 374 | ||
374 | INIT_WORK(&fc_pci->irq_check_work, flexcop_pci_irq_check_work, fc_pci); | 375 | INIT_DELAYED_WORK(&fc_pci->irq_check_work, flexcop_pci_irq_check_work); |
375 | 376 | ||
376 | return ret; | 377 | return ret; |
377 | 378 | ||
diff --git a/drivers/media/dvb/b2c2/flexcop-usb.c b/drivers/media/dvb/b2c2/flexcop-usb.c index 2853ea1bdaf1..87fb75f0d1cf 100644 --- a/drivers/media/dvb/b2c2/flexcop-usb.c +++ b/drivers/media/dvb/b2c2/flexcop-usb.c | |||
@@ -246,7 +246,7 @@ static int flexcop_usb_i2c_req(struct flexcop_usb *fc_usb, | |||
246 | wIndex = (chipaddr << 8 ) | addr; | 246 | wIndex = (chipaddr << 8 ) | addr; |
247 | 247 | ||
248 | deb_i2c("i2c %2d: %02x %02x %02x %02x %02x %02x\n",func,request_type,req, | 248 | deb_i2c("i2c %2d: %02x %02x %02x %02x %02x %02x\n",func,request_type,req, |
249 | ((wValue && 0xff) << 8),wValue >> 8,((wIndex && 0xff) << 8),wIndex >> 8); | 249 | wValue & 0xff, wValue >> 8, wIndex & 0xff, wIndex >> 8); |
250 | 250 | ||
251 | len = usb_control_msg(fc_usb->udev,pipe, | 251 | len = usb_control_msg(fc_usb->udev,pipe, |
252 | req, | 252 | req, |
diff --git a/drivers/media/dvb/cinergyT2/cinergyT2.c b/drivers/media/dvb/cinergyT2/cinergyT2.c index ff7d4f56ced3..9123147e376f 100644 --- a/drivers/media/dvb/cinergyT2/cinergyT2.c +++ b/drivers/media/dvb/cinergyT2/cinergyT2.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/input.h> | 30 | #include <linux/input.h> |
31 | #include <linux/dvb/frontend.h> | 31 | #include <linux/dvb/frontend.h> |
32 | #include <linux/mutex.h> | 32 | #include <linux/mutex.h> |
33 | #include <linux/mm.h> | ||
33 | 34 | ||
34 | #include "dmxdev.h" | 35 | #include "dmxdev.h" |
35 | #include "dvb_demux.h" | 36 | #include "dvb_demux.h" |
@@ -127,7 +128,7 @@ struct cinergyt2 { | |||
127 | 128 | ||
128 | struct dvbt_set_parameters_msg param; | 129 | struct dvbt_set_parameters_msg param; |
129 | struct dvbt_get_status_msg status; | 130 | struct dvbt_get_status_msg status; |
130 | struct work_struct query_work; | 131 | struct delayed_work query_work; |
131 | 132 | ||
132 | wait_queue_head_t poll_wq; | 133 | wait_queue_head_t poll_wq; |
133 | int pending_fe_events; | 134 | int pending_fe_events; |
@@ -141,7 +142,7 @@ struct cinergyt2 { | |||
141 | #ifdef ENABLE_RC | 142 | #ifdef ENABLE_RC |
142 | struct input_dev *rc_input_dev; | 143 | struct input_dev *rc_input_dev; |
143 | char phys[64]; | 144 | char phys[64]; |
144 | struct work_struct rc_query_work; | 145 | struct delayed_work rc_query_work; |
145 | int rc_input_event; | 146 | int rc_input_event; |
146 | u32 rc_last_code; | 147 | u32 rc_last_code; |
147 | unsigned long last_event_jiffies; | 148 | unsigned long last_event_jiffies; |
@@ -275,8 +276,7 @@ static void cinergyt2_free_stream_urbs (struct cinergyt2 *cinergyt2) | |||
275 | int i; | 276 | int i; |
276 | 277 | ||
277 | for (i=0; i<STREAM_URB_COUNT; i++) | 278 | for (i=0; i<STREAM_URB_COUNT; i++) |
278 | if (cinergyt2->stream_urb[i]) | 279 | usb_free_urb(cinergyt2->stream_urb[i]); |
279 | usb_free_urb(cinergyt2->stream_urb[i]); | ||
280 | 280 | ||
281 | usb_buffer_free(cinergyt2->udev, STREAM_URB_COUNT*STREAM_BUF_SIZE, | 281 | usb_buffer_free(cinergyt2->udev, STREAM_URB_COUNT*STREAM_BUF_SIZE, |
282 | cinergyt2->streambuf, cinergyt2->streambuf_dmahandle); | 282 | cinergyt2->streambuf, cinergyt2->streambuf_dmahandle); |
@@ -287,7 +287,7 @@ static int cinergyt2_alloc_stream_urbs (struct cinergyt2 *cinergyt2) | |||
287 | int i; | 287 | int i; |
288 | 288 | ||
289 | cinergyt2->streambuf = usb_buffer_alloc(cinergyt2->udev, STREAM_URB_COUNT*STREAM_BUF_SIZE, | 289 | cinergyt2->streambuf = usb_buffer_alloc(cinergyt2->udev, STREAM_URB_COUNT*STREAM_BUF_SIZE, |
290 | SLAB_KERNEL, &cinergyt2->streambuf_dmahandle); | 290 | GFP_KERNEL, &cinergyt2->streambuf_dmahandle); |
291 | if (!cinergyt2->streambuf) { | 291 | if (!cinergyt2->streambuf) { |
292 | dprintk(1, "failed to alloc consistent stream memory area, bailing out!\n"); | 292 | dprintk(1, "failed to alloc consistent stream memory area, bailing out!\n"); |
293 | return -ENOMEM; | 293 | return -ENOMEM; |
@@ -320,8 +320,7 @@ static void cinergyt2_stop_stream_xfer (struct cinergyt2 *cinergyt2) | |||
320 | cinergyt2_control_stream_transfer(cinergyt2, 0); | 320 | cinergyt2_control_stream_transfer(cinergyt2, 0); |
321 | 321 | ||
322 | for (i=0; i<STREAM_URB_COUNT; i++) | 322 | for (i=0; i<STREAM_URB_COUNT; i++) |
323 | if (cinergyt2->stream_urb[i]) | 323 | usb_kill_urb(cinergyt2->stream_urb[i]); |
324 | usb_kill_urb(cinergyt2->stream_urb[i]); | ||
325 | } | 324 | } |
326 | 325 | ||
327 | static int cinergyt2_start_stream_xfer (struct cinergyt2 *cinergyt2) | 326 | static int cinergyt2_start_stream_xfer (struct cinergyt2 *cinergyt2) |
@@ -724,9 +723,10 @@ static struct dvb_device cinergyt2_fe_template = { | |||
724 | 723 | ||
725 | #ifdef ENABLE_RC | 724 | #ifdef ENABLE_RC |
726 | 725 | ||
727 | static void cinergyt2_query_rc (void *data) | 726 | static void cinergyt2_query_rc (struct work_struct *work) |
728 | { | 727 | { |
729 | struct cinergyt2 *cinergyt2 = data; | 728 | struct cinergyt2 *cinergyt2 = |
729 | container_of(work, struct cinergyt2, rc_query_work.work); | ||
730 | char buf[1] = { CINERGYT2_EP1_GET_RC_EVENTS }; | 730 | char buf[1] = { CINERGYT2_EP1_GET_RC_EVENTS }; |
731 | struct cinergyt2_rc_event rc_events[12]; | 731 | struct cinergyt2_rc_event rc_events[12]; |
732 | int n, len, i; | 732 | int n, len, i; |
@@ -807,7 +807,7 @@ static int cinergyt2_register_rc(struct cinergyt2 *cinergyt2) | |||
807 | strlcat(cinergyt2->phys, "/input0", sizeof(cinergyt2->phys)); | 807 | strlcat(cinergyt2->phys, "/input0", sizeof(cinergyt2->phys)); |
808 | cinergyt2->rc_input_event = KEY_MAX; | 808 | cinergyt2->rc_input_event = KEY_MAX; |
809 | cinergyt2->rc_last_code = ~0; | 809 | cinergyt2->rc_last_code = ~0; |
810 | INIT_WORK(&cinergyt2->rc_query_work, cinergyt2_query_rc, cinergyt2); | 810 | INIT_DELAYED_WORK(&cinergyt2->rc_query_work, cinergyt2_query_rc); |
811 | 811 | ||
812 | input_dev->name = DRIVER_NAME " remote control"; | 812 | input_dev->name = DRIVER_NAME " remote control"; |
813 | input_dev->phys = cinergyt2->phys; | 813 | input_dev->phys = cinergyt2->phys; |
@@ -848,9 +848,10 @@ static inline void cinergyt2_resume_rc(struct cinergyt2 *cinergyt2) { } | |||
848 | 848 | ||
849 | #endif /* ENABLE_RC */ | 849 | #endif /* ENABLE_RC */ |
850 | 850 | ||
851 | static void cinergyt2_query (void *data) | 851 | static void cinergyt2_query (struct work_struct *work) |
852 | { | 852 | { |
853 | struct cinergyt2 *cinergyt2 = (struct cinergyt2 *) data; | 853 | struct cinergyt2 *cinergyt2 = |
854 | container_of(work, struct cinergyt2, query_work.work); | ||
854 | char cmd [] = { CINERGYT2_EP1_GET_TUNER_STATUS }; | 855 | char cmd [] = { CINERGYT2_EP1_GET_TUNER_STATUS }; |
855 | struct dvbt_get_status_msg *s = &cinergyt2->status; | 856 | struct dvbt_get_status_msg *s = &cinergyt2->status; |
856 | uint8_t lock_bits; | 857 | uint8_t lock_bits; |
@@ -894,7 +895,7 @@ static int cinergyt2_probe (struct usb_interface *intf, | |||
894 | 895 | ||
895 | mutex_init(&cinergyt2->sem); | 896 | mutex_init(&cinergyt2->sem); |
896 | init_waitqueue_head (&cinergyt2->poll_wq); | 897 | init_waitqueue_head (&cinergyt2->poll_wq); |
897 | INIT_WORK(&cinergyt2->query_work, cinergyt2_query, cinergyt2); | 898 | INIT_DELAYED_WORK(&cinergyt2->query_work, cinergyt2_query); |
898 | 899 | ||
899 | cinergyt2->udev = interface_to_usbdev(intf); | 900 | cinergyt2->udev = interface_to_usbdev(intf); |
900 | cinergyt2->param.cmd = CINERGYT2_EP1_SET_TUNER_PARAMETERS; | 901 | cinergyt2->param.cmd = CINERGYT2_EP1_SET_TUNER_PARAMETERS; |
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c index 53304e6991ac..e85972222ab4 100644 --- a/drivers/media/dvb/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb/dvb-core/dvb_frontend.c | |||
@@ -34,7 +34,7 @@ | |||
34 | #include <linux/module.h> | 34 | #include <linux/module.h> |
35 | #include <linux/moduleparam.h> | 35 | #include <linux/moduleparam.h> |
36 | #include <linux/list.h> | 36 | #include <linux/list.h> |
37 | #include <linux/suspend.h> | 37 | #include <linux/freezer.h> |
38 | #include <linux/jiffies.h> | 38 | #include <linux/jiffies.h> |
39 | #include <asm/processor.h> | 39 | #include <asm/processor.h> |
40 | 40 | ||
@@ -348,7 +348,7 @@ static int dvb_frontend_swzigzag_autotune(struct dvb_frontend *fe, int check_wra | |||
348 | 348 | ||
349 | static void dvb_frontend_swzigzag(struct dvb_frontend *fe) | 349 | static void dvb_frontend_swzigzag(struct dvb_frontend *fe) |
350 | { | 350 | { |
351 | fe_status_t s; | 351 | fe_status_t s = 0; |
352 | struct dvb_frontend_private *fepriv = fe->frontend_priv; | 352 | struct dvb_frontend_private *fepriv = fe->frontend_priv; |
353 | 353 | ||
354 | /* if we've got no parameters, just keep idling */ | 354 | /* if we've got no parameters, just keep idling */ |
diff --git a/drivers/media/dvb/dvb-core/dvb_net.c b/drivers/media/dvb/dvb-core/dvb_net.c index 8859ab74f0fe..ebf4dc5190f6 100644 --- a/drivers/media/dvb/dvb-core/dvb_net.c +++ b/drivers/media/dvb/dvb-core/dvb_net.c | |||
@@ -127,6 +127,7 @@ struct dvb_net_priv { | |||
127 | int in_use; | 127 | int in_use; |
128 | struct net_device_stats stats; | 128 | struct net_device_stats stats; |
129 | u16 pid; | 129 | u16 pid; |
130 | struct net_device *net; | ||
130 | struct dvb_net *host; | 131 | struct dvb_net *host; |
131 | struct dmx_demux *demux; | 132 | struct dmx_demux *demux; |
132 | struct dmx_section_feed *secfeed; | 133 | struct dmx_section_feed *secfeed; |
@@ -1123,10 +1124,11 @@ static int dvb_set_mc_filter (struct net_device *dev, struct dev_mc_list *mc) | |||
1123 | } | 1124 | } |
1124 | 1125 | ||
1125 | 1126 | ||
1126 | static void wq_set_multicast_list (void *data) | 1127 | static void wq_set_multicast_list (struct work_struct *work) |
1127 | { | 1128 | { |
1128 | struct net_device *dev = data; | 1129 | struct dvb_net_priv *priv = |
1129 | struct dvb_net_priv *priv = dev->priv; | 1130 | container_of(work, struct dvb_net_priv, set_multicast_list_wq); |
1131 | struct net_device *dev = priv->net; | ||
1130 | 1132 | ||
1131 | dvb_net_feed_stop(dev); | 1133 | dvb_net_feed_stop(dev); |
1132 | priv->rx_mode = RX_MODE_UNI; | 1134 | priv->rx_mode = RX_MODE_UNI; |
@@ -1167,9 +1169,11 @@ static void dvb_net_set_multicast_list (struct net_device *dev) | |||
1167 | } | 1169 | } |
1168 | 1170 | ||
1169 | 1171 | ||
1170 | static void wq_restart_net_feed (void *data) | 1172 | static void wq_restart_net_feed (struct work_struct *work) |
1171 | { | 1173 | { |
1172 | struct net_device *dev = data; | 1174 | struct dvb_net_priv *priv = |
1175 | container_of(work, struct dvb_net_priv, restart_net_feed_wq); | ||
1176 | struct net_device *dev = priv->net; | ||
1173 | 1177 | ||
1174 | if (netif_running(dev)) { | 1178 | if (netif_running(dev)) { |
1175 | dvb_net_feed_stop(dev); | 1179 | dvb_net_feed_stop(dev); |
@@ -1276,6 +1280,7 @@ static int dvb_net_add_if(struct dvb_net *dvbnet, u16 pid, u8 feedtype) | |||
1276 | dvbnet->device[if_num] = net; | 1280 | dvbnet->device[if_num] = net; |
1277 | 1281 | ||
1278 | priv = net->priv; | 1282 | priv = net->priv; |
1283 | priv->net = net; | ||
1279 | priv->demux = dvbnet->demux; | 1284 | priv->demux = dvbnet->demux; |
1280 | priv->pid = pid; | 1285 | priv->pid = pid; |
1281 | priv->rx_mode = RX_MODE_UNI; | 1286 | priv->rx_mode = RX_MODE_UNI; |
@@ -1284,8 +1289,8 @@ static int dvb_net_add_if(struct dvb_net *dvbnet, u16 pid, u8 feedtype) | |||
1284 | priv->feedtype = feedtype; | 1289 | priv->feedtype = feedtype; |
1285 | reset_ule(priv); | 1290 | reset_ule(priv); |
1286 | 1291 | ||
1287 | INIT_WORK(&priv->set_multicast_list_wq, wq_set_multicast_list, net); | 1292 | INIT_WORK(&priv->set_multicast_list_wq, wq_set_multicast_list); |
1288 | INIT_WORK(&priv->restart_net_feed_wq, wq_restart_net_feed, net); | 1293 | INIT_WORK(&priv->restart_net_feed_wq, wq_restart_net_feed); |
1289 | mutex_init(&priv->mutex); | 1294 | mutex_init(&priv->mutex); |
1290 | 1295 | ||
1291 | net->base_addr = pid; | 1296 | net->base_addr = pid; |
diff --git a/drivers/media/dvb/dvb-usb/Kconfig b/drivers/media/dvb/dvb-usb/Kconfig index 2cc5caa26a0a..a263b3f3c21d 100644 --- a/drivers/media/dvb/dvb-usb/Kconfig +++ b/drivers/media/dvb/dvb-usb/Kconfig | |||
@@ -26,7 +26,7 @@ config DVB_USB_A800 | |||
26 | tristate "AVerMedia AverTV DVB-T USB 2.0 (A800)" | 26 | tristate "AVerMedia AverTV DVB-T USB 2.0 (A800)" |
27 | depends on DVB_USB | 27 | depends on DVB_USB |
28 | select DVB_DIB3000MC | 28 | select DVB_DIB3000MC |
29 | select DVB_TUNER_MT2060 | 29 | select DVB_TUNER_MT2060 if !DVB_FE_CUSTOMISE |
30 | help | 30 | help |
31 | Say Y here to support the AVerMedia AverTV DVB-T USB 2.0 (A800) receiver. | 31 | Say Y here to support the AVerMedia AverTV DVB-T USB 2.0 (A800) receiver. |
32 | 32 | ||
@@ -34,7 +34,7 @@ config DVB_USB_DIBUSB_MB | |||
34 | tristate "DiBcom USB DVB-T devices (based on the DiB3000M-B) (see help for device list)" | 34 | tristate "DiBcom USB DVB-T devices (based on the DiB3000M-B) (see help for device list)" |
35 | depends on DVB_USB | 35 | depends on DVB_USB |
36 | select DVB_DIB3000MB | 36 | select DVB_DIB3000MB |
37 | select DVB_TUNER_MT2060 | 37 | select DVB_TUNER_MT2060 if !DVB_FE_CUSTOMISE |
38 | help | 38 | help |
39 | Support for USB 1.1 and 2.0 DVB-T receivers based on reference designs made by | 39 | Support for USB 1.1 and 2.0 DVB-T receivers based on reference designs made by |
40 | DiBcom (<http://www.dibcom.fr>) equipped with a DiB3000M-B demodulator. | 40 | DiBcom (<http://www.dibcom.fr>) equipped with a DiB3000M-B demodulator. |
@@ -55,7 +55,7 @@ config DVB_USB_DIBUSB_MC | |||
55 | tristate "DiBcom USB DVB-T devices (based on the DiB3000M-C/P) (see help for device list)" | 55 | tristate "DiBcom USB DVB-T devices (based on the DiB3000M-C/P) (see help for device list)" |
56 | depends on DVB_USB | 56 | depends on DVB_USB |
57 | select DVB_DIB3000MC | 57 | select DVB_DIB3000MC |
58 | select DVB_TUNER_MT2060 | 58 | select DVB_TUNER_MT2060 if !DVB_FE_CUSTOMISE |
59 | help | 59 | help |
60 | Support for USB2.0 DVB-T receivers based on reference designs made by | 60 | Support for USB2.0 DVB-T receivers based on reference designs made by |
61 | DiBcom (<http://www.dibcom.fr>) equipped with a DiB3000M-C/P demodulator. | 61 | DiBcom (<http://www.dibcom.fr>) equipped with a DiB3000M-C/P demodulator. |
@@ -70,7 +70,7 @@ config DVB_USB_DIB0700 | |||
70 | tristate "DiBcom DiB0700 USB DVB devices (see help for supported devices)" | 70 | tristate "DiBcom DiB0700 USB DVB devices (see help for supported devices)" |
71 | depends on DVB_USB | 71 | depends on DVB_USB |
72 | select DVB_DIB3000MC | 72 | select DVB_DIB3000MC |
73 | select DVB_TUNER_MT2060 | 73 | select DVB_TUNER_MT2060 if !DVB_FE_CUSTOMISE |
74 | help | 74 | help |
75 | Support for USB2.0/1.1 DVB receivers based on the DiB0700 USB bridge. The | 75 | Support for USB2.0/1.1 DVB receivers based on the DiB0700 USB bridge. The |
76 | USB bridge is also present in devices having the DiB7700 DVB-T-USB | 76 | USB bridge is also present in devices having the DiB7700 DVB-T-USB |
@@ -87,7 +87,7 @@ config DVB_USB_UMT_010 | |||
87 | tristate "HanfTek UMT-010 DVB-T USB2.0 support" | 87 | tristate "HanfTek UMT-010 DVB-T USB2.0 support" |
88 | depends on DVB_USB | 88 | depends on DVB_USB |
89 | select DVB_DIB3000MC | 89 | select DVB_DIB3000MC |
90 | select DVB_TUNER_MT2060 | 90 | select DVB_TUNER_MT2060 if !DVB_FE_CUSTOMISE |
91 | help | 91 | help |
92 | Say Y here to support the HanfTek UMT-010 USB2.0 stick-sized DVB-T receiver. | 92 | Say Y here to support the HanfTek UMT-010 USB2.0 stick-sized DVB-T receiver. |
93 | 93 | ||
@@ -153,7 +153,7 @@ config DVB_USB_NOVA_T_USB2 | |||
153 | tristate "Hauppauge WinTV-NOVA-T usb2 DVB-T USB2.0 support" | 153 | tristate "Hauppauge WinTV-NOVA-T usb2 DVB-T USB2.0 support" |
154 | depends on DVB_USB | 154 | depends on DVB_USB |
155 | select DVB_DIB3000MC | 155 | select DVB_DIB3000MC |
156 | select DVB_TUNER_MT2060 | 156 | select DVB_TUNER_MT2060 if !DVB_FE_CUSTOMISE |
157 | help | 157 | help |
158 | Say Y here to support the Hauppauge WinTV-NOVA-T usb2 DVB-T USB2.0 receiver. | 158 | Say Y here to support the Hauppauge WinTV-NOVA-T usb2 DVB-T USB2.0 receiver. |
159 | 159 | ||
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-remote.c b/drivers/media/dvb/dvb-usb/dvb-usb-remote.c index 0a3a0b6c2350..794e4471561c 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb-remote.c +++ b/drivers/media/dvb/dvb-usb/dvb-usb-remote.c | |||
@@ -13,9 +13,10 @@ | |||
13 | * | 13 | * |
14 | * TODO: Fix the repeat rate of the input device. | 14 | * TODO: Fix the repeat rate of the input device. |
15 | */ | 15 | */ |
16 | static void dvb_usb_read_remote_control(void *data) | 16 | static void dvb_usb_read_remote_control(struct work_struct *work) |
17 | { | 17 | { |
18 | struct dvb_usb_device *d = data; | 18 | struct dvb_usb_device *d = |
19 | container_of(work, struct dvb_usb_device, rc_query_work.work); | ||
19 | u32 event; | 20 | u32 event; |
20 | int state; | 21 | int state; |
21 | 22 | ||
@@ -128,7 +129,7 @@ int dvb_usb_remote_init(struct dvb_usb_device *d) | |||
128 | 129 | ||
129 | input_register_device(d->rc_input_dev); | 130 | input_register_device(d->rc_input_dev); |
130 | 131 | ||
131 | INIT_WORK(&d->rc_query_work, dvb_usb_read_remote_control, d); | 132 | INIT_DELAYED_WORK(&d->rc_query_work, dvb_usb_read_remote_control); |
132 | 133 | ||
133 | info("schedule remote query interval to %d msecs.", d->props.rc_interval); | 134 | info("schedule remote query interval to %d msecs.", d->props.rc_interval); |
134 | schedule_delayed_work(&d->rc_query_work,msecs_to_jiffies(d->props.rc_interval)); | 135 | schedule_delayed_work(&d->rc_query_work,msecs_to_jiffies(d->props.rc_interval)); |
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb.h b/drivers/media/dvb/dvb-usb/dvb-usb.h index 376c45a8e779..0d721731a524 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb.h +++ b/drivers/media/dvb/dvb-usb/dvb-usb.h | |||
@@ -369,7 +369,7 @@ struct dvb_usb_device { | |||
369 | /* remote control */ | 369 | /* remote control */ |
370 | struct input_dev *rc_input_dev; | 370 | struct input_dev *rc_input_dev; |
371 | char rc_phys[64]; | 371 | char rc_phys[64]; |
372 | struct work_struct rc_query_work; | 372 | struct delayed_work rc_query_work; |
373 | u32 last_event; | 373 | u32 last_event; |
374 | int last_state; | 374 | int last_state; |
375 | 375 | ||
diff --git a/drivers/media/dvb/dvb-usb/usb-urb.c b/drivers/media/dvb/dvb-usb/usb-urb.c index 78035ee824ca..397f51a7b2ad 100644 --- a/drivers/media/dvb/dvb-usb/usb-urb.c +++ b/drivers/media/dvb/dvb-usb/usb-urb.c | |||
@@ -116,7 +116,7 @@ static int usb_allocate_stream_buffers(struct usb_data_stream *stream, int num, | |||
116 | for (stream->buf_num = 0; stream->buf_num < num; stream->buf_num++) { | 116 | for (stream->buf_num = 0; stream->buf_num < num; stream->buf_num++) { |
117 | deb_mem("allocating buffer %d\n",stream->buf_num); | 117 | deb_mem("allocating buffer %d\n",stream->buf_num); |
118 | if (( stream->buf_list[stream->buf_num] = | 118 | if (( stream->buf_list[stream->buf_num] = |
119 | usb_buffer_alloc(stream->udev, size, SLAB_ATOMIC, | 119 | usb_buffer_alloc(stream->udev, size, GFP_ATOMIC, |
120 | &stream->dma_addr[stream->buf_num]) ) == NULL) { | 120 | &stream->dma_addr[stream->buf_num]) ) == NULL) { |
121 | deb_mem("not enough memory for urb-buffer allocation.\n"); | 121 | deb_mem("not enough memory for urb-buffer allocation.\n"); |
122 | usb_free_stream_buffers(stream); | 122 | usb_free_stream_buffers(stream); |
diff --git a/drivers/media/dvb/frontends/Kconfig b/drivers/media/dvb/frontends/Kconfig index 080fa257a0bc..aebb8d6f26f8 100644 --- a/drivers/media/dvb/frontends/Kconfig +++ b/drivers/media/dvb/frontends/Kconfig | |||
@@ -276,6 +276,8 @@ config DVB_TDA826X | |||
276 | 276 | ||
277 | config DVB_TUNER_MT2060 | 277 | config DVB_TUNER_MT2060 |
278 | tristate "Microtune MT2060 silicon IF tuner" | 278 | tristate "Microtune MT2060 silicon IF tuner" |
279 | depends on I2C | ||
280 | default m if DVB_FE_CUSTOMISE | ||
279 | help | 281 | help |
280 | A driver for the silicon IF tuner MT2060 from Microtune. | 282 | A driver for the silicon IF tuner MT2060 from Microtune. |
281 | 283 | ||
diff --git a/drivers/media/dvb/frontends/bcm3510.h b/drivers/media/dvb/frontends/bcm3510.h index 6dfa839a7022..7e4f95e1734b 100644 --- a/drivers/media/dvb/frontends/bcm3510.h +++ b/drivers/media/dvb/frontends/bcm3510.h | |||
@@ -34,7 +34,7 @@ struct bcm3510_config | |||
34 | int (*request_firmware)(struct dvb_frontend* fe, const struct firmware **fw, char* name); | 34 | int (*request_firmware)(struct dvb_frontend* fe, const struct firmware **fw, char* name); |
35 | }; | 35 | }; |
36 | 36 | ||
37 | #if defined(CONFIG_DVB_BCM3510) || defined(CONFIG_DVB_BCM3510_MODULE) | 37 | #if defined(CONFIG_DVB_BCM3510) || (defined(CONFIG_DVB_BCM3510_MODULE) && defined(MODULE)) |
38 | extern struct dvb_frontend* bcm3510_attach(const struct bcm3510_config* config, | 38 | extern struct dvb_frontend* bcm3510_attach(const struct bcm3510_config* config, |
39 | struct i2c_adapter* i2c); | 39 | struct i2c_adapter* i2c); |
40 | #else | 40 | #else |
diff --git a/drivers/media/dvb/frontends/cx22700.h b/drivers/media/dvb/frontends/cx22700.h index 10286cc29fb4..7ac33690cdcc 100644 --- a/drivers/media/dvb/frontends/cx22700.h +++ b/drivers/media/dvb/frontends/cx22700.h | |||
@@ -31,7 +31,7 @@ struct cx22700_config | |||
31 | u8 demod_address; | 31 | u8 demod_address; |
32 | }; | 32 | }; |
33 | 33 | ||
34 | #if defined(CONFIG_DVB_CX22700) || defined(CONFIG_DVB_CX22700_MODULE) | 34 | #if defined(CONFIG_DVB_CX22700) || (defined(CONFIG_DVB_CX22700_MODULE) && defined(MODULE)) |
35 | extern struct dvb_frontend* cx22700_attach(const struct cx22700_config* config, | 35 | extern struct dvb_frontend* cx22700_attach(const struct cx22700_config* config, |
36 | struct i2c_adapter* i2c); | 36 | struct i2c_adapter* i2c); |
37 | #else | 37 | #else |
diff --git a/drivers/media/dvb/frontends/cx22702.h b/drivers/media/dvb/frontends/cx22702.h index bc217ddf02c0..9cd64da6ee40 100644 --- a/drivers/media/dvb/frontends/cx22702.h +++ b/drivers/media/dvb/frontends/cx22702.h | |||
@@ -41,7 +41,7 @@ struct cx22702_config | |||
41 | u8 output_mode; | 41 | u8 output_mode; |
42 | }; | 42 | }; |
43 | 43 | ||
44 | #if defined(CONFIG_DVB_CX22702) || defined(CONFIG_DVB_CX22702_MODULE) | 44 | #if defined(CONFIG_DVB_CX22702) || (defined(CONFIG_DVB_CX22702_MODULE) && defined(MODULE)) |
45 | extern struct dvb_frontend* cx22702_attach(const struct cx22702_config* config, | 45 | extern struct dvb_frontend* cx22702_attach(const struct cx22702_config* config, |
46 | struct i2c_adapter* i2c); | 46 | struct i2c_adapter* i2c); |
47 | #else | 47 | #else |
diff --git a/drivers/media/dvb/frontends/cx24110.h b/drivers/media/dvb/frontends/cx24110.h index c9d5ae250ebb..0ca3af4db513 100644 --- a/drivers/media/dvb/frontends/cx24110.h +++ b/drivers/media/dvb/frontends/cx24110.h | |||
@@ -41,7 +41,7 @@ static inline int cx24110_pll_write(struct dvb_frontend *fe, u32 val) { | |||
41 | return r; | 41 | return r; |
42 | } | 42 | } |
43 | 43 | ||
44 | #if defined(CONFIG_DVB_CX24110) || defined(CONFIG_DVB_CX24110_MODULE) | 44 | #if defined(CONFIG_DVB_CX24110) || (defined(CONFIG_DVB_CX24110_MODULE) && defined(MODULE)) |
45 | extern struct dvb_frontend* cx24110_attach(const struct cx24110_config* config, | 45 | extern struct dvb_frontend* cx24110_attach(const struct cx24110_config* config, |
46 | struct i2c_adapter* i2c); | 46 | struct i2c_adapter* i2c); |
47 | #else | 47 | #else |
diff --git a/drivers/media/dvb/frontends/cx24123.h b/drivers/media/dvb/frontends/cx24123.h index 57a1dae1dc40..84f9e4f5c15e 100644 --- a/drivers/media/dvb/frontends/cx24123.h +++ b/drivers/media/dvb/frontends/cx24123.h | |||
@@ -35,7 +35,7 @@ struct cx24123_config | |||
35 | int lnb_polarity; | 35 | int lnb_polarity; |
36 | }; | 36 | }; |
37 | 37 | ||
38 | #if defined(CONFIG_DVB_CX24123) || defined(CONFIG_DVB_CX24123_MODULE) | 38 | #if defined(CONFIG_DVB_CX24123) || (defined(CONFIG_DVB_CX24123_MODULE) && defined(MODULE)) |
39 | extern struct dvb_frontend* cx24123_attach(const struct cx24123_config* config, | 39 | extern struct dvb_frontend* cx24123_attach(const struct cx24123_config* config, |
40 | struct i2c_adapter* i2c); | 40 | struct i2c_adapter* i2c); |
41 | #else | 41 | #else |
diff --git a/drivers/media/dvb/frontends/dib3000.h b/drivers/media/dvb/frontends/dib3000.h index 0caac3f0f279..a6d3854a67bc 100644 --- a/drivers/media/dvb/frontends/dib3000.h +++ b/drivers/media/dvb/frontends/dib3000.h | |||
@@ -41,7 +41,7 @@ struct dib_fe_xfer_ops | |||
41 | int (*tuner_pass_ctrl)(struct dvb_frontend *fe, int onoff, u8 pll_ctrl); | 41 | int (*tuner_pass_ctrl)(struct dvb_frontend *fe, int onoff, u8 pll_ctrl); |
42 | }; | 42 | }; |
43 | 43 | ||
44 | #if defined(CONFIG_DVB_DIB3000MB) || defined(CONFIG_DVB_DIB3000MB_MODULE) | 44 | #if defined(CONFIG_DVB_DIB3000MB) || (defined(CONFIG_DVB_DIB3000MB_MODULE) && defined(MODULE)) |
45 | extern struct dvb_frontend* dib3000mb_attach(const struct dib3000_config* config, | 45 | extern struct dvb_frontend* dib3000mb_attach(const struct dib3000_config* config, |
46 | struct i2c_adapter* i2c, struct dib_fe_xfer_ops *xfer_ops); | 46 | struct i2c_adapter* i2c, struct dib_fe_xfer_ops *xfer_ops); |
47 | #else | 47 | #else |
diff --git a/drivers/media/dvb/frontends/dib3000mc.h b/drivers/media/dvb/frontends/dib3000mc.h index 0d6fdef77538..72d4757601d8 100644 --- a/drivers/media/dvb/frontends/dib3000mc.h +++ b/drivers/media/dvb/frontends/dib3000mc.h | |||
@@ -39,7 +39,7 @@ struct dib3000mc_config { | |||
39 | #define DEFAULT_DIB3000MC_I2C_ADDRESS 16 | 39 | #define DEFAULT_DIB3000MC_I2C_ADDRESS 16 |
40 | #define DEFAULT_DIB3000P_I2C_ADDRESS 24 | 40 | #define DEFAULT_DIB3000P_I2C_ADDRESS 24 |
41 | 41 | ||
42 | #if defined(CONFIG_DVB_DIB3000MC) || defined(CONFIG_DVB_DIB3000MC_MODULE) | 42 | #if defined(CONFIG_DVB_DIB3000MC) || (defined(CONFIG_DVB_DIB3000MC_MODULE) && defined(MODULE)) |
43 | extern struct dvb_frontend * dib3000mc_attach(struct i2c_adapter *i2c_adap, u8 i2c_addr, struct dib3000mc_config *cfg); | 43 | extern struct dvb_frontend * dib3000mc_attach(struct i2c_adapter *i2c_adap, u8 i2c_addr, struct dib3000mc_config *cfg); |
44 | #else | 44 | #else |
45 | static inline struct dvb_frontend * dib3000mc_attach(struct i2c_adapter *i2c_adap, u8 i2c_addr, struct dib3000mc_config *cfg) | 45 | static inline struct dvb_frontend * dib3000mc_attach(struct i2c_adapter *i2c_adap, u8 i2c_addr, struct dib3000mc_config *cfg) |
diff --git a/drivers/media/dvb/frontends/isl6421.h b/drivers/media/dvb/frontends/isl6421.h index 1916e3eb2df3..ea7f78a7d3cd 100644 --- a/drivers/media/dvb/frontends/isl6421.h +++ b/drivers/media/dvb/frontends/isl6421.h | |||
@@ -39,7 +39,7 @@ | |||
39 | #define ISL6421_ISEL1 0x20 | 39 | #define ISL6421_ISEL1 0x20 |
40 | #define ISL6421_DCL 0x40 | 40 | #define ISL6421_DCL 0x40 |
41 | 41 | ||
42 | #if defined(CONFIG_DVB_ISL6421) || defined(CONFIG_DVB_ISL6421_MODULE) | 42 | #if defined(CONFIG_DVB_ISL6421) || (defined(CONFIG_DVB_ISL6421_MODULE) && defined(MODULE)) |
43 | /* override_set and override_clear control which system register bits (above) to always set & clear */ | 43 | /* override_set and override_clear control which system register bits (above) to always set & clear */ |
44 | extern struct dvb_frontend *isl6421_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, u8 i2c_addr, | 44 | extern struct dvb_frontend *isl6421_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, u8 i2c_addr, |
45 | u8 override_set, u8 override_clear); | 45 | u8 override_set, u8 override_clear); |
diff --git a/drivers/media/dvb/frontends/l64781.c b/drivers/media/dvb/frontends/l64781.c index f3bc82e44a28..1aeacb1c4af7 100644 --- a/drivers/media/dvb/frontends/l64781.c +++ b/drivers/media/dvb/frontends/l64781.c | |||
@@ -36,7 +36,7 @@ struct l64781_state { | |||
36 | struct dvb_frontend frontend; | 36 | struct dvb_frontend frontend; |
37 | 37 | ||
38 | /* private demodulator data */ | 38 | /* private demodulator data */ |
39 | int first:1; | 39 | unsigned int first:1; |
40 | }; | 40 | }; |
41 | 41 | ||
42 | #define dprintk(args...) \ | 42 | #define dprintk(args...) \ |
diff --git a/drivers/media/dvb/frontends/l64781.h b/drivers/media/dvb/frontends/l64781.h index 21ba4a230760..cd15f76ff28d 100644 --- a/drivers/media/dvb/frontends/l64781.h +++ b/drivers/media/dvb/frontends/l64781.h | |||
@@ -31,7 +31,7 @@ struct l64781_config | |||
31 | u8 demod_address; | 31 | u8 demod_address; |
32 | }; | 32 | }; |
33 | 33 | ||
34 | #if defined(CONFIG_DVB_L64781) || defined(CONFIG_DVB_L64781_MODULE) | 34 | #if defined(CONFIG_DVB_L64781) || (defined(CONFIG_DVB_L64781_MODULE) && defined(MODULE)) |
35 | extern struct dvb_frontend* l64781_attach(const struct l64781_config* config, | 35 | extern struct dvb_frontend* l64781_attach(const struct l64781_config* config, |
36 | struct i2c_adapter* i2c); | 36 | struct i2c_adapter* i2c); |
37 | #else | 37 | #else |
diff --git a/drivers/media/dvb/frontends/lgdt330x.h b/drivers/media/dvb/frontends/lgdt330x.h index 3f96b485584c..995059004b10 100644 --- a/drivers/media/dvb/frontends/lgdt330x.h +++ b/drivers/media/dvb/frontends/lgdt330x.h | |||
@@ -52,7 +52,7 @@ struct lgdt330x_config | |||
52 | int clock_polarity_flip; | 52 | int clock_polarity_flip; |
53 | }; | 53 | }; |
54 | 54 | ||
55 | #if defined(CONFIG_DVB_LGDT330X) || defined(CONFIG_DVB_LGDT330X_MODULE) | 55 | #if defined(CONFIG_DVB_LGDT330X) || (defined(CONFIG_DVB_LGDT330X_MODULE) && defined(MODULE)) |
56 | extern struct dvb_frontend* lgdt330x_attach(const struct lgdt330x_config* config, | 56 | extern struct dvb_frontend* lgdt330x_attach(const struct lgdt330x_config* config, |
57 | struct i2c_adapter* i2c); | 57 | struct i2c_adapter* i2c); |
58 | #else | 58 | #else |
diff --git a/drivers/media/dvb/frontends/lnbp21.h b/drivers/media/dvb/frontends/lnbp21.h index 1fe1dd179312..68906acf7d63 100644 --- a/drivers/media/dvb/frontends/lnbp21.h +++ b/drivers/media/dvb/frontends/lnbp21.h | |||
@@ -39,7 +39,7 @@ | |||
39 | 39 | ||
40 | #include <linux/dvb/frontend.h> | 40 | #include <linux/dvb/frontend.h> |
41 | 41 | ||
42 | #if defined(CONFIG_DVB_LNBP21) || defined(CONFIG_DVB_LNBP21_MODULE) | 42 | #if defined(CONFIG_DVB_LNBP21) || (defined(CONFIG_DVB_LNBP21_MODULE) && defined(MODULE)) |
43 | /* override_set and override_clear control which system register bits (above) to always set & clear */ | 43 | /* override_set and override_clear control which system register bits (above) to always set & clear */ |
44 | extern struct dvb_frontend *lnbp21_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, u8 override_set, u8 override_clear); | 44 | extern struct dvb_frontend *lnbp21_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, u8 override_set, u8 override_clear); |
45 | #else | 45 | #else |
diff --git a/drivers/media/dvb/frontends/mt2060.h b/drivers/media/dvb/frontends/mt2060.h index 34a37c2b556f..0a86eab3a954 100644 --- a/drivers/media/dvb/frontends/mt2060.h +++ b/drivers/media/dvb/frontends/mt2060.h | |||
@@ -30,6 +30,14 @@ struct mt2060_config { | |||
30 | u8 clock_out; /* 0 = off, 1 = CLK/4, 2 = CLK/2, 3 = CLK/1 */ | 30 | u8 clock_out; /* 0 = off, 1 = CLK/4, 2 = CLK/2, 3 = CLK/1 */ |
31 | }; | 31 | }; |
32 | 32 | ||
33 | #if defined(CONFIG_DVB_TUNER_MT2060) || (defined(CONFIG_DVB_TUNER_MT2060_MODULE) && defined(MODULE)) | ||
33 | extern struct dvb_frontend * mt2060_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct mt2060_config *cfg, u16 if1); | 34 | extern struct dvb_frontend * mt2060_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct mt2060_config *cfg, u16 if1); |
35 | #else | ||
36 | static inline struct dvb_frontend * mt2060_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct mt2060_config *cfg, u16 if1) | ||
37 | { | ||
38 | printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __FUNCTION__); | ||
39 | return NULL; | ||
40 | } | ||
41 | #endif // CONFIG_DVB_TUNER_MT2060 | ||
34 | 42 | ||
35 | #endif | 43 | #endif |
diff --git a/drivers/media/dvb/frontends/mt312.h b/drivers/media/dvb/frontends/mt312.h index 7112fb4d58ac..cf9a1505ad4b 100644 --- a/drivers/media/dvb/frontends/mt312.h +++ b/drivers/media/dvb/frontends/mt312.h | |||
@@ -34,7 +34,7 @@ struct mt312_config | |||
34 | u8 demod_address; | 34 | u8 demod_address; |
35 | }; | 35 | }; |
36 | 36 | ||
37 | #if defined(CONFIG_DVB_MT312) || defined(CONFIG_DVB_MT312_MODULE) | 37 | #if defined(CONFIG_DVB_MT312) || (defined(CONFIG_DVB_MT312_MODULE) && defined(MODULE)) |
38 | struct dvb_frontend* vp310_mt312_attach(const struct mt312_config* config, | 38 | struct dvb_frontend* vp310_mt312_attach(const struct mt312_config* config, |
39 | struct i2c_adapter* i2c); | 39 | struct i2c_adapter* i2c); |
40 | #else | 40 | #else |
diff --git a/drivers/media/dvb/frontends/mt352.h b/drivers/media/dvb/frontends/mt352.h index 0035c2e2d7c2..e9964081fd84 100644 --- a/drivers/media/dvb/frontends/mt352.h +++ b/drivers/media/dvb/frontends/mt352.h | |||
@@ -51,7 +51,7 @@ struct mt352_config | |||
51 | int (*demod_init)(struct dvb_frontend* fe); | 51 | int (*demod_init)(struct dvb_frontend* fe); |
52 | }; | 52 | }; |
53 | 53 | ||
54 | #if defined(CONFIG_DVB_MT352) || defined(CONFIG_DVB_MT352_MODULE) | 54 | #if defined(CONFIG_DVB_MT352) || (defined(CONFIG_DVB_MT352_MODULE) && defined(MODULE)) |
55 | extern struct dvb_frontend* mt352_attach(const struct mt352_config* config, | 55 | extern struct dvb_frontend* mt352_attach(const struct mt352_config* config, |
56 | struct i2c_adapter* i2c); | 56 | struct i2c_adapter* i2c); |
57 | #else | 57 | #else |
diff --git a/drivers/media/dvb/frontends/nxt200x.h b/drivers/media/dvb/frontends/nxt200x.h index 2eb220e98062..28bc5591b319 100644 --- a/drivers/media/dvb/frontends/nxt200x.h +++ b/drivers/media/dvb/frontends/nxt200x.h | |||
@@ -45,7 +45,7 @@ struct nxt200x_config | |||
45 | int (*set_ts_params)(struct dvb_frontend* fe, int is_punctured); | 45 | int (*set_ts_params)(struct dvb_frontend* fe, int is_punctured); |
46 | }; | 46 | }; |
47 | 47 | ||
48 | #if defined(CONFIG_DVB_NXT200X) || defined(CONFIG_DVB_NXT200X_MODULE) | 48 | #if defined(CONFIG_DVB_NXT200X) || (defined(CONFIG_DVB_NXT200X_MODULE) && defined(MODULE)) |
49 | extern struct dvb_frontend* nxt200x_attach(const struct nxt200x_config* config, | 49 | extern struct dvb_frontend* nxt200x_attach(const struct nxt200x_config* config, |
50 | struct i2c_adapter* i2c); | 50 | struct i2c_adapter* i2c); |
51 | #else | 51 | #else |
diff --git a/drivers/media/dvb/frontends/nxt6000.h b/drivers/media/dvb/frontends/nxt6000.h index 9397393a6bd1..13d22518356e 100644 --- a/drivers/media/dvb/frontends/nxt6000.h +++ b/drivers/media/dvb/frontends/nxt6000.h | |||
@@ -33,7 +33,7 @@ struct nxt6000_config | |||
33 | u8 clock_inversion:1; | 33 | u8 clock_inversion:1; |
34 | }; | 34 | }; |
35 | 35 | ||
36 | #if defined(CONFIG_DVB_NXT6000) || defined(CONFIG_DVB_NXT6000_MODULE) | 36 | #if defined(CONFIG_DVB_NXT6000) || (defined(CONFIG_DVB_NXT6000_MODULE) && defined(MODULE)) |
37 | extern struct dvb_frontend* nxt6000_attach(const struct nxt6000_config* config, | 37 | extern struct dvb_frontend* nxt6000_attach(const struct nxt6000_config* config, |
38 | struct i2c_adapter* i2c); | 38 | struct i2c_adapter* i2c); |
39 | #else | 39 | #else |
diff --git a/drivers/media/dvb/frontends/or51132.h b/drivers/media/dvb/frontends/or51132.h index 9718be4fb835..add24f0a743b 100644 --- a/drivers/media/dvb/frontends/or51132.h +++ b/drivers/media/dvb/frontends/or51132.h | |||
@@ -34,7 +34,7 @@ struct or51132_config | |||
34 | int (*set_ts_params)(struct dvb_frontend* fe, int is_punctured); | 34 | int (*set_ts_params)(struct dvb_frontend* fe, int is_punctured); |
35 | }; | 35 | }; |
36 | 36 | ||
37 | #if defined(CONFIG_DVB_OR51132) || defined(CONFIG_DVB_OR51132_MODULE) | 37 | #if defined(CONFIG_DVB_OR51132) || (defined(CONFIG_DVB_OR51132_MODULE) && defined(MODULE)) |
38 | extern struct dvb_frontend* or51132_attach(const struct or51132_config* config, | 38 | extern struct dvb_frontend* or51132_attach(const struct or51132_config* config, |
39 | struct i2c_adapter* i2c); | 39 | struct i2c_adapter* i2c); |
40 | #else | 40 | #else |
diff --git a/drivers/media/dvb/frontends/or51211.h b/drivers/media/dvb/frontends/or51211.h index 10a5419f9e00..8aad8402d615 100644 --- a/drivers/media/dvb/frontends/or51211.h +++ b/drivers/media/dvb/frontends/or51211.h | |||
@@ -37,7 +37,7 @@ struct or51211_config | |||
37 | void (*sleep)(struct dvb_frontend * fe); | 37 | void (*sleep)(struct dvb_frontend * fe); |
38 | }; | 38 | }; |
39 | 39 | ||
40 | #if defined(CONFIG_DVB_OR51211) || defined(CONFIG_DVB_OR51211_MODULE) | 40 | #if defined(CONFIG_DVB_OR51211) || (defined(CONFIG_DVB_OR51211_MODULE) && defined(MODULE)) |
41 | extern struct dvb_frontend* or51211_attach(const struct or51211_config* config, | 41 | extern struct dvb_frontend* or51211_attach(const struct or51211_config* config, |
42 | struct i2c_adapter* i2c); | 42 | struct i2c_adapter* i2c); |
43 | #else | 43 | #else |
diff --git a/drivers/media/dvb/frontends/s5h1420.h b/drivers/media/dvb/frontends/s5h1420.h index efc54d7f3c55..1555870f7226 100644 --- a/drivers/media/dvb/frontends/s5h1420.h +++ b/drivers/media/dvb/frontends/s5h1420.h | |||
@@ -34,7 +34,7 @@ struct s5h1420_config | |||
34 | u8 invert:1; | 34 | u8 invert:1; |
35 | }; | 35 | }; |
36 | 36 | ||
37 | #if defined(CONFIG_DVB_S5H1420) || defined(CONFIG_DVB_S5H1420_MODULE) | 37 | #if defined(CONFIG_DVB_S5H1420) || (defined(CONFIG_DVB_S5H1420_MODULE) && defined(MODULE)) |
38 | extern struct dvb_frontend* s5h1420_attach(const struct s5h1420_config* config, | 38 | extern struct dvb_frontend* s5h1420_attach(const struct s5h1420_config* config, |
39 | struct i2c_adapter* i2c); | 39 | struct i2c_adapter* i2c); |
40 | #else | 40 | #else |
diff --git a/drivers/media/dvb/frontends/sp8870.h b/drivers/media/dvb/frontends/sp8870.h index 4cf27d3b10f2..909cefe7139e 100644 --- a/drivers/media/dvb/frontends/sp8870.h +++ b/drivers/media/dvb/frontends/sp8870.h | |||
@@ -35,7 +35,7 @@ struct sp8870_config | |||
35 | int (*request_firmware)(struct dvb_frontend* fe, const struct firmware **fw, char* name); | 35 | int (*request_firmware)(struct dvb_frontend* fe, const struct firmware **fw, char* name); |
36 | }; | 36 | }; |
37 | 37 | ||
38 | #if defined(CONFIG_DVB_SP8870) || defined(CONFIG_DVB_SP8870_MODULE) | 38 | #if defined(CONFIG_DVB_SP8870) || (defined(CONFIG_DVB_SP8870_MODULE) && defined(MODULE)) |
39 | extern struct dvb_frontend* sp8870_attach(const struct sp8870_config* config, | 39 | extern struct dvb_frontend* sp8870_attach(const struct sp8870_config* config, |
40 | struct i2c_adapter* i2c); | 40 | struct i2c_adapter* i2c); |
41 | #else | 41 | #else |
diff --git a/drivers/media/dvb/frontends/sp887x.h b/drivers/media/dvb/frontends/sp887x.h index cab7ea644dfa..7ee78d7d916d 100644 --- a/drivers/media/dvb/frontends/sp887x.h +++ b/drivers/media/dvb/frontends/sp887x.h | |||
@@ -17,7 +17,7 @@ struct sp887x_config | |||
17 | int (*request_firmware)(struct dvb_frontend* fe, const struct firmware **fw, char* name); | 17 | int (*request_firmware)(struct dvb_frontend* fe, const struct firmware **fw, char* name); |
18 | }; | 18 | }; |
19 | 19 | ||
20 | #if defined(CONFIG_DVB_SP887X) || defined(CONFIG_DVB_SP887X_MODULE) | 20 | #if defined(CONFIG_DVB_SP887X) || (defined(CONFIG_DVB_SP887X_MODULE) && defined(MODULE)) |
21 | extern struct dvb_frontend* sp887x_attach(const struct sp887x_config* config, | 21 | extern struct dvb_frontend* sp887x_attach(const struct sp887x_config* config, |
22 | struct i2c_adapter* i2c); | 22 | struct i2c_adapter* i2c); |
23 | #else | 23 | #else |
diff --git a/drivers/media/dvb/frontends/stv0297.h b/drivers/media/dvb/frontends/stv0297.h index 760b80db43a5..69f4515df2b9 100644 --- a/drivers/media/dvb/frontends/stv0297.h +++ b/drivers/media/dvb/frontends/stv0297.h | |||
@@ -42,7 +42,7 @@ struct stv0297_config | |||
42 | u8 stop_during_read:1; | 42 | u8 stop_during_read:1; |
43 | }; | 43 | }; |
44 | 44 | ||
45 | #if defined(CONFIG_DVB_STV0297) || defined(CONFIG_DVB_STV0297_MODULE) | 45 | #if defined(CONFIG_DVB_STV0297) || (defined(CONFIG_DVB_STV0297_MODULE) && defined(MODULE)) |
46 | extern struct dvb_frontend* stv0297_attach(const struct stv0297_config* config, | 46 | extern struct dvb_frontend* stv0297_attach(const struct stv0297_config* config, |
47 | struct i2c_adapter* i2c); | 47 | struct i2c_adapter* i2c); |
48 | #else | 48 | #else |
diff --git a/drivers/media/dvb/frontends/stv0299.h b/drivers/media/dvb/frontends/stv0299.h index 7ef25207081d..33df9495908f 100644 --- a/drivers/media/dvb/frontends/stv0299.h +++ b/drivers/media/dvb/frontends/stv0299.h | |||
@@ -89,7 +89,7 @@ struct stv0299_config | |||
89 | int (*set_symbol_rate)(struct dvb_frontend* fe, u32 srate, u32 ratio); | 89 | int (*set_symbol_rate)(struct dvb_frontend* fe, u32 srate, u32 ratio); |
90 | }; | 90 | }; |
91 | 91 | ||
92 | #if defined(CONFIG_DVB_STV0299) || defined(CONFIG_DVB_STV0299_MODULE) | 92 | #if defined(CONFIG_DVB_STV0299) || (defined(CONFIG_DVB_STV0299_MODULE) && defined(MODULE)) |
93 | extern struct dvb_frontend* stv0299_attach(const struct stv0299_config* config, | 93 | extern struct dvb_frontend* stv0299_attach(const struct stv0299_config* config, |
94 | struct i2c_adapter* i2c); | 94 | struct i2c_adapter* i2c); |
95 | #else | 95 | #else |
diff --git a/drivers/media/dvb/frontends/tda10021.h b/drivers/media/dvb/frontends/tda10021.h index d68ae20c8412..e3da780108f6 100644 --- a/drivers/media/dvb/frontends/tda10021.h +++ b/drivers/media/dvb/frontends/tda10021.h | |||
@@ -32,7 +32,7 @@ struct tda10021_config | |||
32 | u8 demod_address; | 32 | u8 demod_address; |
33 | }; | 33 | }; |
34 | 34 | ||
35 | #if defined(CONFIG_DVB_TDA10021) || defined(CONFIG_DVB_TDA10021_MODULE) | 35 | #if defined(CONFIG_DVB_TDA10021) || (defined(CONFIG_DVB_TDA10021_MODULE) && defined(MODULE)) |
36 | extern struct dvb_frontend* tda10021_attach(const struct tda10021_config* config, | 36 | extern struct dvb_frontend* tda10021_attach(const struct tda10021_config* config, |
37 | struct i2c_adapter* i2c, u8 pwm); | 37 | struct i2c_adapter* i2c, u8 pwm); |
38 | #else | 38 | #else |
diff --git a/drivers/media/dvb/frontends/tda1004x.h b/drivers/media/dvb/frontends/tda1004x.h index e28fca05734c..605ad2dfc09d 100644 --- a/drivers/media/dvb/frontends/tda1004x.h +++ b/drivers/media/dvb/frontends/tda1004x.h | |||
@@ -71,7 +71,7 @@ struct tda1004x_config | |||
71 | int (*request_firmware)(struct dvb_frontend* fe, const struct firmware **fw, char* name); | 71 | int (*request_firmware)(struct dvb_frontend* fe, const struct firmware **fw, char* name); |
72 | }; | 72 | }; |
73 | 73 | ||
74 | #if defined(CONFIG_DVB_TDA1004X) || defined(CONFIG_DVB_TDA1004X_MODULE) | 74 | #if defined(CONFIG_DVB_TDA1004X) || (defined(CONFIG_DVB_TDA1004X_MODULE) && defined(MODULE)) |
75 | extern struct dvb_frontend* tda10045_attach(const struct tda1004x_config* config, | 75 | extern struct dvb_frontend* tda10045_attach(const struct tda1004x_config* config, |
76 | struct i2c_adapter* i2c); | 76 | struct i2c_adapter* i2c); |
77 | 77 | ||
diff --git a/drivers/media/dvb/frontends/tda10086.c b/drivers/media/dvb/frontends/tda10086.c index 7456b0b9976b..4c27a2d90a38 100644 --- a/drivers/media/dvb/frontends/tda10086.c +++ b/drivers/media/dvb/frontends/tda10086.c | |||
@@ -441,6 +441,10 @@ static int tda10086_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_pa | |||
441 | 441 | ||
442 | dprintk ("%s\n", __FUNCTION__); | 442 | dprintk ("%s\n", __FUNCTION__); |
443 | 443 | ||
444 | // check for invalid symbol rate | ||
445 | if (fe_params->u.qpsk.symbol_rate < 500000) | ||
446 | return -EINVAL; | ||
447 | |||
444 | // calculate the updated frequency (note: we convert from Hz->kHz) | 448 | // calculate the updated frequency (note: we convert from Hz->kHz) |
445 | tmp64 = tda10086_read_byte(state, 0x52); | 449 | tmp64 = tda10086_read_byte(state, 0x52); |
446 | tmp64 |= (tda10086_read_byte(state, 0x51) << 8); | 450 | tmp64 |= (tda10086_read_byte(state, 0x51) << 8); |
diff --git a/drivers/media/dvb/frontends/tda10086.h b/drivers/media/dvb/frontends/tda10086.h index 18457adee30b..ed584a8f4a89 100644 --- a/drivers/media/dvb/frontends/tda10086.h +++ b/drivers/media/dvb/frontends/tda10086.h | |||
@@ -35,7 +35,7 @@ struct tda10086_config | |||
35 | u8 invert; | 35 | u8 invert; |
36 | }; | 36 | }; |
37 | 37 | ||
38 | #if defined(CONFIG_DVB_TDA10086) || defined(CONFIG_DVB_TDA10086_MODULE) | 38 | #if defined(CONFIG_DVB_TDA10086) || (defined(CONFIG_DVB_TDA10086_MODULE) && defined(MODULE)) |
39 | extern struct dvb_frontend* tda10086_attach(const struct tda10086_config* config, | 39 | extern struct dvb_frontend* tda10086_attach(const struct tda10086_config* config, |
40 | struct i2c_adapter* i2c); | 40 | struct i2c_adapter* i2c); |
41 | #else | 41 | #else |
diff --git a/drivers/media/dvb/frontends/tda8083.h b/drivers/media/dvb/frontends/tda8083.h index aae15bdce6eb..2d3307999f21 100644 --- a/drivers/media/dvb/frontends/tda8083.h +++ b/drivers/media/dvb/frontends/tda8083.h | |||
@@ -35,7 +35,7 @@ struct tda8083_config | |||
35 | u8 demod_address; | 35 | u8 demod_address; |
36 | }; | 36 | }; |
37 | 37 | ||
38 | #if defined(CONFIG_DVB_TDA8083) || defined(CONFIG_DVB_TDA8083_MODULE) | 38 | #if defined(CONFIG_DVB_TDA8083) || (defined(CONFIG_DVB_TDA8083_MODULE) && defined(MODULE)) |
39 | extern struct dvb_frontend* tda8083_attach(const struct tda8083_config* config, | 39 | extern struct dvb_frontend* tda8083_attach(const struct tda8083_config* config, |
40 | struct i2c_adapter* i2c); | 40 | struct i2c_adapter* i2c); |
41 | #else | 41 | #else |
diff --git a/drivers/media/dvb/frontends/tda826x.c b/drivers/media/dvb/frontends/tda826x.c index eeab26bd36ed..34815b0b97e4 100644 --- a/drivers/media/dvb/frontends/tda826x.c +++ b/drivers/media/dvb/frontends/tda826x.c | |||
@@ -121,7 +121,7 @@ static struct dvb_tuner_ops tda826x_tuner_ops = { | |||
121 | .info = { | 121 | .info = { |
122 | .name = "Philips TDA826X", | 122 | .name = "Philips TDA826X", |
123 | .frequency_min = 950000, | 123 | .frequency_min = 950000, |
124 | .frequency_min = 2175000 | 124 | .frequency_max = 2175000 |
125 | }, | 125 | }, |
126 | .release = tda826x_release, | 126 | .release = tda826x_release, |
127 | .sleep = tda826x_sleep, | 127 | .sleep = tda826x_sleep, |
diff --git a/drivers/media/dvb/frontends/tda826x.h b/drivers/media/dvb/frontends/tda826x.h index 83998c001196..ad9981195961 100644 --- a/drivers/media/dvb/frontends/tda826x.h +++ b/drivers/media/dvb/frontends/tda826x.h | |||
@@ -35,7 +35,7 @@ | |||
35 | * @param has_loopthrough Set to 1 if the card has a loopthrough RF connector. | 35 | * @param has_loopthrough Set to 1 if the card has a loopthrough RF connector. |
36 | * @return FE pointer on success, NULL on failure. | 36 | * @return FE pointer on success, NULL on failure. |
37 | */ | 37 | */ |
38 | #if defined(CONFIG_DVB_TDA826X) || defined(CONFIG_DVB_TDA826X_MODULE) | 38 | #if defined(CONFIG_DVB_TDA826X) || (defined(CONFIG_DVB_TDA826X_MODULE) && defined(MODULE)) |
39 | extern struct dvb_frontend* tda826x_attach(struct dvb_frontend *fe, int addr, | 39 | extern struct dvb_frontend* tda826x_attach(struct dvb_frontend *fe, int addr, |
40 | struct i2c_adapter *i2c, | 40 | struct i2c_adapter *i2c, |
41 | int has_loopthrough); | 41 | int has_loopthrough); |
diff --git a/drivers/media/dvb/frontends/tua6100.h b/drivers/media/dvb/frontends/tua6100.h index 8f98033ffa7b..03a665e7df6d 100644 --- a/drivers/media/dvb/frontends/tua6100.h +++ b/drivers/media/dvb/frontends/tua6100.h | |||
@@ -34,7 +34,7 @@ | |||
34 | #include <linux/i2c.h> | 34 | #include <linux/i2c.h> |
35 | #include "dvb_frontend.h" | 35 | #include "dvb_frontend.h" |
36 | 36 | ||
37 | #if defined(CONFIG_DVB_TUA6100) || defined(CONFIG_DVB_TUA6100_MODULE) | 37 | #if defined(CONFIG_DVB_TUA6100) || (defined(CONFIG_DVB_TUA6100_MODULE) && defined(MODULE)) |
38 | extern struct dvb_frontend *tua6100_attach(struct dvb_frontend *fe, int addr, struct i2c_adapter *i2c); | 38 | extern struct dvb_frontend *tua6100_attach(struct dvb_frontend *fe, int addr, struct i2c_adapter *i2c); |
39 | #else | 39 | #else |
40 | static inline struct dvb_frontend* tua6100_attach(struct dvb_frontend *fe, int addr, struct i2c_adapter *i2c) | 40 | static inline struct dvb_frontend* tua6100_attach(struct dvb_frontend *fe, int addr, struct i2c_adapter *i2c) |
diff --git a/drivers/media/dvb/frontends/ves1820.h b/drivers/media/dvb/frontends/ves1820.h index f0c9dded39d7..e4a2a324046a 100644 --- a/drivers/media/dvb/frontends/ves1820.h +++ b/drivers/media/dvb/frontends/ves1820.h | |||
@@ -41,7 +41,7 @@ struct ves1820_config | |||
41 | u8 selagc:1; | 41 | u8 selagc:1; |
42 | }; | 42 | }; |
43 | 43 | ||
44 | #if defined(CONFIG_DVB_VES1820) || defined(CONFIG_DVB_VES1820_MODULE) | 44 | #if defined(CONFIG_DVB_VES1820) || (defined(CONFIG_DVB_VES1820_MODULE) && defined(MODULE)) |
45 | extern struct dvb_frontend* ves1820_attach(const struct ves1820_config* config, | 45 | extern struct dvb_frontend* ves1820_attach(const struct ves1820_config* config, |
46 | struct i2c_adapter* i2c, u8 pwm); | 46 | struct i2c_adapter* i2c, u8 pwm); |
47 | #else | 47 | #else |
diff --git a/drivers/media/dvb/frontends/ves1x93.h b/drivers/media/dvb/frontends/ves1x93.h index 395fed39b286..d507f8966f81 100644 --- a/drivers/media/dvb/frontends/ves1x93.h +++ b/drivers/media/dvb/frontends/ves1x93.h | |||
@@ -40,7 +40,7 @@ struct ves1x93_config | |||
40 | u8 invert_pwm:1; | 40 | u8 invert_pwm:1; |
41 | }; | 41 | }; |
42 | 42 | ||
43 | #if defined(CONFIG_DVB_VES1X93) || defined(CONFIG_DVB_VES1X93_MODULE) | 43 | #if defined(CONFIG_DVB_VES1X93) || (defined(CONFIG_DVB_VES1X93_MODULE) && defined(MODULE)) |
44 | extern struct dvb_frontend* ves1x93_attach(const struct ves1x93_config* config, | 44 | extern struct dvb_frontend* ves1x93_attach(const struct ves1x93_config* config, |
45 | struct i2c_adapter* i2c); | 45 | struct i2c_adapter* i2c); |
46 | #else | 46 | #else |
diff --git a/drivers/media/dvb/frontends/zl10353.h b/drivers/media/dvb/frontends/zl10353.h index 79a947215c4d..0bc0109737f1 100644 --- a/drivers/media/dvb/frontends/zl10353.h +++ b/drivers/media/dvb/frontends/zl10353.h | |||
@@ -36,7 +36,7 @@ struct zl10353_config | |||
36 | int parallel_ts; | 36 | int parallel_ts; |
37 | }; | 37 | }; |
38 | 38 | ||
39 | #if defined(CONFIG_DVB_ZL10353) || defined(CONFIG_DVB_ZL10353_MODULE) | 39 | #if defined(CONFIG_DVB_ZL10353) || (defined(CONFIG_DVB_ZL10353_MODULE) && defined(MODULE)) |
40 | extern struct dvb_frontend* zl10353_attach(const struct zl10353_config *config, | 40 | extern struct dvb_frontend* zl10353_attach(const struct zl10353_config *config, |
41 | struct i2c_adapter *i2c); | 41 | struct i2c_adapter *i2c); |
42 | #else | 42 | #else |
diff --git a/drivers/media/dvb/ttpci/budget-ci.c b/drivers/media/dvb/ttpci/budget-ci.c index 2a2e9b400613..cd5ec489af1c 100644 --- a/drivers/media/dvb/ttpci/budget-ci.c +++ b/drivers/media/dvb/ttpci/budget-ci.c | |||
@@ -46,7 +46,14 @@ | |||
46 | #include "bsbe1.h" | 46 | #include "bsbe1.h" |
47 | #include "bsru6.h" | 47 | #include "bsru6.h" |
48 | 48 | ||
49 | #define DEBIADDR_IR 0x1234 | 49 | /* |
50 | * Regarding DEBIADDR_IR: | ||
51 | * Some CI modules hang if random addresses are read. | ||
52 | * Using address 0x4000 for the IR read means that we | ||
53 | * use the same address as for CI version, which should | ||
54 | * be a safe default. | ||
55 | */ | ||
56 | #define DEBIADDR_IR 0x4000 | ||
50 | #define DEBIADDR_CICONTROL 0x0000 | 57 | #define DEBIADDR_CICONTROL 0x0000 |
51 | #define DEBIADDR_CIVERSION 0x4000 | 58 | #define DEBIADDR_CIVERSION 0x4000 |
52 | #define DEBIADDR_IO 0x1000 | 59 | #define DEBIADDR_IO 0x1000 |
@@ -1028,6 +1035,7 @@ static void frontend_init(struct budget_ci *budget_ci) | |||
1028 | 1035 | ||
1029 | case 0x1012: // TT DVB-T CI budget (tda10046/Philips tdm1316l(tda6651tt)) | 1036 | case 0x1012: // TT DVB-T CI budget (tda10046/Philips tdm1316l(tda6651tt)) |
1030 | budget_ci->tuner_pll_address = 0x60; | 1037 | budget_ci->tuner_pll_address = 0x60; |
1038 | philips_tdm1316l_config.invert = 1; | ||
1031 | budget_ci->budget.dvb_frontend = | 1039 | budget_ci->budget.dvb_frontend = |
1032 | dvb_attach(tda10046_attach, &philips_tdm1316l_config, &budget_ci->budget.i2c_adap); | 1040 | dvb_attach(tda10046_attach, &philips_tdm1316l_config, &budget_ci->budget.i2c_adap); |
1033 | if (budget_ci->budget.dvb_frontend) { | 1041 | if (budget_ci->budget.dvb_frontend) { |
diff --git a/drivers/media/dvb/ttpci/budget-patch.c b/drivers/media/dvb/ttpci/budget-patch.c index fc1267b8c892..9a155396d6ac 100644 --- a/drivers/media/dvb/ttpci/budget-patch.c +++ b/drivers/media/dvb/ttpci/budget-patch.c | |||
@@ -500,14 +500,14 @@ static int budget_patch_attach (struct saa7146_dev* dev, struct saa7146_pci_exte | |||
500 | 500 | ||
501 | /* New design (By Emard) | 501 | /* New design (By Emard) |
502 | ** this rps1 code will copy internal HS event to GPIO3 pin. | 502 | ** this rps1 code will copy internal HS event to GPIO3 pin. |
503 | ** GPIO3 is in budget-patch hardware connectd to port B VSYNC | 503 | ** GPIO3 is in budget-patch hardware connected to port B VSYNC |
504 | 504 | ||
505 | ** HS is an internal event of 7146, accessible with RPS | 505 | ** HS is an internal event of 7146, accessible with RPS |
506 | ** and temporarily raised high every n lines | 506 | ** and temporarily raised high every n lines |
507 | ** (n in defined in the RPS_THRESH1 counter threshold) | 507 | ** (n in defined in the RPS_THRESH1 counter threshold) |
508 | ** I think HS is raised high on the beginning of the n-th line | 508 | ** I think HS is raised high on the beginning of the n-th line |
509 | ** and remains high until this n-th line that triggered | 509 | ** and remains high until this n-th line that triggered |
510 | ** it is completely received. When the receiption of n-th line | 510 | ** it is completely received. When the reception of n-th line |
511 | ** ends, HS is lowered. | 511 | ** ends, HS is lowered. |
512 | 512 | ||
513 | ** To transmit data over DMA, 7146 needs changing state at | 513 | ** To transmit data over DMA, 7146 needs changing state at |
@@ -541,7 +541,7 @@ static int budget_patch_attach (struct saa7146_dev* dev, struct saa7146_pci_exte | |||
541 | ** hardware debug note: a working budget card (including budget patch) | 541 | ** hardware debug note: a working budget card (including budget patch) |
542 | ** with vpeirq() interrupt setup in mode "0x90" (every 64K) will | 542 | ** with vpeirq() interrupt setup in mode "0x90" (every 64K) will |
543 | ** generate 3 interrupts per 25-Hz DMA frame of 2*188*512 bytes | 543 | ** generate 3 interrupts per 25-Hz DMA frame of 2*188*512 bytes |
544 | ** and that means 3*25=75 Hz of interrupt freqency, as seen by | 544 | ** and that means 3*25=75 Hz of interrupt frequency, as seen by |
545 | ** watch cat /proc/interrupts | 545 | ** watch cat /proc/interrupts |
546 | ** | 546 | ** |
547 | ** If this frequency is 3x lower (and data received in the DMA | 547 | ** If this frequency is 3x lower (and data received in the DMA |
@@ -550,7 +550,7 @@ static int budget_patch_attach (struct saa7146_dev* dev, struct saa7146_pci_exte | |||
550 | ** this means VSYNC line is not connected in the hardware. | 550 | ** this means VSYNC line is not connected in the hardware. |
551 | ** (check soldering pcb and pins) | 551 | ** (check soldering pcb and pins) |
552 | ** The same behaviour of missing VSYNC can be duplicated on budget | 552 | ** The same behaviour of missing VSYNC can be duplicated on budget |
553 | ** cards, by seting DD1_INIT trigger mode 7 in 3rd nibble. | 553 | ** cards, by setting DD1_INIT trigger mode 7 in 3rd nibble. |
554 | */ | 554 | */ |
555 | 555 | ||
556 | // Setup RPS1 "program" (p35) | 556 | // Setup RPS1 "program" (p35) |
diff --git a/drivers/media/dvb/ttpci/budget.c b/drivers/media/dvb/ttpci/budget.c index e58f0391e9d1..56f1c80defc6 100644 --- a/drivers/media/dvb/ttpci/budget.c +++ b/drivers/media/dvb/ttpci/budget.c | |||
@@ -46,6 +46,10 @@ | |||
46 | #include "lnbp21.h" | 46 | #include "lnbp21.h" |
47 | #include "bsru6.h" | 47 | #include "bsru6.h" |
48 | 48 | ||
49 | static int diseqc_method; | ||
50 | module_param(diseqc_method, int, 0444); | ||
51 | MODULE_PARM_DESC(diseqc_method, "Select DiSEqC method for subsystem id 13c2:1003, 0: default, 1: more reliable (for newer revisions only)"); | ||
52 | |||
49 | static void Set22K (struct budget *budget, int state) | 53 | static void Set22K (struct budget *budget, int state) |
50 | { | 54 | { |
51 | struct saa7146_dev *dev=budget->dev; | 55 | struct saa7146_dev *dev=budget->dev; |
@@ -382,6 +386,11 @@ static void frontend_init(struct budget *budget) | |||
382 | if (budget->dvb_frontend) { | 386 | if (budget->dvb_frontend) { |
383 | budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params; | 387 | budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params; |
384 | budget->dvb_frontend->tuner_priv = &budget->i2c_adap; | 388 | budget->dvb_frontend->tuner_priv = &budget->i2c_adap; |
389 | if (budget->dev->pci->subsystem_device == 0x1003 && diseqc_method == 0) { | ||
390 | budget->dvb_frontend->ops.diseqc_send_master_cmd = budget_diseqc_send_master_cmd; | ||
391 | budget->dvb_frontend->ops.diseqc_send_burst = budget_diseqc_send_burst; | ||
392 | budget->dvb_frontend->ops.set_tone = budget_set_tone; | ||
393 | } | ||
385 | break; | 394 | break; |
386 | } | 395 | } |
387 | break; | 396 | break; |
diff --git a/drivers/media/dvb/ttusb-dec/ttusb_dec.c b/drivers/media/dvb/ttusb-dec/ttusb_dec.c index a1c9fa9919ea..10b121ada833 100644 --- a/drivers/media/dvb/ttusb-dec/ttusb_dec.c +++ b/drivers/media/dvb/ttusb-dec/ttusb_dec.c | |||
@@ -1135,8 +1135,7 @@ static void ttusb_dec_free_iso_urbs(struct ttusb_dec *dec) | |||
1135 | dprintk("%s\n", __FUNCTION__); | 1135 | dprintk("%s\n", __FUNCTION__); |
1136 | 1136 | ||
1137 | for (i = 0; i < ISO_BUF_COUNT; i++) | 1137 | for (i = 0; i < ISO_BUF_COUNT; i++) |
1138 | if (dec->iso_urb[i]) | 1138 | usb_free_urb(dec->iso_urb[i]); |
1139 | usb_free_urb(dec->iso_urb[i]); | ||
1140 | 1139 | ||
1141 | pci_free_consistent(NULL, | 1140 | pci_free_consistent(NULL, |
1142 | ISO_FRAME_SIZE * (FRAMES_PER_ISO_BUF * | 1141 | ISO_FRAME_SIZE * (FRAMES_PER_ISO_BUF * |
@@ -1245,7 +1244,7 @@ static int ttusb_dec_init_usb(struct ttusb_dec *dec) | |||
1245 | return -ENOMEM; | 1244 | return -ENOMEM; |
1246 | } | 1245 | } |
1247 | dec->irq_buffer = usb_buffer_alloc(dec->udev,IRQ_PACKET_SIZE, | 1246 | dec->irq_buffer = usb_buffer_alloc(dec->udev,IRQ_PACKET_SIZE, |
1248 | SLAB_ATOMIC, &dec->irq_dma_handle); | 1247 | GFP_ATOMIC, &dec->irq_dma_handle); |
1249 | if(!dec->irq_buffer) { | 1248 | if(!dec->irq_buffer) { |
1250 | return -ENOMEM; | 1249 | return -ENOMEM; |
1251 | } | 1250 | } |
diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig index 6d96b17a7f81..920b63f8cf05 100644 --- a/drivers/media/radio/Kconfig +++ b/drivers/media/radio/Kconfig | |||
@@ -173,38 +173,6 @@ config RADIO_MAESTRO | |||
173 | To compile this driver as a module, choose M here: the | 173 | To compile this driver as a module, choose M here: the |
174 | module will be called radio-maestro. | 174 | module will be called radio-maestro. |
175 | 175 | ||
176 | config RADIO_MIROPCM20 | ||
177 | tristate "miroSOUND PCM20 radio" | ||
178 | depends on ISA && VIDEO_V4L1 && SOUND_ACI_MIXER | ||
179 | ---help--- | ||
180 | Choose Y here if you have this FM radio card. You also need to say Y | ||
181 | to "ACI mixer (miroSOUND PCM1-pro/PCM12/PCM20 radio)" (in "Sound") | ||
182 | for this to work. | ||
183 | |||
184 | In order to control your radio card, you will need to use programs | ||
185 | that are compatible with the Video For Linux API. Information on | ||
186 | this API and pointers to "v4l" programs may be found at | ||
187 | <file:Documentation/video4linux/API.html>. | ||
188 | |||
189 | To compile this driver as a module, choose M here: the | ||
190 | module will be called miropcm20. | ||
191 | |||
192 | config RADIO_MIROPCM20_RDS | ||
193 | tristate "miroSOUND PCM20 radio RDS user interface (EXPERIMENTAL)" | ||
194 | depends on RADIO_MIROPCM20 && EXPERIMENTAL | ||
195 | ---help--- | ||
196 | Choose Y here if you want to see RDS/RBDS information like | ||
197 | RadioText, Programme Service name, Clock Time and date, Programme | ||
198 | Type and Traffic Announcement/Programme identification. | ||
199 | |||
200 | It's not possible to read the raw RDS packets from the device, so | ||
201 | the driver cant provide an V4L interface for this. But the | ||
202 | availability of RDS is reported over V4L by the basic driver | ||
203 | already. Here RDS can be read from files in /dev/v4l/rds. | ||
204 | |||
205 | To compile this driver as a module, choose M here: the | ||
206 | module will be called miropcm20-rds. | ||
207 | |||
208 | config RADIO_SF16FMI | 176 | config RADIO_SF16FMI |
209 | tristate "SF16FMI Radio" | 177 | tristate "SF16FMI Radio" |
210 | depends on ISA && VIDEO_V4L2 | 178 | depends on ISA && VIDEO_V4L2 |
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig index fbe5b6168cc2..b8fde5cf4735 100644 --- a/drivers/media/video/Kconfig +++ b/drivers/media/video/Kconfig | |||
@@ -24,7 +24,7 @@ config VIDEO_HELPER_CHIPS_AUTO | |||
24 | decode audio/video standards. This option will autoselect | 24 | decode audio/video standards. This option will autoselect |
25 | all pertinent modules to each selected video module. | 25 | all pertinent modules to each selected video module. |
26 | 26 | ||
27 | Unselect this only if you know exaclty what you are doing, since | 27 | Unselect this only if you know exactly what you are doing, since |
28 | it may break support on some boards. | 28 | it may break support on some boards. |
29 | 29 | ||
30 | In doubt, say Y. | 30 | In doubt, say Y. |
@@ -186,7 +186,7 @@ config VIDEO_KS0127 | |||
186 | 186 | ||
187 | config VIDEO_SAA7110 | 187 | config VIDEO_SAA7110 |
188 | tristate "Philips SAA7110 video decoder" | 188 | tristate "Philips SAA7110 video decoder" |
189 | depends on VIDEO_V4L1 | 189 | depends on VIDEO_V4L1 && I2C |
190 | ---help--- | 190 | ---help--- |
191 | Support for the Philips SAA7110 video decoders. | 191 | Support for the Philips SAA7110 video decoders. |
192 | 192 | ||
diff --git a/drivers/media/video/bt8xx/bttv-cards.c b/drivers/media/video/bt8xx/bttv-cards.c index a84903e0d810..21ebe8f13815 100644 --- a/drivers/media/video/bt8xx/bttv-cards.c +++ b/drivers/media/video/bt8xx/bttv-cards.c | |||
@@ -4001,7 +4001,7 @@ static void __devinit init_PXC200(struct bttv *btv) | |||
4001 | * - sleep 1ms | 4001 | * - sleep 1ms |
4002 | * - write 0x0E | 4002 | * - write 0x0E |
4003 | * read from GPIO_DATA into buf (uint_32) | 4003 | * read from GPIO_DATA into buf (uint_32) |
4004 | * - if ( buf>>18 & 0x01 ) || ( buf>>19 && 0x01 != 0 ) | 4004 | * - if ( buf>>18 & 0x01 ) || ( buf>>19 & 0x01 != 0 ) |
4005 | * error. ERROR_CPLD_Check_Failed. | 4005 | * error. ERROR_CPLD_Check_Failed. |
4006 | */ | 4006 | */ |
4007 | /* ----------------------------------------------------------------------- */ | 4007 | /* ----------------------------------------------------------------------- */ |
diff --git a/drivers/media/video/cpia_pp.c b/drivers/media/video/cpia_pp.c index 41f4b8d17559..b12cec94f4cc 100644 --- a/drivers/media/video/cpia_pp.c +++ b/drivers/media/video/cpia_pp.c | |||
@@ -82,6 +82,8 @@ struct pp_cam_entry { | |||
82 | struct pardevice *pdev; | 82 | struct pardevice *pdev; |
83 | struct parport *port; | 83 | struct parport *port; |
84 | struct work_struct cb_task; | 84 | struct work_struct cb_task; |
85 | void (*cb_func)(void *cbdata); | ||
86 | void *cb_data; | ||
85 | int open_count; | 87 | int open_count; |
86 | wait_queue_head_t wq_stream; | 88 | wait_queue_head_t wq_stream; |
87 | /* image state flags */ | 89 | /* image state flags */ |
@@ -130,6 +132,20 @@ static void cpia_parport_disable_irq( struct parport *port ) { | |||
130 | #define PARPORT_CHUNK_SIZE PAGE_SIZE | 132 | #define PARPORT_CHUNK_SIZE PAGE_SIZE |
131 | 133 | ||
132 | 134 | ||
135 | static void cpia_pp_run_callback(struct work_struct *work) | ||
136 | { | ||
137 | void (*cb_func)(void *cbdata); | ||
138 | void *cb_data; | ||
139 | struct pp_cam_entry *cam; | ||
140 | |||
141 | cam = container_of(work, struct pp_cam_entry, cb_task); | ||
142 | cb_func = cam->cb_func; | ||
143 | cb_data = cam->cb_data; | ||
144 | work_release(work); | ||
145 | |||
146 | cb_func(cb_data); | ||
147 | } | ||
148 | |||
133 | /**************************************************************************** | 149 | /**************************************************************************** |
134 | * | 150 | * |
135 | * CPiA-specific low-level parport functions for nibble uploads | 151 | * CPiA-specific low-level parport functions for nibble uploads |
@@ -664,7 +680,9 @@ static int cpia_pp_registerCallback(void *privdata, void (*cb)(void *cbdata), vo | |||
664 | int retval = 0; | 680 | int retval = 0; |
665 | 681 | ||
666 | if(cam->port->irq != PARPORT_IRQ_NONE) { | 682 | if(cam->port->irq != PARPORT_IRQ_NONE) { |
667 | INIT_WORK(&cam->cb_task, cb, cbdata); | 683 | cam->cb_func = cb; |
684 | cam->cb_data = cbdata; | ||
685 | INIT_WORK_NAR(&cam->cb_task, cpia_pp_run_callback); | ||
668 | } else { | 686 | } else { |
669 | retval = -1; | 687 | retval = -1; |
670 | } | 688 | } |
diff --git a/drivers/media/video/cx88/cx88-input.c b/drivers/media/video/cx88/cx88-input.c index ee48995a4ab5..e60a0a52e4b2 100644 --- a/drivers/media/video/cx88/cx88-input.c +++ b/drivers/media/video/cx88/cx88-input.c | |||
@@ -145,9 +145,9 @@ static void ir_timer(unsigned long data) | |||
145 | schedule_work(&ir->work); | 145 | schedule_work(&ir->work); |
146 | } | 146 | } |
147 | 147 | ||
148 | static void cx88_ir_work(void *data) | 148 | static void cx88_ir_work(struct work_struct *work) |
149 | { | 149 | { |
150 | struct cx88_IR *ir = data; | 150 | struct cx88_IR *ir = container_of(work, struct cx88_IR, work); |
151 | unsigned long timeout; | 151 | unsigned long timeout; |
152 | 152 | ||
153 | cx88_ir_handle_key(ir); | 153 | cx88_ir_handle_key(ir); |
@@ -202,13 +202,19 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) | |||
202 | ir->sampling = 1; | 202 | ir->sampling = 1; |
203 | break; | 203 | break; |
204 | case CX88_BOARD_WINFAST_DTV2000H: | 204 | case CX88_BOARD_WINFAST_DTV2000H: |
205 | case CX88_BOARD_WINFAST2000XP_EXPERT: | ||
206 | ir_codes = ir_codes_winfast; | 205 | ir_codes = ir_codes_winfast; |
207 | ir->gpio_addr = MO_GP0_IO; | 206 | ir->gpio_addr = MO_GP0_IO; |
208 | ir->mask_keycode = 0x8f8; | 207 | ir->mask_keycode = 0x8f8; |
209 | ir->mask_keyup = 0x100; | 208 | ir->mask_keyup = 0x100; |
210 | ir->polling = 50; /* ms */ | 209 | ir->polling = 50; /* ms */ |
211 | break; | 210 | break; |
211 | case CX88_BOARD_WINFAST2000XP_EXPERT: | ||
212 | ir_codes = ir_codes_winfast; | ||
213 | ir->gpio_addr = MO_GP0_IO; | ||
214 | ir->mask_keycode = 0x8f8; | ||
215 | ir->mask_keyup = 0x100; | ||
216 | ir->polling = 1; /* ms */ | ||
217 | break; | ||
212 | case CX88_BOARD_IODATA_GVBCTV7E: | 218 | case CX88_BOARD_IODATA_GVBCTV7E: |
213 | ir_codes = ir_codes_iodata_bctv7e; | 219 | ir_codes = ir_codes_iodata_bctv7e; |
214 | ir->gpio_addr = MO_GP0_IO; | 220 | ir->gpio_addr = MO_GP0_IO; |
@@ -216,7 +222,7 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) | |||
216 | ir->mask_keydown = 0x02; | 222 | ir->mask_keydown = 0x02; |
217 | ir->polling = 5; /* ms */ | 223 | ir->polling = 5; /* ms */ |
218 | break; | 224 | break; |
219 | case CX88_BOARD_PROLINK_PLAYTVPVR: | 225 | case CX88_BOARD_PROLINK_PLAYTVPVR: |
220 | case CX88_BOARD_PIXELVIEW_PLAYTV_ULTRA_PRO: | 226 | case CX88_BOARD_PIXELVIEW_PLAYTV_ULTRA_PRO: |
221 | ir_codes = ir_codes_pixelview; | 227 | ir_codes = ir_codes_pixelview; |
222 | ir->gpio_addr = MO_GP1_IO; | 228 | ir->gpio_addr = MO_GP1_IO; |
@@ -302,7 +308,7 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) | |||
302 | core->ir = ir; | 308 | core->ir = ir; |
303 | 309 | ||
304 | if (ir->polling) { | 310 | if (ir->polling) { |
305 | INIT_WORK(&ir->work, cx88_ir_work, ir); | 311 | INIT_WORK(&ir->work, cx88_ir_work); |
306 | init_timer(&ir->timer); | 312 | init_timer(&ir->timer); |
307 | ir->timer.function = ir_timer; | 313 | ir->timer.function = ir_timer; |
308 | ir->timer.data = (unsigned long)ir; | 314 | ir->timer.data = (unsigned long)ir; |
diff --git a/drivers/media/video/et61x251/et61x251_core.c b/drivers/media/video/et61x251/et61x251_core.c index f786ab11d2cd..86e353b26b53 100644 --- a/drivers/media/video/et61x251/et61x251_core.c +++ b/drivers/media/video/et61x251/et61x251_core.c | |||
@@ -1182,8 +1182,6 @@ static void et61x251_release_resources(struct et61x251_device* cam) | |||
1182 | video_set_drvdata(cam->v4ldev, NULL); | 1182 | video_set_drvdata(cam->v4ldev, NULL); |
1183 | video_unregister_device(cam->v4ldev); | 1183 | video_unregister_device(cam->v4ldev); |
1184 | 1184 | ||
1185 | usb_put_dev(cam->usbdev); | ||
1186 | |||
1187 | mutex_unlock(&et61x251_sysfs_lock); | 1185 | mutex_unlock(&et61x251_sysfs_lock); |
1188 | 1186 | ||
1189 | kfree(cam->control_buffer); | 1187 | kfree(cam->control_buffer); |
@@ -1275,6 +1273,7 @@ static int et61x251_release(struct inode* inode, struct file* filp) | |||
1275 | 1273 | ||
1276 | if (cam->state & DEV_DISCONNECTED) { | 1274 | if (cam->state & DEV_DISCONNECTED) { |
1277 | et61x251_release_resources(cam); | 1275 | et61x251_release_resources(cam); |
1276 | usb_put_dev(cam->usbdev); | ||
1278 | mutex_unlock(&cam->dev_mutex); | 1277 | mutex_unlock(&cam->dev_mutex); |
1279 | kfree(cam); | 1278 | kfree(cam); |
1280 | return 0; | 1279 | return 0; |
diff --git a/drivers/media/video/ir-kbd-i2c.c b/drivers/media/video/ir-kbd-i2c.c index 1457b1602221..ab87e7bfe84f 100644 --- a/drivers/media/video/ir-kbd-i2c.c +++ b/drivers/media/video/ir-kbd-i2c.c | |||
@@ -268,9 +268,9 @@ static void ir_timer(unsigned long data) | |||
268 | schedule_work(&ir->work); | 268 | schedule_work(&ir->work); |
269 | } | 269 | } |
270 | 270 | ||
271 | static void ir_work(void *data) | 271 | static void ir_work(struct work_struct *work) |
272 | { | 272 | { |
273 | struct IR_i2c *ir = data; | 273 | struct IR_i2c *ir = container_of(work, struct IR_i2c, work); |
274 | ir_key_poll(ir); | 274 | ir_key_poll(ir); |
275 | mod_timer(&ir->timer, jiffies+HZ/10); | 275 | mod_timer(&ir->timer, jiffies+HZ/10); |
276 | } | 276 | } |
@@ -400,7 +400,7 @@ static int ir_attach(struct i2c_adapter *adap, int addr, | |||
400 | ir->input->name,ir->input->phys,adap->name); | 400 | ir->input->name,ir->input->phys,adap->name); |
401 | 401 | ||
402 | /* start polling via eventd */ | 402 | /* start polling via eventd */ |
403 | INIT_WORK(&ir->work, ir_work, ir); | 403 | INIT_WORK(&ir->work, ir_work); |
404 | init_timer(&ir->timer); | 404 | init_timer(&ir->timer); |
405 | ir->timer.function = ir_timer; | 405 | ir->timer.function = ir_timer; |
406 | ir->timer.data = (unsigned long)ir; | 406 | ir->timer.data = (unsigned long)ir; |
diff --git a/drivers/media/video/msp3400-driver.c b/drivers/media/video/msp3400-driver.c index cf43df3fe708..e1b56dc13c3f 100644 --- a/drivers/media/video/msp3400-driver.c +++ b/drivers/media/video/msp3400-driver.c | |||
@@ -56,7 +56,7 @@ | |||
56 | #include <media/tvaudio.h> | 56 | #include <media/tvaudio.h> |
57 | #include <media/msp3400.h> | 57 | #include <media/msp3400.h> |
58 | #include <linux/kthread.h> | 58 | #include <linux/kthread.h> |
59 | #include <linux/suspend.h> | 59 | #include <linux/freezer.h> |
60 | #include "msp3400-driver.h" | 60 | #include "msp3400-driver.h" |
61 | 61 | ||
62 | /* ---------------------------------------------------------------------- */ | 62 | /* ---------------------------------------------------------------------- */ |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-context.c b/drivers/media/video/pvrusb2/pvrusb2-context.c index f129f316d20e..cf129746205d 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-context.c +++ b/drivers/media/video/pvrusb2/pvrusb2-context.c | |||
@@ -45,16 +45,21 @@ static void pvr2_context_trigger_poll(struct pvr2_context *mp) | |||
45 | } | 45 | } |
46 | 46 | ||
47 | 47 | ||
48 | static void pvr2_context_poll(struct pvr2_context *mp) | 48 | static void pvr2_context_poll(struct work_struct *work) |
49 | { | 49 | { |
50 | struct pvr2_context *mp = | ||
51 | container_of(work, struct pvr2_context, workpoll); | ||
50 | pvr2_context_enter(mp); do { | 52 | pvr2_context_enter(mp); do { |
51 | pvr2_hdw_poll(mp->hdw); | 53 | pvr2_hdw_poll(mp->hdw); |
52 | } while (0); pvr2_context_exit(mp); | 54 | } while (0); pvr2_context_exit(mp); |
53 | } | 55 | } |
54 | 56 | ||
55 | 57 | ||
56 | static void pvr2_context_setup(struct pvr2_context *mp) | 58 | static void pvr2_context_setup(struct work_struct *work) |
57 | { | 59 | { |
60 | struct pvr2_context *mp = | ||
61 | container_of(work, struct pvr2_context, workinit); | ||
62 | |||
58 | pvr2_context_enter(mp); do { | 63 | pvr2_context_enter(mp); do { |
59 | if (!pvr2_hdw_dev_ok(mp->hdw)) break; | 64 | if (!pvr2_hdw_dev_ok(mp->hdw)) break; |
60 | pvr2_hdw_setup(mp->hdw); | 65 | pvr2_hdw_setup(mp->hdw); |
@@ -92,8 +97,8 @@ struct pvr2_context *pvr2_context_create( | |||
92 | } | 97 | } |
93 | 98 | ||
94 | mp->workqueue = create_singlethread_workqueue("pvrusb2"); | 99 | mp->workqueue = create_singlethread_workqueue("pvrusb2"); |
95 | INIT_WORK(&mp->workinit,(void (*)(void*))pvr2_context_setup,mp); | 100 | INIT_WORK(&mp->workinit, pvr2_context_setup); |
96 | INIT_WORK(&mp->workpoll,(void (*)(void*))pvr2_context_poll,mp); | 101 | INIT_WORK(&mp->workpoll, pvr2_context_poll); |
97 | queue_work(mp->workqueue,&mp->workinit); | 102 | queue_work(mp->workqueue,&mp->workinit); |
98 | done: | 103 | done: |
99 | return mp; | 104 | return mp; |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c b/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c index df8feac16aee..c80c26be6e4d 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c +++ b/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c | |||
@@ -221,7 +221,7 @@ static unsigned int decoder_describe(struct pvr2_v4l_cx2584x *ctxt, | |||
221 | static void decoder_reset(struct pvr2_v4l_cx2584x *ctxt) | 221 | static void decoder_reset(struct pvr2_v4l_cx2584x *ctxt) |
222 | { | 222 | { |
223 | int ret; | 223 | int ret; |
224 | ret = pvr2_i2c_client_cmd(ctxt->client,VIDIOC_INT_RESET,0); | 224 | ret = pvr2_i2c_client_cmd(ctxt->client,VIDIOC_INT_RESET,NULL); |
225 | pvr2_trace(PVR2_TRACE_CHIPS,"i2c cx25840 decoder_reset (ret=%d)",ret); | 225 | pvr2_trace(PVR2_TRACE_CHIPS,"i2c cx25840 decoder_reset (ret=%d)",ret); |
226 | } | 226 | } |
227 | 227 | ||
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c index f920e0ccacd3..1f787333d18c 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c +++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c | |||
@@ -1953,8 +1953,8 @@ struct pvr2_hdw *pvr2_hdw_create(struct usb_interface *intf, | |||
1953 | return hdw; | 1953 | return hdw; |
1954 | fail: | 1954 | fail: |
1955 | if (hdw) { | 1955 | if (hdw) { |
1956 | if (hdw->ctl_read_urb) usb_free_urb(hdw->ctl_read_urb); | 1956 | usb_free_urb(hdw->ctl_read_urb); |
1957 | if (hdw->ctl_write_urb) usb_free_urb(hdw->ctl_write_urb); | 1957 | usb_free_urb(hdw->ctl_write_urb); |
1958 | if (hdw->ctl_read_buffer) kfree(hdw->ctl_read_buffer); | 1958 | if (hdw->ctl_read_buffer) kfree(hdw->ctl_read_buffer); |
1959 | if (hdw->ctl_write_buffer) kfree(hdw->ctl_write_buffer); | 1959 | if (hdw->ctl_write_buffer) kfree(hdw->ctl_write_buffer); |
1960 | if (hdw->controls) kfree(hdw->controls); | 1960 | if (hdw->controls) kfree(hdw->controls); |
@@ -2575,12 +2575,10 @@ static void pvr2_ctl_timeout(unsigned long data) | |||
2575 | struct pvr2_hdw *hdw = (struct pvr2_hdw *)data; | 2575 | struct pvr2_hdw *hdw = (struct pvr2_hdw *)data; |
2576 | if (hdw->ctl_write_pend_flag || hdw->ctl_read_pend_flag) { | 2576 | if (hdw->ctl_write_pend_flag || hdw->ctl_read_pend_flag) { |
2577 | hdw->ctl_timeout_flag = !0; | 2577 | hdw->ctl_timeout_flag = !0; |
2578 | if (hdw->ctl_write_pend_flag && hdw->ctl_write_urb) { | 2578 | if (hdw->ctl_write_pend_flag) |
2579 | usb_unlink_urb(hdw->ctl_write_urb); | 2579 | usb_unlink_urb(hdw->ctl_write_urb); |
2580 | } | 2580 | if (hdw->ctl_read_pend_flag) |
2581 | if (hdw->ctl_read_pend_flag && hdw->ctl_read_urb) { | ||
2582 | usb_unlink_urb(hdw->ctl_read_urb); | 2581 | usb_unlink_urb(hdw->ctl_read_urb); |
2583 | } | ||
2584 | } | 2582 | } |
2585 | } | 2583 | } |
2586 | 2584 | ||
diff --git a/drivers/media/video/pvrusb2/pvrusb2-io.c b/drivers/media/video/pvrusb2/pvrusb2-io.c index 70aa63eba0cb..57fb32033543 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-io.c +++ b/drivers/media/video/pvrusb2/pvrusb2-io.c | |||
@@ -289,7 +289,7 @@ static void pvr2_buffer_done(struct pvr2_buffer *bp) | |||
289 | pvr2_buffer_set_none(bp); | 289 | pvr2_buffer_set_none(bp); |
290 | bp->signature = 0; | 290 | bp->signature = 0; |
291 | bp->stream = NULL; | 291 | bp->stream = NULL; |
292 | if (bp->purb) usb_free_urb(bp->purb); | 292 | usb_free_urb(bp->purb); |
293 | pvr2_trace(PVR2_TRACE_BUF_POOL,"/*---TRACE_FLOW---*/" | 293 | pvr2_trace(PVR2_TRACE_BUF_POOL,"/*---TRACE_FLOW---*/" |
294 | " bufferDone %p",bp); | 294 | " bufferDone %p",bp); |
295 | } | 295 | } |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c index 97e974d9b9c3..bb40e9085977 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c +++ b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c | |||
@@ -711,8 +711,8 @@ static void pvr2_v4l2_dev_destroy(struct pvr2_v4l2_dev *dip) | |||
711 | dip->devbase.minor,pvr2_config_get_name(dip->config)); | 711 | dip->devbase.minor,pvr2_config_get_name(dip->config)); |
712 | 712 | ||
713 | /* Paranoia */ | 713 | /* Paranoia */ |
714 | dip->v4lp = 0; | 714 | dip->v4lp = NULL; |
715 | dip->stream = 0; | 715 | dip->stream = NULL; |
716 | 716 | ||
717 | /* Actual deallocation happens later when all internal references | 717 | /* Actual deallocation happens later when all internal references |
718 | are gone. */ | 718 | are gone. */ |
@@ -1076,7 +1076,7 @@ struct pvr2_v4l2 *pvr2_v4l2_create(struct pvr2_context *mnp) | |||
1076 | vp->vdev = kmalloc(sizeof(*vp->vdev),GFP_KERNEL); | 1076 | vp->vdev = kmalloc(sizeof(*vp->vdev),GFP_KERNEL); |
1077 | if (!vp->vdev) { | 1077 | if (!vp->vdev) { |
1078 | kfree(vp); | 1078 | kfree(vp); |
1079 | return 0; | 1079 | return NULL; |
1080 | } | 1080 | } |
1081 | memset(vp->vdev,0,sizeof(*vp->vdev)); | 1081 | memset(vp->vdev,0,sizeof(*vp->vdev)); |
1082 | pvr2_channel_init(&vp->channel,mnp); | 1082 | pvr2_channel_init(&vp->channel,mnp); |
diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c index 46c114830884..a996aad79276 100644 --- a/drivers/media/video/pwc/pwc-if.c +++ b/drivers/media/video/pwc/pwc-if.c | |||
@@ -866,11 +866,9 @@ int pwc_isoc_init(struct pwc_device *pdev) | |||
866 | } | 866 | } |
867 | if (ret) { | 867 | if (ret) { |
868 | /* De-allocate in reverse order */ | 868 | /* De-allocate in reverse order */ |
869 | while (i >= 0) { | 869 | while (i--) { |
870 | if (pdev->sbuf[i].urb != NULL) | 870 | usb_free_urb(pdev->sbuf[i].urb); |
871 | usb_free_urb(pdev->sbuf[i].urb); | ||
872 | pdev->sbuf[i].urb = NULL; | 871 | pdev->sbuf[i].urb = NULL; |
873 | i--; | ||
874 | } | 872 | } |
875 | return ret; | 873 | return ret; |
876 | } | 874 | } |
@@ -1095,8 +1093,7 @@ static int pwc_video_open(struct inode *inode, struct file *file) | |||
1095 | PWC_DEBUG_OPEN(">> video_open called(vdev = 0x%p).\n", vdev); | 1093 | PWC_DEBUG_OPEN(">> video_open called(vdev = 0x%p).\n", vdev); |
1096 | 1094 | ||
1097 | pdev = (struct pwc_device *)vdev->priv; | 1095 | pdev = (struct pwc_device *)vdev->priv; |
1098 | if (pdev == NULL) | 1096 | BUG_ON(!pdev); |
1099 | BUG(); | ||
1100 | if (pdev->vopen) { | 1097 | if (pdev->vopen) { |
1101 | PWC_DEBUG_OPEN("I'm busy, someone is using the device.\n"); | 1098 | PWC_DEBUG_OPEN("I'm busy, someone is using the device.\n"); |
1102 | return -EBUSY; | 1099 | return -EBUSY; |
diff --git a/drivers/media/video/saa6588.c b/drivers/media/video/saa6588.c index a81285ca7d5b..92eabf88a09b 100644 --- a/drivers/media/video/saa6588.c +++ b/drivers/media/video/saa6588.c | |||
@@ -212,8 +212,10 @@ static void read_from_buf(struct saa6588 *s, struct rds_command *a) | |||
212 | if (rd_blocks > s->block_count) | 212 | if (rd_blocks > s->block_count) |
213 | rd_blocks = s->block_count; | 213 | rd_blocks = s->block_count; |
214 | 214 | ||
215 | if (!rd_blocks) | 215 | if (!rd_blocks) { |
216 | spin_unlock_irqrestore(&s->lock, flags); | ||
216 | return; | 217 | return; |
218 | } | ||
217 | 219 | ||
218 | for (i = 0; i < rd_blocks; i++) { | 220 | for (i = 0; i < rd_blocks; i++) { |
219 | if (block_to_user_buf(s, buf_ptr)) { | 221 | if (block_to_user_buf(s, buf_ptr)) { |
@@ -322,9 +324,9 @@ static void saa6588_timer(unsigned long data) | |||
322 | schedule_work(&s->work); | 324 | schedule_work(&s->work); |
323 | } | 325 | } |
324 | 326 | ||
325 | static void saa6588_work(void *data) | 327 | static void saa6588_work(struct work_struct *work) |
326 | { | 328 | { |
327 | struct saa6588 *s = (struct saa6588 *)data; | 329 | struct saa6588 *s = container_of(work, struct saa6588, work); |
328 | 330 | ||
329 | saa6588_i2c_poll(s); | 331 | saa6588_i2c_poll(s); |
330 | mod_timer(&s->timer, jiffies + msecs_to_jiffies(20)); | 332 | mod_timer(&s->timer, jiffies + msecs_to_jiffies(20)); |
@@ -417,7 +419,7 @@ static int saa6588_attach(struct i2c_adapter *adap, int addr, int kind) | |||
417 | saa6588_configure(s); | 419 | saa6588_configure(s); |
418 | 420 | ||
419 | /* start polling via eventd */ | 421 | /* start polling via eventd */ |
420 | INIT_WORK(&s->work, saa6588_work, s); | 422 | INIT_WORK(&s->work, saa6588_work); |
421 | init_timer(&s->timer); | 423 | init_timer(&s->timer); |
422 | s->timer.function = saa6588_timer; | 424 | s->timer.function = saa6588_timer; |
423 | s->timer.data = (unsigned long)s; | 425 | s->timer.data = (unsigned long)s; |
diff --git a/drivers/media/video/saa7115.c b/drivers/media/video/saa7115.c index c5719f7bd1ac..f28398dd9d93 100644 --- a/drivers/media/video/saa7115.c +++ b/drivers/media/video/saa7115.c | |||
@@ -1464,8 +1464,6 @@ static int saa711x_attach(struct i2c_adapter *adapter, int address, int kind) | |||
1464 | client->driver = &i2c_driver_saa711x; | 1464 | client->driver = &i2c_driver_saa711x; |
1465 | snprintf(client->name, sizeof(client->name) - 1, "saa7115"); | 1465 | snprintf(client->name, sizeof(client->name) - 1, "saa7115"); |
1466 | 1466 | ||
1467 | v4l_dbg(1, debug, client, "detecting saa7115 client on address 0x%x\n", address << 1); | ||
1468 | |||
1469 | for (i=0;i<0x0f;i++) { | 1467 | for (i=0;i<0x0f;i++) { |
1470 | saa711x_write(client, 0, i); | 1468 | saa711x_write(client, 0, i); |
1471 | name[i] = (saa711x_read(client, 0) &0x0f) +'0'; | 1469 | name[i] = (saa711x_read(client, 0) &0x0f) +'0'; |
@@ -1477,6 +1475,13 @@ static int saa711x_attach(struct i2c_adapter *adapter, int address, int kind) | |||
1477 | saa711x_write(client, 0, 5); | 1475 | saa711x_write(client, 0, 5); |
1478 | chip_id = saa711x_read(client, 0) & 0x0f; | 1476 | chip_id = saa711x_read(client, 0) & 0x0f; |
1479 | 1477 | ||
1478 | /* Check whether this chip is part of the saa711x series */ | ||
1479 | if (memcmp(name, "1f711", 5)) { | ||
1480 | v4l_dbg(1, debug, client, "chip found @ 0x%x (ID %s) does not match a known saa711x chip.\n", | ||
1481 | address << 1, name); | ||
1482 | return 0; | ||
1483 | } | ||
1484 | |||
1480 | snprintf(client->name, sizeof(client->name) - 1, "saa711%d",chip_id); | 1485 | snprintf(client->name, sizeof(client->name) - 1, "saa711%d",chip_id); |
1481 | v4l_info(client, "saa711%d found (%s) @ 0x%x (%s)\n", chip_id, name, address << 1, adapter->name); | 1486 | v4l_info(client, "saa711%d found (%s) @ 0x%x (%s)\n", chip_id, name, address << 1, adapter->name); |
1482 | 1487 | ||
diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c index c9d8e3b9cc37..51f0cfdcb680 100644 --- a/drivers/media/video/saa7134/saa7134-cards.c +++ b/drivers/media/video/saa7134/saa7134-cards.c | |||
@@ -2969,7 +2969,7 @@ struct saa7134_board saa7134_boards[] = { | |||
2969 | /* Petr Baudis <pasky@ucw.cz> */ | 2969 | /* Petr Baudis <pasky@ucw.cz> */ |
2970 | .name = "AVerMedia TV Hybrid A16AR", | 2970 | .name = "AVerMedia TV Hybrid A16AR", |
2971 | .audio_clock = 0x187de7, | 2971 | .audio_clock = 0x187de7, |
2972 | .tuner_type = TUNER_PHILIPS_TDA8290, /* untested */ | 2972 | .tuner_type = TUNER_PHILIPS_TD1316, /* untested */ |
2973 | .radio_type = TUNER_TEA5767, /* untested */ | 2973 | .radio_type = TUNER_TEA5767, /* untested */ |
2974 | .tuner_addr = ADDR_UNSET, | 2974 | .tuner_addr = ADDR_UNSET, |
2975 | .radio_addr = ADDR_UNSET, | 2975 | .radio_addr = ADDR_UNSET, |
@@ -3718,6 +3718,7 @@ int saa7134_board_init1(struct saa7134_dev *dev) | |||
3718 | case SAA7134_BOARD_AVERMEDIA_STUDIO_307: | 3718 | case SAA7134_BOARD_AVERMEDIA_STUDIO_307: |
3719 | case SAA7134_BOARD_AVERMEDIA_307: | 3719 | case SAA7134_BOARD_AVERMEDIA_307: |
3720 | case SAA7134_BOARD_AVERMEDIA_GO_007_FM: | 3720 | case SAA7134_BOARD_AVERMEDIA_GO_007_FM: |
3721 | case SAA7134_BOARD_AVERMEDIA_777: | ||
3721 | /* case SAA7134_BOARD_SABRENT_SBTTVFM: */ /* not finished yet */ | 3722 | /* case SAA7134_BOARD_SABRENT_SBTTVFM: */ /* not finished yet */ |
3722 | case SAA7134_BOARD_VIDEOMATE_TV_PVR: | 3723 | case SAA7134_BOARD_VIDEOMATE_TV_PVR: |
3723 | case SAA7134_BOARD_VIDEOMATE_GOLD_PLUS: | 3724 | case SAA7134_BOARD_VIDEOMATE_GOLD_PLUS: |
@@ -3734,6 +3735,7 @@ int saa7134_board_init1(struct saa7134_dev *dev) | |||
3734 | case SAA7134_BOARD_FLYDVBT_LR301: | 3735 | case SAA7134_BOARD_FLYDVBT_LR301: |
3735 | case SAA7134_BOARD_FLYDVBTDUO: | 3736 | case SAA7134_BOARD_FLYDVBTDUO: |
3736 | case SAA7134_BOARD_PROTEUS_2309: | 3737 | case SAA7134_BOARD_PROTEUS_2309: |
3738 | case SAA7134_BOARD_AVERMEDIA_A16AR: | ||
3737 | dev->has_remote = SAA7134_REMOTE_GPIO; | 3739 | dev->has_remote = SAA7134_REMOTE_GPIO; |
3738 | break; | 3740 | break; |
3739 | case SAA7134_BOARD_FLYDVBS_LR300: | 3741 | case SAA7134_BOARD_FLYDVBS_LR300: |
@@ -3772,7 +3774,6 @@ int saa7134_board_init1(struct saa7134_dev *dev) | |||
3772 | saa_writeb(SAA7134_GPIO_GPMODE3, 0x08); | 3774 | saa_writeb(SAA7134_GPIO_GPMODE3, 0x08); |
3773 | saa_writeb(SAA7134_GPIO_GPSTATUS3, 0x00); | 3775 | saa_writeb(SAA7134_GPIO_GPSTATUS3, 0x00); |
3774 | break; | 3776 | break; |
3775 | case SAA7134_BOARD_AVERMEDIA_A16AR: | ||
3776 | case SAA7134_BOARD_AVERMEDIA_CARDBUS: | 3777 | case SAA7134_BOARD_AVERMEDIA_CARDBUS: |
3777 | /* power-up tuner chip */ | 3778 | /* power-up tuner chip */ |
3778 | saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0xffffffff, 0xffffffff); | 3779 | saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0xffffffff, 0xffffffff); |
diff --git a/drivers/media/video/saa7134/saa7134-dvb.c b/drivers/media/video/saa7134/saa7134-dvb.c index 1ba53b525ad2..6b61d9b2fcb5 100644 --- a/drivers/media/video/saa7134/saa7134-dvb.c +++ b/drivers/media/video/saa7134/saa7134-dvb.c | |||
@@ -1147,6 +1147,8 @@ static int dvb_init(struct saa7134_dev *dev) | |||
1147 | &philips_europa_config, | 1147 | &philips_europa_config, |
1148 | &dev->i2c_adap); | 1148 | &dev->i2c_adap); |
1149 | if (dev->dvb.frontend) { | 1149 | if (dev->dvb.frontend) { |
1150 | dev->original_demod_sleep = dev->dvb.frontend->ops.sleep; | ||
1151 | dev->dvb.frontend->ops.sleep = philips_europa_demod_sleep; | ||
1150 | dev->dvb.frontend->ops.tuner_ops.init = philips_europa_tuner_init; | 1152 | dev->dvb.frontend->ops.tuner_ops.init = philips_europa_tuner_init; |
1151 | dev->dvb.frontend->ops.tuner_ops.sleep = philips_europa_tuner_sleep; | 1153 | dev->dvb.frontend->ops.tuner_ops.sleep = philips_europa_tuner_sleep; |
1152 | dev->dvb.frontend->ops.tuner_ops.set_params = philips_td1316_tuner_set_params; | 1154 | dev->dvb.frontend->ops.tuner_ops.set_params = philips_td1316_tuner_set_params; |
diff --git a/drivers/media/video/saa7134/saa7134-empress.c b/drivers/media/video/saa7134/saa7134-empress.c index 65d044086ce9..daaae870a2c4 100644 --- a/drivers/media/video/saa7134/saa7134-empress.c +++ b/drivers/media/video/saa7134/saa7134-empress.c | |||
@@ -343,9 +343,10 @@ static struct video_device saa7134_empress_template = | |||
343 | .minor = -1, | 343 | .minor = -1, |
344 | }; | 344 | }; |
345 | 345 | ||
346 | static void empress_signal_update(void* data) | 346 | static void empress_signal_update(struct work_struct *work) |
347 | { | 347 | { |
348 | struct saa7134_dev* dev = (struct saa7134_dev*) data; | 348 | struct saa7134_dev* dev = |
349 | container_of(work, struct saa7134_dev, empress_workqueue); | ||
349 | 350 | ||
350 | if (dev->nosignal) { | 351 | if (dev->nosignal) { |
351 | dprintk("no video signal\n"); | 352 | dprintk("no video signal\n"); |
@@ -378,7 +379,7 @@ static int empress_init(struct saa7134_dev *dev) | |||
378 | "%s empress (%s)", dev->name, | 379 | "%s empress (%s)", dev->name, |
379 | saa7134_boards[dev->board].name); | 380 | saa7134_boards[dev->board].name); |
380 | 381 | ||
381 | INIT_WORK(&dev->empress_workqueue, empress_signal_update, (void*) dev); | 382 | INIT_WORK(&dev->empress_workqueue, empress_signal_update); |
382 | 383 | ||
383 | err = video_register_device(dev->empress_dev,VFL_TYPE_GRABBER, | 384 | err = video_register_device(dev->empress_dev,VFL_TYPE_GRABBER, |
384 | empress_nr[dev->nr]); | 385 | empress_nr[dev->nr]); |
@@ -399,7 +400,7 @@ static int empress_init(struct saa7134_dev *dev) | |||
399 | sizeof(struct saa7134_buf), | 400 | sizeof(struct saa7134_buf), |
400 | dev); | 401 | dev); |
401 | 402 | ||
402 | empress_signal_update(dev); | 403 | empress_signal_update(&dev->empress_workqueue); |
403 | return 0; | 404 | return 0; |
404 | } | 405 | } |
405 | 406 | ||
diff --git a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/video/saa7134/saa7134-input.c index ff5991136f4e..dee83552e681 100644 --- a/drivers/media/video/saa7134/saa7134-input.c +++ b/drivers/media/video/saa7134/saa7134-input.c | |||
@@ -185,7 +185,6 @@ int saa7134_input_init1(struct saa7134_dev *dev) | |||
185 | case SAA7134_BOARD_AVERMEDIA_STUDIO_305: | 185 | case SAA7134_BOARD_AVERMEDIA_STUDIO_305: |
186 | case SAA7134_BOARD_AVERMEDIA_STUDIO_307: | 186 | case SAA7134_BOARD_AVERMEDIA_STUDIO_307: |
187 | case SAA7134_BOARD_AVERMEDIA_GO_007_FM: | 187 | case SAA7134_BOARD_AVERMEDIA_GO_007_FM: |
188 | case SAA7134_BOARD_AVERMEDIA_A16AR: | ||
189 | ir_codes = ir_codes_avermedia; | 188 | ir_codes = ir_codes_avermedia; |
190 | mask_keycode = 0x0007C8; | 189 | mask_keycode = 0x0007C8; |
191 | mask_keydown = 0x000010; | 190 | mask_keydown = 0x000010; |
@@ -194,6 +193,16 @@ int saa7134_input_init1(struct saa7134_dev *dev) | |||
194 | saa_setb(SAA7134_GPIO_GPMODE0, 0x4); | 193 | saa_setb(SAA7134_GPIO_GPMODE0, 0x4); |
195 | saa_setb(SAA7134_GPIO_GPSTATUS0, 0x4); | 194 | saa_setb(SAA7134_GPIO_GPSTATUS0, 0x4); |
196 | break; | 195 | break; |
196 | case SAA7134_BOARD_AVERMEDIA_777: | ||
197 | case SAA7134_BOARD_AVERMEDIA_A16AR: | ||
198 | ir_codes = ir_codes_avermedia; | ||
199 | mask_keycode = 0x02F200; | ||
200 | mask_keydown = 0x000400; | ||
201 | polling = 50; // ms | ||
202 | /* Without this we won't receive key up events */ | ||
203 | saa_setb(SAA7134_GPIO_GPMODE1, 0x1); | ||
204 | saa_setb(SAA7134_GPIO_GPSTATUS1, 0x1); | ||
205 | break; | ||
197 | case SAA7134_BOARD_KWORLD_TERMINATOR: | 206 | case SAA7134_BOARD_KWORLD_TERMINATOR: |
198 | ir_codes = ir_codes_pixelview; | 207 | ir_codes = ir_codes_pixelview; |
199 | mask_keycode = 0x00001f; | 208 | mask_keycode = 0x00001f; |
diff --git a/drivers/media/video/sn9c102/sn9c102_core.c b/drivers/media/video/sn9c102/sn9c102_core.c index a4702d3c2aca..18458d46c0ff 100644 --- a/drivers/media/video/sn9c102/sn9c102_core.c +++ b/drivers/media/video/sn9c102/sn9c102_core.c | |||
@@ -775,7 +775,7 @@ static int sn9c102_start_transfer(struct sn9c102_device* cam) | |||
775 | return 0; | 775 | return 0; |
776 | 776 | ||
777 | free_urbs: | 777 | free_urbs: |
778 | for (i = 0; (i < SN9C102_URBS) && cam->urb[i]; i++) | 778 | for (i = 0; i < SN9C102_URBS; i++) |
779 | usb_free_urb(cam->urb[i]); | 779 | usb_free_urb(cam->urb[i]); |
780 | 780 | ||
781 | free_buffers: | 781 | free_buffers: |
@@ -1462,8 +1462,6 @@ static void sn9c102_release_resources(struct sn9c102_device* cam) | |||
1462 | video_set_drvdata(cam->v4ldev, NULL); | 1462 | video_set_drvdata(cam->v4ldev, NULL); |
1463 | video_unregister_device(cam->v4ldev); | 1463 | video_unregister_device(cam->v4ldev); |
1464 | 1464 | ||
1465 | usb_put_dev(cam->usbdev); | ||
1466 | |||
1467 | mutex_unlock(&sn9c102_sysfs_lock); | 1465 | mutex_unlock(&sn9c102_sysfs_lock); |
1468 | 1466 | ||
1469 | kfree(cam->control_buffer); | 1467 | kfree(cam->control_buffer); |
@@ -1555,6 +1553,7 @@ static int sn9c102_release(struct inode* inode, struct file* filp) | |||
1555 | 1553 | ||
1556 | if (cam->state & DEV_DISCONNECTED) { | 1554 | if (cam->state & DEV_DISCONNECTED) { |
1557 | sn9c102_release_resources(cam); | 1555 | sn9c102_release_resources(cam); |
1556 | usb_put_dev(cam->usbdev); | ||
1558 | mutex_unlock(&cam->dev_mutex); | 1557 | mutex_unlock(&cam->dev_mutex); |
1559 | kfree(cam); | 1558 | kfree(cam); |
1560 | return 0; | 1559 | return 0; |
diff --git a/drivers/media/video/tvaudio.c b/drivers/media/video/tvaudio.c index fcaef4bf8289..d506dfaa45a9 100644 --- a/drivers/media/video/tvaudio.c +++ b/drivers/media/video/tvaudio.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/init.h> | 29 | #include <linux/init.h> |
30 | #include <linux/smp_lock.h> | 30 | #include <linux/smp_lock.h> |
31 | #include <linux/kthread.h> | 31 | #include <linux/kthread.h> |
32 | #include <linux/freezer.h> | ||
32 | 33 | ||
33 | #include <media/tvaudio.h> | 34 | #include <media/tvaudio.h> |
34 | #include <media/v4l2-common.h> | 35 | #include <media/v4l2-common.h> |
diff --git a/drivers/media/video/tveeprom.c b/drivers/media/video/tveeprom.c index e6baaee038bf..6b9ef731b83a 100644 --- a/drivers/media/video/tveeprom.c +++ b/drivers/media/video/tveeprom.c | |||
@@ -468,7 +468,7 @@ void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee, | |||
468 | (eeprom_data[i+6] << 8) + | 468 | (eeprom_data[i+6] << 8) + |
469 | (eeprom_data[i+7] << 16); | 469 | (eeprom_data[i+7] << 16); |
470 | 470 | ||
471 | if ( (eeprom_data[i + 8] && 0xf0) && | 471 | if ( (eeprom_data[i + 8] & 0xf0) && |
472 | (tvee->serial_number < 0xffffff) ) { | 472 | (tvee->serial_number < 0xffffff) ) { |
473 | tvee->MAC_address[0] = 0x00; | 473 | tvee->MAC_address[0] = 0x00; |
474 | tvee->MAC_address[1] = 0x0D; | 474 | tvee->MAC_address[1] = 0x0D; |
diff --git a/drivers/media/video/usbvideo/quickcam_messenger.c b/drivers/media/video/usbvideo/quickcam_messenger.c index 9a26b9484aae..bbf2beeeb449 100644 --- a/drivers/media/video/usbvideo/quickcam_messenger.c +++ b/drivers/media/video/usbvideo/quickcam_messenger.c | |||
@@ -190,8 +190,7 @@ static int qcm_alloc_int_urb(struct qcm *cam) | |||
190 | 190 | ||
191 | static void qcm_free_int(struct qcm *cam) | 191 | static void qcm_free_int(struct qcm *cam) |
192 | { | 192 | { |
193 | if (cam->button_urb) | 193 | usb_free_urb(cam->button_urb); |
194 | usb_free_urb(cam->button_urb); | ||
195 | } | 194 | } |
196 | #endif /* CONFIG_INPUT */ | 195 | #endif /* CONFIG_INPUT */ |
197 | 196 | ||
diff --git a/drivers/media/video/video-buf-dvb.c b/drivers/media/video/video-buf-dvb.c index f53edf1923b7..fcc5467e7636 100644 --- a/drivers/media/video/video-buf-dvb.c +++ b/drivers/media/video/video-buf-dvb.c | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <linux/fs.h> | 20 | #include <linux/fs.h> |
21 | #include <linux/kthread.h> | 21 | #include <linux/kthread.h> |
22 | #include <linux/file.h> | 22 | #include <linux/file.h> |
23 | #include <linux/suspend.h> | 23 | #include <linux/freezer.h> |
24 | 24 | ||
25 | #include <media/video-buf.h> | 25 | #include <media/video-buf.h> |
26 | #include <media/video-buf-dvb.h> | 26 | #include <media/video-buf-dvb.h> |
diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c index 3c8dc72dc8e9..9986de5cb3d6 100644 --- a/drivers/media/video/vivi.c +++ b/drivers/media/video/vivi.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <media/v4l2-common.h> | 36 | #include <media/v4l2-common.h> |
37 | #include <linux/kthread.h> | 37 | #include <linux/kthread.h> |
38 | #include <linux/highmem.h> | 38 | #include <linux/highmem.h> |
39 | #include <linux/freezer.h> | ||
39 | 40 | ||
40 | /* Wake up at about 30 fps */ | 41 | /* Wake up at about 30 fps */ |
41 | #define WAKE_NUMERATOR 30 | 42 | #define WAKE_NUMERATOR 30 |
diff --git a/drivers/media/video/zc0301/zc0301_core.c b/drivers/media/video/zc0301/zc0301_core.c index 5b5563424422..52d0f759ee00 100644 --- a/drivers/media/video/zc0301/zc0301_core.c +++ b/drivers/media/video/zc0301/zc0301_core.c | |||
@@ -489,7 +489,7 @@ static int zc0301_start_transfer(struct zc0301_device* cam) | |||
489 | return 0; | 489 | return 0; |
490 | 490 | ||
491 | free_urbs: | 491 | free_urbs: |
492 | for (i = 0; (i < ZC0301_URBS) && cam->urb[i]; i++) | 492 | for (i = 0; i < ZC0301_URBS; i++) |
493 | usb_free_urb(cam->urb[i]); | 493 | usb_free_urb(cam->urb[i]); |
494 | 494 | ||
495 | free_buffers: | 495 | free_buffers: |