Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 250304
b: refs/heads/master
c: 76a2d21
h: refs/heads/master
v: v3
  • Loading branch information
Jarod Wilson authored and Mauro Carvalho Chehab committed May 20, 2011
1 parent 9ef6281 commit 138f3dd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 28 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 46872d27dadb9d7401d8edc20393e443c573526f
refs/heads/master: 76a2d21d96fba4d0e94cf191eb3716ea7c4916e8
34 changes: 7 additions & 27 deletions trunk/drivers/media/rc/imon.c
Original file line number Diff line number Diff line change
Expand Up @@ -443,16 +443,6 @@ static int display_close(struct inode *inode, struct file *file)
} else {
ictx->display_isopen = false;
dev_dbg(ictx->dev, "display port closed\n");
if (!ictx->dev_present_intf0) {
/*
* Device disconnected before close and IR port is not
* open. If IR port is open, context will be deleted by
* ir_close.
*/
mutex_unlock(&ictx->lock);
free_imon_context(ictx);
return retval;
}
}

mutex_unlock(&ictx->lock);
Expand Down Expand Up @@ -1492,7 +1482,6 @@ static void imon_incoming_packet(struct imon_context *ictx,
struct device *dev = ictx->dev;
unsigned long flags;
u32 kc;
bool norelease = false;
int i;
u64 scancode;
int press_type = 0;
Expand Down Expand Up @@ -1560,7 +1549,6 @@ static void imon_incoming_packet(struct imon_context *ictx,
!(buf[1] & 0x1 || buf[1] >> 2 & 0x1))) {
len = 8;
imon_pad_to_keys(ictx, buf);
norelease = true;
}

if (debug) {
Expand Down Expand Up @@ -2274,14 +2262,12 @@ static int __devinit imon_probe(struct usb_interface *interface,
struct usb_host_interface *iface_desc = NULL;
struct usb_interface *first_if;
struct device *dev = &interface->dev;
int ifnum, code_length, sysfs_err;
int ifnum, sysfs_err;
int ret = 0;
struct imon_context *ictx = NULL;
struct imon_context *first_if_ctx = NULL;
u16 vendor, product;

code_length = BUF_CHUNK_SIZE * 8;

usbdev = usb_get_dev(interface_to_usbdev(interface));
iface_desc = interface->cur_altsetting;
ifnum = iface_desc->desc.bInterfaceNumber;
Expand Down Expand Up @@ -2366,8 +2352,6 @@ static void __devexit imon_disconnect(struct usb_interface *interface)
dev = ictx->dev;
ifnum = interface->cur_altsetting->desc.bInterfaceNumber;

mutex_lock(&ictx->lock);

/*
* sysfs_remove_group is safe to call even if sysfs_create_group
* hasn't been called
Expand All @@ -2391,24 +2375,20 @@ static void __devexit imon_disconnect(struct usb_interface *interface)
if (ictx->display_supported) {
if (ictx->display_type == IMON_DISPLAY_TYPE_LCD)
usb_deregister_dev(interface, &imon_lcd_class);
else
else if (ictx->display_type == IMON_DISPLAY_TYPE_VFD)
usb_deregister_dev(interface, &imon_vfd_class);
}
} else {
ictx->dev_present_intf1 = false;
usb_kill_urb(ictx->rx_urb_intf1);
if (ictx->display_type == IMON_DISPLAY_TYPE_VGA)
if (ictx->display_type == IMON_DISPLAY_TYPE_VGA) {
input_unregister_device(ictx->touch);
del_timer_sync(&ictx->ttimer);
}
}

if (!ictx->dev_present_intf0 && !ictx->dev_present_intf1) {
if (ictx->display_type == IMON_DISPLAY_TYPE_VGA)
del_timer_sync(&ictx->ttimer);
mutex_unlock(&ictx->lock);
if (!ictx->display_isopen)
free_imon_context(ictx);
} else
mutex_unlock(&ictx->lock);
if (!ictx->dev_present_intf0 && !ictx->dev_present_intf1)
free_imon_context(ictx);

mutex_unlock(&driver_lock);

Expand Down

0 comments on commit 138f3dd

Please sign in to comment.