diff options
| -rw-r--r-- | drivers/media/IR/imon.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/drivers/media/IR/imon.c b/drivers/media/IR/imon.c index 5e2045670004..2bae9ba2e40c 100644 --- a/drivers/media/IR/imon.c +++ b/drivers/media/IR/imon.c | |||
| @@ -385,7 +385,7 @@ static int display_open(struct inode *inode, struct file *file) | |||
| 385 | err("%s: display port is already open", __func__); | 385 | err("%s: display port is already open", __func__); |
| 386 | retval = -EBUSY; | 386 | retval = -EBUSY; |
| 387 | } else { | 387 | } else { |
| 388 | ictx->display_isopen = 1; | 388 | ictx->display_isopen = true; |
| 389 | file->private_data = ictx; | 389 | file->private_data = ictx; |
| 390 | dev_dbg(ictx->dev, "display port opened\n"); | 390 | dev_dbg(ictx->dev, "display port opened\n"); |
| 391 | } | 391 | } |
| @@ -422,7 +422,7 @@ static int display_close(struct inode *inode, struct file *file) | |||
| 422 | err("%s: display is not open", __func__); | 422 | err("%s: display is not open", __func__); |
| 423 | retval = -EIO; | 423 | retval = -EIO; |
| 424 | } else { | 424 | } else { |
| 425 | ictx->display_isopen = 0; | 425 | ictx->display_isopen = false; |
| 426 | dev_dbg(ictx->dev, "display port closed\n"); | 426 | dev_dbg(ictx->dev, "display port closed\n"); |
| 427 | if (!ictx->dev_present_intf0) { | 427 | if (!ictx->dev_present_intf0) { |
| 428 | /* | 428 | /* |
| @@ -491,12 +491,12 @@ static int send_packet(struct imon_context *ictx) | |||
| 491 | } | 491 | } |
| 492 | 492 | ||
| 493 | init_completion(&ictx->tx.finished); | 493 | init_completion(&ictx->tx.finished); |
| 494 | ictx->tx.busy = 1; | 494 | ictx->tx.busy = true; |
| 495 | smp_rmb(); /* ensure later readers know we're busy */ | 495 | smp_rmb(); /* ensure later readers know we're busy */ |
| 496 | 496 | ||
| 497 | retval = usb_submit_urb(ictx->tx_urb, GFP_KERNEL); | 497 | retval = usb_submit_urb(ictx->tx_urb, GFP_KERNEL); |
| 498 | if (retval) { | 498 | if (retval) { |
| 499 | ictx->tx.busy = 0; | 499 | ictx->tx.busy = false; |
| 500 | smp_rmb(); /* ensure later readers know we're not busy */ | 500 | smp_rmb(); /* ensure later readers know we're not busy */ |
| 501 | err("%s: error submitting urb(%d)", __func__, retval); | 501 | err("%s: error submitting urb(%d)", __func__, retval); |
| 502 | } else { | 502 | } else { |
| @@ -682,7 +682,7 @@ static ssize_t store_associate_remote(struct device *d, | |||
| 682 | return -ENODEV; | 682 | return -ENODEV; |
| 683 | 683 | ||
| 684 | mutex_lock(&ictx->lock); | 684 | mutex_lock(&ictx->lock); |
| 685 | ictx->rf_isassociating = 1; | 685 | ictx->rf_isassociating = true; |
| 686 | send_associate_24g(ictx); | 686 | send_associate_24g(ictx); |
| 687 | mutex_unlock(&ictx->lock); | 687 | mutex_unlock(&ictx->lock); |
| 688 | 688 | ||
| @@ -950,7 +950,7 @@ static void usb_tx_callback(struct urb *urb) | |||
| 950 | ictx->tx.status = urb->status; | 950 | ictx->tx.status = urb->status; |
| 951 | 951 | ||
| 952 | /* notify waiters that write has finished */ | 952 | /* notify waiters that write has finished */ |
| 953 | ictx->tx.busy = 0; | 953 | ictx->tx.busy = false; |
| 954 | smp_rmb(); /* ensure later readers know we're not busy */ | 954 | smp_rmb(); /* ensure later readers know we're not busy */ |
| 955 | complete(&ictx->tx.finished); | 955 | complete(&ictx->tx.finished); |
| 956 | } | 956 | } |
| @@ -1215,7 +1215,7 @@ static bool imon_mouse_event(struct imon_context *ictx, | |||
| 1215 | { | 1215 | { |
| 1216 | char rel_x = 0x00, rel_y = 0x00; | 1216 | char rel_x = 0x00, rel_y = 0x00; |
| 1217 | u8 right_shift = 1; | 1217 | u8 right_shift = 1; |
| 1218 | bool mouse_input = 1; | 1218 | bool mouse_input = true; |
| 1219 | int dir = 0; | 1219 | int dir = 0; |
| 1220 | 1220 | ||
| 1221 | /* newer iMON device PAD or mouse button */ | 1221 | /* newer iMON device PAD or mouse button */ |
| @@ -1246,7 +1246,7 @@ static bool imon_mouse_event(struct imon_context *ictx, | |||
| 1246 | } else if (ictx->kc == KEY_CHANNELDOWN && (buf[2] & 0x40) != 0x40) { | 1246 | } else if (ictx->kc == KEY_CHANNELDOWN && (buf[2] & 0x40) != 0x40) { |
| 1247 | dir = -1; | 1247 | dir = -1; |
| 1248 | } else | 1248 | } else |
| 1249 | mouse_input = 0; | 1249 | mouse_input = false; |
| 1250 | 1250 | ||
| 1251 | if (mouse_input) { | 1251 | if (mouse_input) { |
| 1252 | dev_dbg(ictx->dev, "sending mouse data via input subsystem\n"); | 1252 | dev_dbg(ictx->dev, "sending mouse data via input subsystem\n"); |
| @@ -1450,7 +1450,7 @@ static void imon_incoming_packet(struct imon_context *ictx, | |||
| 1450 | unsigned char *buf = urb->transfer_buffer; | 1450 | unsigned char *buf = urb->transfer_buffer; |
| 1451 | struct device *dev = ictx->dev; | 1451 | struct device *dev = ictx->dev; |
| 1452 | u32 kc; | 1452 | u32 kc; |
| 1453 | bool norelease = 0; | 1453 | bool norelease = false; |
| 1454 | int i; | 1454 | int i; |
| 1455 | u64 temp_key; | 1455 | u64 temp_key; |
| 1456 | u64 panel_key = 0; | 1456 | u64 panel_key = 0; |
| @@ -1517,7 +1517,7 @@ static void imon_incoming_packet(struct imon_context *ictx, | |||
| 1517 | !(buf[1] & 0x1 || buf[1] >> 2 & 0x1))) { | 1517 | !(buf[1] & 0x1 || buf[1] >> 2 & 0x1))) { |
| 1518 | len = 8; | 1518 | len = 8; |
| 1519 | imon_pad_to_keys(ictx, buf); | 1519 | imon_pad_to_keys(ictx, buf); |
| 1520 | norelease = 1; | 1520 | norelease = true; |
| 1521 | } | 1521 | } |
| 1522 | 1522 | ||
| 1523 | if (debug) { | 1523 | if (debug) { |
| @@ -1580,7 +1580,7 @@ not_input_data: | |||
| 1580 | (buf[6] == 0x5E && buf[7] == 0xDF))) { /* DT */ | 1580 | (buf[6] == 0x5E && buf[7] == 0xDF))) { /* DT */ |
| 1581 | dev_warn(dev, "%s: remote associated refid=%02X\n", | 1581 | dev_warn(dev, "%s: remote associated refid=%02X\n", |
| 1582 | __func__, buf[1]); | 1582 | __func__, buf[1]); |
| 1583 | ictx->rf_isassociating = 0; | 1583 | ictx->rf_isassociating = false; |
| 1584 | } | 1584 | } |
| 1585 | } | 1585 | } |
| 1586 | 1586 | ||
| @@ -1790,9 +1790,9 @@ static bool imon_find_endpoints(struct imon_context *ictx, | |||
| 1790 | int ifnum = iface_desc->desc.bInterfaceNumber; | 1790 | int ifnum = iface_desc->desc.bInterfaceNumber; |
| 1791 | int num_endpts = iface_desc->desc.bNumEndpoints; | 1791 | int num_endpts = iface_desc->desc.bNumEndpoints; |
| 1792 | int i, ep_dir, ep_type; | 1792 | int i, ep_dir, ep_type; |
| 1793 | bool ir_ep_found = 0; | 1793 | bool ir_ep_found = false; |
| 1794 | bool display_ep_found = 0; | 1794 | bool display_ep_found = false; |
| 1795 | bool tx_control = 0; | 1795 | bool tx_control = false; |
| 1796 | 1796 | ||
| 1797 | /* | 1797 | /* |
| 1798 | * Scan the endpoint list and set: | 1798 | * Scan the endpoint list and set: |
| @@ -1808,13 +1808,13 @@ static bool imon_find_endpoints(struct imon_context *ictx, | |||
| 1808 | ep_type == USB_ENDPOINT_XFER_INT) { | 1808 | ep_type == USB_ENDPOINT_XFER_INT) { |
| 1809 | 1809 | ||
| 1810 | rx_endpoint = ep; | 1810 | rx_endpoint = ep; |
| 1811 | ir_ep_found = 1; | 1811 | ir_ep_found = true; |
| 1812 | dev_dbg(ictx->dev, "%s: found IR endpoint\n", __func__); | 1812 | dev_dbg(ictx->dev, "%s: found IR endpoint\n", __func__); |
| 1813 | 1813 | ||
| 1814 | } else if (!display_ep_found && ep_dir == USB_DIR_OUT && | 1814 | } else if (!display_ep_found && ep_dir == USB_DIR_OUT && |
| 1815 | ep_type == USB_ENDPOINT_XFER_INT) { | 1815 | ep_type == USB_ENDPOINT_XFER_INT) { |
| 1816 | tx_endpoint = ep; | 1816 | tx_endpoint = ep; |
| 1817 | display_ep_found = 1; | 1817 | display_ep_found = true; |
| 1818 | dev_dbg(ictx->dev, "%s: found display endpoint\n", __func__); | 1818 | dev_dbg(ictx->dev, "%s: found display endpoint\n", __func__); |
| 1819 | } | 1819 | } |
| 1820 | } | 1820 | } |
| @@ -1835,8 +1835,8 @@ static bool imon_find_endpoints(struct imon_context *ictx, | |||
| 1835 | * newer iMON devices that use control urb instead of interrupt | 1835 | * newer iMON devices that use control urb instead of interrupt |
| 1836 | */ | 1836 | */ |
| 1837 | if (!display_ep_found) { | 1837 | if (!display_ep_found) { |
| 1838 | tx_control = 1; | 1838 | tx_control = true; |
| 1839 | display_ep_found = 1; | 1839 | display_ep_found = true; |
| 1840 | dev_dbg(ictx->dev, "%s: device uses control endpoint, not " | 1840 | dev_dbg(ictx->dev, "%s: device uses control endpoint, not " |
| 1841 | "interface OUT endpoint\n", __func__); | 1841 | "interface OUT endpoint\n", __func__); |
| 1842 | } | 1842 | } |
| @@ -1847,7 +1847,7 @@ static bool imon_find_endpoints(struct imon_context *ictx, | |||
| 1847 | * and without... :\ | 1847 | * and without... :\ |
| 1848 | */ | 1848 | */ |
| 1849 | if (ictx->display_type == IMON_DISPLAY_TYPE_NONE) { | 1849 | if (ictx->display_type == IMON_DISPLAY_TYPE_NONE) { |
| 1850 | display_ep_found = 0; | 1850 | display_ep_found = false; |
| 1851 | dev_dbg(ictx->dev, "%s: device has no display\n", __func__); | 1851 | dev_dbg(ictx->dev, "%s: device has no display\n", __func__); |
| 1852 | } | 1852 | } |
| 1853 | 1853 | ||
| @@ -1856,7 +1856,7 @@ static bool imon_find_endpoints(struct imon_context *ictx, | |||
| 1856 | * that refers to e.g. /dev/lcd0 (a character device LCD or VFD). | 1856 | * that refers to e.g. /dev/lcd0 (a character device LCD or VFD). |
| 1857 | */ | 1857 | */ |
| 1858 | if (ictx->display_type == IMON_DISPLAY_TYPE_VGA) { | 1858 | if (ictx->display_type == IMON_DISPLAY_TYPE_VGA) { |
| 1859 | display_ep_found = 0; | 1859 | display_ep_found = false; |
| 1860 | dev_dbg(ictx->dev, "%s: iMON Touch device found\n", __func__); | 1860 | dev_dbg(ictx->dev, "%s: iMON Touch device found\n", __func__); |
| 1861 | } | 1861 | } |
| 1862 | 1862 | ||
| @@ -1905,7 +1905,7 @@ static struct imon_context *imon_init_intf0(struct usb_interface *intf) | |||
| 1905 | 1905 | ||
| 1906 | ictx->dev = dev; | 1906 | ictx->dev = dev; |
| 1907 | ictx->usbdev_intf0 = usb_get_dev(interface_to_usbdev(intf)); | 1907 | ictx->usbdev_intf0 = usb_get_dev(interface_to_usbdev(intf)); |
| 1908 | ictx->dev_present_intf0 = 1; | 1908 | ictx->dev_present_intf0 = true; |
| 1909 | ictx->rx_urb_intf0 = rx_urb; | 1909 | ictx->rx_urb_intf0 = rx_urb; |
| 1910 | ictx->tx_urb = tx_urb; | 1910 | ictx->tx_urb = tx_urb; |
| 1911 | 1911 | ||
| @@ -1979,7 +1979,7 @@ static struct imon_context *imon_init_intf1(struct usb_interface *intf, | |||
| 1979 | } | 1979 | } |
| 1980 | 1980 | ||
| 1981 | ictx->usbdev_intf1 = usb_get_dev(interface_to_usbdev(intf)); | 1981 | ictx->usbdev_intf1 = usb_get_dev(interface_to_usbdev(intf)); |
| 1982 | ictx->dev_present_intf1 = 1; | 1982 | ictx->dev_present_intf1 = true; |
| 1983 | ictx->rx_urb_intf1 = rx_urb; | 1983 | ictx->rx_urb_intf1 = rx_urb; |
| 1984 | 1984 | ||
| 1985 | ret = -ENODEV; | 1985 | ret = -ENODEV; |
| @@ -2297,7 +2297,7 @@ static void __devexit imon_disconnect(struct usb_interface *interface) | |||
| 2297 | } | 2297 | } |
| 2298 | 2298 | ||
| 2299 | if (ifnum == 0) { | 2299 | if (ifnum == 0) { |
| 2300 | ictx->dev_present_intf0 = 0; | 2300 | ictx->dev_present_intf0 = false; |
| 2301 | usb_kill_urb(ictx->rx_urb_intf0); | 2301 | usb_kill_urb(ictx->rx_urb_intf0); |
| 2302 | input_unregister_device(ictx->idev); | 2302 | input_unregister_device(ictx->idev); |
| 2303 | if (ictx->display_supported) { | 2303 | if (ictx->display_supported) { |
| @@ -2307,7 +2307,7 @@ static void __devexit imon_disconnect(struct usb_interface *interface) | |||
| 2307 | usb_deregister_dev(interface, &imon_vfd_class); | 2307 | usb_deregister_dev(interface, &imon_vfd_class); |
| 2308 | } | 2308 | } |
| 2309 | } else { | 2309 | } else { |
| 2310 | ictx->dev_present_intf1 = 0; | 2310 | ictx->dev_present_intf1 = false; |
| 2311 | usb_kill_urb(ictx->rx_urb_intf1); | 2311 | usb_kill_urb(ictx->rx_urb_intf1); |
| 2312 | if (ictx->display_type == IMON_DISPLAY_TYPE_VGA) | 2312 | if (ictx->display_type == IMON_DISPLAY_TYPE_VGA) |
| 2313 | input_unregister_device(ictx->touch); | 2313 | input_unregister_device(ictx->touch); |
