diff options
author | David Howells <dhowells@redhat.com> | 2006-12-05 09:37:56 -0500 |
---|---|---|
committer | David Howells <dhowells@warthog.cambridge.redhat.com> | 2006-12-05 09:37:56 -0500 |
commit | 4c1ac1b49122b805adfa4efc620592f68dccf5db (patch) | |
tree | 87557f4bc2fd4fe65b7570489c2f610c45c0adcd /drivers/media | |
parent | c4028958b6ecad064b1a6303a6a5906d4fe48d73 (diff) | |
parent | d916faace3efc0bf19fe9a615a1ab8fa1a24cd93 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
drivers/infiniband/core/iwcm.c
drivers/net/chelsio/cxgb2.c
drivers/net/wireless/bcm43xx/bcm43xx_main.c
drivers/net/wireless/prism54/islpci_eth.c
drivers/usb/core/hub.h
drivers/usb/input/hid-core.c
net/core/netpoll.c
Fix up merge failures with Linus's head and fix new compilation failures.
Signed-Off-By: David Howells <dhowells@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/dvb/cinergyT2/cinergyT2.c | 6 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-core/dvb_frontend.c | 2 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/tda10086.c | 4 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/budget-patch.c | 8 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/budget.c | 9 | ||||
-rw-r--r-- | drivers/media/dvb/ttusb-dec/ttusb_dec.c | 3 | ||||
-rw-r--r-- | drivers/media/video/Kconfig | 2 | ||||
-rw-r--r-- | drivers/media/video/et61x251/et61x251_core.c | 3 | ||||
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-hdw.c | 10 | ||||
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-io.c | 2 | ||||
-rw-r--r-- | drivers/media/video/pwc/pwc-if.c | 9 | ||||
-rw-r--r-- | drivers/media/video/saa6588.c | 4 | ||||
-rw-r--r-- | drivers/media/video/saa7115.c | 9 | ||||
-rw-r--r-- | drivers/media/video/sn9c102/sn9c102_core.c | 5 | ||||
-rw-r--r-- | drivers/media/video/usbvideo/quickcam_messenger.c | 3 | ||||
-rw-r--r-- | drivers/media/video/zc0301/zc0301_core.c | 2 |
16 files changed, 45 insertions, 36 deletions
diff --git a/drivers/media/dvb/cinergyT2/cinergyT2.c b/drivers/media/dvb/cinergyT2/cinergyT2.c index dd0bcbe140bd..8458ff3f351e 100644 --- a/drivers/media/dvb/cinergyT2/cinergyT2.c +++ b/drivers/media/dvb/cinergyT2/cinergyT2.c | |||
@@ -275,8 +275,7 @@ static void cinergyt2_free_stream_urbs (struct cinergyt2 *cinergyt2) | |||
275 | int i; | 275 | int i; |
276 | 276 | ||
277 | for (i=0; i<STREAM_URB_COUNT; i++) | 277 | for (i=0; i<STREAM_URB_COUNT; i++) |
278 | if (cinergyt2->stream_urb[i]) | 278 | usb_free_urb(cinergyt2->stream_urb[i]); |
279 | usb_free_urb(cinergyt2->stream_urb[i]); | ||
280 | 279 | ||
281 | usb_buffer_free(cinergyt2->udev, STREAM_URB_COUNT*STREAM_BUF_SIZE, | 280 | usb_buffer_free(cinergyt2->udev, STREAM_URB_COUNT*STREAM_BUF_SIZE, |
282 | cinergyt2->streambuf, cinergyt2->streambuf_dmahandle); | 281 | cinergyt2->streambuf, cinergyt2->streambuf_dmahandle); |
@@ -320,8 +319,7 @@ static void cinergyt2_stop_stream_xfer (struct cinergyt2 *cinergyt2) | |||
320 | cinergyt2_control_stream_transfer(cinergyt2, 0); | 319 | cinergyt2_control_stream_transfer(cinergyt2, 0); |
321 | 320 | ||
322 | for (i=0; i<STREAM_URB_COUNT; i++) | 321 | for (i=0; i<STREAM_URB_COUNT; i++) |
323 | if (cinergyt2->stream_urb[i]) | 322 | usb_kill_urb(cinergyt2->stream_urb[i]); |
324 | usb_kill_urb(cinergyt2->stream_urb[i]); | ||
325 | } | 323 | } |
326 | 324 | ||
327 | static int cinergyt2_start_stream_xfer (struct cinergyt2 *cinergyt2) | 325 | static int cinergyt2_start_stream_xfer (struct cinergyt2 *cinergyt2) |
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c index 53304e6991ac..a2ab2eebfc68 100644 --- a/drivers/media/dvb/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb/dvb-core/dvb_frontend.c | |||
@@ -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/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/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..8135f3e76aeb 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 * |
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig index bf267552941f..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. |
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/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/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 8ba05c214ca7..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)) { |
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/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/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/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: |