diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-24 00:12:49 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-24 00:12:49 -0400 |
commit | df462b3dbeeaae7141f1b63cbfcc1e1bae6a85fc (patch) | |
tree | bca52fce066159f136d75c69e79016422212cb1d /drivers/media/rc/imon.c | |
parent | 343800e7d20944aead238c2c6e3f7789f8b6587c (diff) | |
parent | cf25220677b3f10468a74278130fe224f73632a6 (diff) |
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (247 commits)
[media] gspca - sunplus: Fix some warnings and simplify code
[media] gspca: Fix some warnings tied to 'no debug'
[media] gspca: Unset debug by default
[media] gspca - cpia1: Remove a bad conditional compilation instruction
[media] gspca - main: Remove USB traces
[media] gspca - main: Version change to 2.13
[media] gspca - stk014 / t613: Accept the index 0 in querymenu
[media] gspca - kinect: Remove __devinitdata
[media] gspca - cpia1: Fix some warnings
[media] video/Kconfig: Fix mis-classified devices
[media] support for medion dvb stick 1660:1921
[media] tm6000: fix uninitialized field, change prink to dprintk
[media] cx231xx: Add support for Iconbit U100
[media] saa7134 add new TV cards
[media] Use a more consistent value for RC repeat period
[media] cx18: Move spinlock and vb_type initialisation into stream_init
[media] tm6000: remove tm6010 sif audio start and stop
[media] tm6000: remove unused exports
[media] tm6000: add pts logging
[media] tm6000: change from ioctl to unlocked_ioctl
...
Diffstat (limited to 'drivers/media/rc/imon.c')
-rw-r--r-- | drivers/media/rc/imon.c | 36 |
1 files changed, 8 insertions, 28 deletions
diff --git a/drivers/media/rc/imon.c b/drivers/media/rc/imon.c index 8fc0f081b470..3f3c70716268 100644 --- a/drivers/media/rc/imon.c +++ b/drivers/media/rc/imon.c | |||
@@ -443,16 +443,6 @@ static int display_close(struct inode *inode, struct file *file) | |||
443 | } else { | 443 | } else { |
444 | ictx->display_isopen = false; | 444 | ictx->display_isopen = false; |
445 | dev_dbg(ictx->dev, "display port closed\n"); | 445 | dev_dbg(ictx->dev, "display port closed\n"); |
446 | if (!ictx->dev_present_intf0) { | ||
447 | /* | ||
448 | * Device disconnected before close and IR port is not | ||
449 | * open. If IR port is open, context will be deleted by | ||
450 | * ir_close. | ||
451 | */ | ||
452 | mutex_unlock(&ictx->lock); | ||
453 | free_imon_context(ictx); | ||
454 | return retval; | ||
455 | } | ||
456 | } | 446 | } |
457 | 447 | ||
458 | mutex_unlock(&ictx->lock); | 448 | mutex_unlock(&ictx->lock); |
@@ -1492,7 +1482,6 @@ static void imon_incoming_packet(struct imon_context *ictx, | |||
1492 | struct device *dev = ictx->dev; | 1482 | struct device *dev = ictx->dev; |
1493 | unsigned long flags; | 1483 | unsigned long flags; |
1494 | u32 kc; | 1484 | u32 kc; |
1495 | bool norelease = false; | ||
1496 | int i; | 1485 | int i; |
1497 | u64 scancode; | 1486 | u64 scancode; |
1498 | int press_type = 0; | 1487 | int press_type = 0; |
@@ -1560,7 +1549,6 @@ static void imon_incoming_packet(struct imon_context *ictx, | |||
1560 | !(buf[1] & 0x1 || buf[1] >> 2 & 0x1))) { | 1549 | !(buf[1] & 0x1 || buf[1] >> 2 & 0x1))) { |
1561 | len = 8; | 1550 | len = 8; |
1562 | imon_pad_to_keys(ictx, buf); | 1551 | imon_pad_to_keys(ictx, buf); |
1563 | norelease = true; | ||
1564 | } | 1552 | } |
1565 | 1553 | ||
1566 | if (debug) { | 1554 | if (debug) { |
@@ -1982,7 +1970,7 @@ static struct input_dev *imon_init_touch(struct imon_context *ictx) | |||
1982 | return touch; | 1970 | return touch; |
1983 | 1971 | ||
1984 | touch_register_failed: | 1972 | touch_register_failed: |
1985 | input_free_device(ictx->touch); | 1973 | input_free_device(touch); |
1986 | 1974 | ||
1987 | touch_alloc_failed: | 1975 | touch_alloc_failed: |
1988 | return NULL; | 1976 | return NULL; |
@@ -2274,14 +2262,12 @@ static int __devinit imon_probe(struct usb_interface *interface, | |||
2274 | struct usb_host_interface *iface_desc = NULL; | 2262 | struct usb_host_interface *iface_desc = NULL; |
2275 | struct usb_interface *first_if; | 2263 | struct usb_interface *first_if; |
2276 | struct device *dev = &interface->dev; | 2264 | struct device *dev = &interface->dev; |
2277 | int ifnum, code_length, sysfs_err; | 2265 | int ifnum, sysfs_err; |
2278 | int ret = 0; | 2266 | int ret = 0; |
2279 | struct imon_context *ictx = NULL; | 2267 | struct imon_context *ictx = NULL; |
2280 | struct imon_context *first_if_ctx = NULL; | 2268 | struct imon_context *first_if_ctx = NULL; |
2281 | u16 vendor, product; | 2269 | u16 vendor, product; |
2282 | 2270 | ||
2283 | code_length = BUF_CHUNK_SIZE * 8; | ||
2284 | |||
2285 | usbdev = usb_get_dev(interface_to_usbdev(interface)); | 2271 | usbdev = usb_get_dev(interface_to_usbdev(interface)); |
2286 | iface_desc = interface->cur_altsetting; | 2272 | iface_desc = interface->cur_altsetting; |
2287 | ifnum = iface_desc->desc.bInterfaceNumber; | 2273 | ifnum = iface_desc->desc.bInterfaceNumber; |
@@ -2366,8 +2352,6 @@ static void __devexit imon_disconnect(struct usb_interface *interface) | |||
2366 | dev = ictx->dev; | 2352 | dev = ictx->dev; |
2367 | ifnum = interface->cur_altsetting->desc.bInterfaceNumber; | 2353 | ifnum = interface->cur_altsetting->desc.bInterfaceNumber; |
2368 | 2354 | ||
2369 | mutex_lock(&ictx->lock); | ||
2370 | |||
2371 | /* | 2355 | /* |
2372 | * sysfs_remove_group is safe to call even if sysfs_create_group | 2356 | * sysfs_remove_group is safe to call even if sysfs_create_group |
2373 | * hasn't been called | 2357 | * hasn't been called |
@@ -2391,24 +2375,20 @@ static void __devexit imon_disconnect(struct usb_interface *interface) | |||
2391 | if (ictx->display_supported) { | 2375 | if (ictx->display_supported) { |
2392 | if (ictx->display_type == IMON_DISPLAY_TYPE_LCD) | 2376 | if (ictx->display_type == IMON_DISPLAY_TYPE_LCD) |
2393 | usb_deregister_dev(interface, &imon_lcd_class); | 2377 | usb_deregister_dev(interface, &imon_lcd_class); |
2394 | else | 2378 | else if (ictx->display_type == IMON_DISPLAY_TYPE_VFD) |
2395 | usb_deregister_dev(interface, &imon_vfd_class); | 2379 | usb_deregister_dev(interface, &imon_vfd_class); |
2396 | } | 2380 | } |
2397 | } else { | 2381 | } else { |
2398 | ictx->dev_present_intf1 = false; | 2382 | ictx->dev_present_intf1 = false; |
2399 | usb_kill_urb(ictx->rx_urb_intf1); | 2383 | usb_kill_urb(ictx->rx_urb_intf1); |
2400 | if (ictx->display_type == IMON_DISPLAY_TYPE_VGA) | 2384 | if (ictx->display_type == IMON_DISPLAY_TYPE_VGA) { |
2401 | input_unregister_device(ictx->touch); | 2385 | input_unregister_device(ictx->touch); |
2386 | del_timer_sync(&ictx->ttimer); | ||
2387 | } | ||
2402 | } | 2388 | } |
2403 | 2389 | ||
2404 | if (!ictx->dev_present_intf0 && !ictx->dev_present_intf1) { | 2390 | if (!ictx->dev_present_intf0 && !ictx->dev_present_intf1) |
2405 | if (ictx->display_type == IMON_DISPLAY_TYPE_VGA) | 2391 | free_imon_context(ictx); |
2406 | del_timer_sync(&ictx->ttimer); | ||
2407 | mutex_unlock(&ictx->lock); | ||
2408 | if (!ictx->display_isopen) | ||
2409 | free_imon_context(ictx); | ||
2410 | } else | ||
2411 | mutex_unlock(&ictx->lock); | ||
2412 | 2392 | ||
2413 | mutex_unlock(&driver_lock); | 2393 | mutex_unlock(&driver_lock); |
2414 | 2394 | ||