This merges the staging-next tree to Linus's tree and resolves some conflicts that were present due to changes in other trees that were affected by files here.
Showing the changes to drivers/staging/lirc/lirc_imon.c (1 of 1365 files). Show all
Unified · Split
| @@ -278,7 +278,7 @@ static int display_close(struct inode *inode, struct file *file) · 277 unmodified lines | ||
| 278 | 278 | struct imon_context *context = NULL; |
| 279 | 279 | int retval = 0; |
| 280 | 280 | |
| 281 | − context = (struct imon_context *)file->private_data; | |
| 281 | + context = file->private_data; | |
| 282 | 282 | |
| 283 | 283 | if (!context) { |
| 284 | 284 | err("%s: no context for device", __func__); |
| @@ -321,7 +321,6 @@ static int send_packet(struct imon_context *context) · 36 unmodified lines | ||
| 321 | 321 | unsigned int pipe; |
| 322 | 322 | int interval = 0; |
| 323 | 323 | int retval = 0; |
| 324 | − struct usb_ctrlrequest *control_req = NULL; | |
| 325 | 324 | |
| 326 | 325 | /* Check if we need to use control or interrupt urb */ |
| 327 | 326 | pipe = usb_sndintpipe(context->usbdev, |
| @@ -356,8 +355,6 @@ static int send_packet(struct imon_context *context) · 28 unmodified lines | ||
| 356 | 355 | err("%s: packet tx failed (%d)", __func__, retval); |
| 357 | 356 | } |
| 358 | 357 | |
| 359 | − kfree(control_req); | |
| 360 | − | |
| 361 | 358 | return retval; |
| 362 | 359 | } |
| 363 | 360 | |
| @@ -384,7 +381,7 @@ static ssize_t vfd_write(struct file *file, const char *buf, · 20 unmodified lines | ||
| 384 | 381 | 0x01, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF }; |
| 385 | 382 | int *data_buf; |
| 386 | 383 | |
| 387 | − context = (struct imon_context *)file->private_data; | |
| 384 | + context = file->private_data; | |
| 388 | 385 | if (!context) { |
| 389 | 386 | err("%s: no context for device", __func__); |
| 390 | 387 | return -ENODEV; |
| @@ -600,7 +597,7 @@ static void imon_incoming_packet(struct imon_context *context, · 209 unmodified lines | ||
| 600 | 597 | struct device *dev = context->driver->dev; |
| 601 | 598 | int octet, bit; |
| 602 | 599 | unsigned char mask; |
| 603 | − int i, chunk_num; | |
| 600 | + int i; | |
| 604 | 601 | |
| 605 | 602 | /* |
| 606 | 603 | * just bail out if no listening IR client |
| @@ -659,7 +656,7 @@ static void imon_incoming_packet(struct imon_context *context, · 52 unmodified lines | ||
| 659 | 656 | } |
| 660 | 657 | } |
| 661 | 658 | |
| 662 | − if (chunk_num == 10) { | |
| 659 | + if (buf[7] == 10) { | |
| 663 | 660 | if (context->rx.count) { |
| 664 | 661 | submit_data(context); |
| 665 | 662 | context->rx.count = 0; |
| @@ -877,7 +874,7 @@ static int imon_probe(struct usb_interface *interface, · 211 unmodified lines | ||
| 877 | 874 | if (lirc_minor < 0) { |
| 878 | 875 | err("%s: lirc_register_driver failed", __func__); |
| 879 | 876 | alloc_status = 7; |
| 880 | − goto alloc_status_switch; | |
| 877 | + goto unlock; | |
| 881 | 878 | } else |
| 882 | 879 | dev_info(dev, "Registered iMON driver " |
| 883 | 880 | "(lirc minor: %d)\n", lirc_minor); |
| @@ -933,8 +930,9 @@ static int imon_probe(struct usb_interface *interface, · 49 unmodified lines | ||
| 933 | 930 | "usb<%d:%d> initialized\n", vendor, product, ifnum, |
| 934 | 931 | usbdev->bus->busnum, usbdev->devnum); |
| 935 | 932 | |
| 936 | −alloc_status_switch: | |
| 933 | +unlock: | |
| 937 | 934 | mutex_unlock(&context->ctx_lock); |
| 935 | +alloc_status_switch: | |
| 938 | 936 | |
| 939 | 937 | switch (alloc_status) { |
| 940 | 938 | case 7: |