diff options
Diffstat (limited to 'drivers/media/IR/mceusb.c')
-rw-r--r-- | drivers/media/IR/mceusb.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/drivers/media/IR/mceusb.c b/drivers/media/IR/mceusb.c index 78bf7f77a1a0..ac6bb2c01a48 100644 --- a/drivers/media/IR/mceusb.c +++ b/drivers/media/IR/mceusb.c | |||
@@ -228,7 +228,6 @@ static struct usb_device_id std_tx_mask_list[] = { | |||
228 | /* data structure for each usb transceiver */ | 228 | /* data structure for each usb transceiver */ |
229 | struct mceusb_dev { | 229 | struct mceusb_dev { |
230 | /* ir-core bits */ | 230 | /* ir-core bits */ |
231 | struct ir_input_dev *irdev; | ||
232 | struct ir_dev_props *props; | 231 | struct ir_dev_props *props; |
233 | struct ir_raw_event rawir; | 232 | struct ir_raw_event rawir; |
234 | 233 | ||
@@ -428,7 +427,7 @@ static void mceusb_dev_printdata(struct mceusb_dev *ir, char *buf, | |||
428 | } | 427 | } |
429 | } | 428 | } |
430 | 429 | ||
431 | static void usb_async_callback(struct urb *urb, struct pt_regs *regs) | 430 | static void mce_async_callback(struct urb *urb, struct pt_regs *regs) |
432 | { | 431 | { |
433 | struct mceusb_dev *ir; | 432 | struct mceusb_dev *ir; |
434 | int len; | 433 | int len; |
@@ -477,7 +476,7 @@ static void mce_request_packet(struct mceusb_dev *ir, | |||
477 | /* outbound data */ | 476 | /* outbound data */ |
478 | usb_fill_int_urb(async_urb, ir->usbdev, | 477 | usb_fill_int_urb(async_urb, ir->usbdev, |
479 | usb_sndintpipe(ir->usbdev, ep->bEndpointAddress), | 478 | usb_sndintpipe(ir->usbdev, ep->bEndpointAddress), |
480 | async_buf, size, (usb_complete_t) usb_async_callback, | 479 | async_buf, size, (usb_complete_t)mce_async_callback, |
481 | ir, ep->bInterval); | 480 | ir, ep->bInterval); |
482 | memcpy(async_buf, data, size); | 481 | memcpy(async_buf, data, size); |
483 | 482 | ||
@@ -739,7 +738,7 @@ static void mceusb_dev_recv(struct urb *urb, struct pt_regs *regs) | |||
739 | 738 | ||
740 | if (ir->send_flags == RECV_FLAG_IN_PROGRESS) { | 739 | if (ir->send_flags == RECV_FLAG_IN_PROGRESS) { |
741 | ir->send_flags = SEND_FLAG_COMPLETE; | 740 | ir->send_flags = SEND_FLAG_COMPLETE; |
742 | dev_dbg(&ir->irdev->dev, "setup answer received %d bytes\n", | 741 | dev_dbg(ir->dev, "setup answer received %d bytes\n", |
743 | buf_len); | 742 | buf_len); |
744 | } | 743 | } |
745 | 744 | ||
@@ -861,7 +860,6 @@ static struct input_dev *mceusb_init_input_dev(struct mceusb_dev *ir) | |||
861 | { | 860 | { |
862 | struct input_dev *idev; | 861 | struct input_dev *idev; |
863 | struct ir_dev_props *props; | 862 | struct ir_dev_props *props; |
864 | struct ir_input_dev *irdev; | ||
865 | struct device *dev = ir->dev; | 863 | struct device *dev = ir->dev; |
866 | int ret = -ENODEV; | 864 | int ret = -ENODEV; |
867 | 865 | ||
@@ -878,12 +876,6 @@ static struct input_dev *mceusb_init_input_dev(struct mceusb_dev *ir) | |||
878 | goto props_alloc_failed; | 876 | goto props_alloc_failed; |
879 | } | 877 | } |
880 | 878 | ||
881 | irdev = kzalloc(sizeof(struct ir_input_dev), GFP_KERNEL); | ||
882 | if (!irdev) { | ||
883 | dev_err(dev, "remote ir input dev allocation failed\n"); | ||
884 | goto ir_dev_alloc_failed; | ||
885 | } | ||
886 | |||
887 | snprintf(ir->name, sizeof(ir->name), "Media Center Ed. eHome " | 879 | snprintf(ir->name, sizeof(ir->name), "Media Center Ed. eHome " |
888 | "Infrared Remote Transceiver (%04x:%04x)", | 880 | "Infrared Remote Transceiver (%04x:%04x)", |
889 | le16_to_cpu(ir->usbdev->descriptor.idVendor), | 881 | le16_to_cpu(ir->usbdev->descriptor.idVendor), |
@@ -902,9 +894,6 @@ static struct input_dev *mceusb_init_input_dev(struct mceusb_dev *ir) | |||
902 | props->tx_ir = mceusb_tx_ir; | 894 | props->tx_ir = mceusb_tx_ir; |
903 | 895 | ||
904 | ir->props = props; | 896 | ir->props = props; |
905 | ir->irdev = irdev; | ||
906 | |||
907 | input_set_drvdata(idev, irdev); | ||
908 | 897 | ||
909 | ret = ir_input_register(idev, RC_MAP_RC6_MCE, props, DRIVER_NAME); | 898 | ret = ir_input_register(idev, RC_MAP_RC6_MCE, props, DRIVER_NAME); |
910 | if (ret < 0) { | 899 | if (ret < 0) { |
@@ -915,8 +904,6 @@ static struct input_dev *mceusb_init_input_dev(struct mceusb_dev *ir) | |||
915 | return idev; | 904 | return idev; |
916 | 905 | ||
917 | irdev_failed: | 906 | irdev_failed: |
918 | kfree(irdev); | ||
919 | ir_dev_alloc_failed: | ||
920 | kfree(props); | 907 | kfree(props); |
921 | props_alloc_failed: | 908 | props_alloc_failed: |
922 | input_free_device(idev); | 909 | input_free_device(idev); |
@@ -932,7 +919,6 @@ static int __devinit mceusb_dev_probe(struct usb_interface *intf, | |||
932 | struct usb_endpoint_descriptor *ep = NULL; | 919 | struct usb_endpoint_descriptor *ep = NULL; |
933 | struct usb_endpoint_descriptor *ep_in = NULL; | 920 | struct usb_endpoint_descriptor *ep_in = NULL; |
934 | struct usb_endpoint_descriptor *ep_out = NULL; | 921 | struct usb_endpoint_descriptor *ep_out = NULL; |
935 | struct usb_host_config *config; | ||
936 | struct mceusb_dev *ir = NULL; | 922 | struct mceusb_dev *ir = NULL; |
937 | int pipe, maxp, i; | 923 | int pipe, maxp, i; |
938 | char buf[63], name[128] = ""; | 924 | char buf[63], name[128] = ""; |
@@ -942,7 +928,6 @@ static int __devinit mceusb_dev_probe(struct usb_interface *intf, | |||
942 | 928 | ||
943 | dev_dbg(&intf->dev, ": %s called\n", __func__); | 929 | dev_dbg(&intf->dev, ": %s called\n", __func__); |
944 | 930 | ||
945 | config = dev->actconfig; | ||
946 | idesc = intf->cur_altsetting; | 931 | idesc = intf->cur_altsetting; |
947 | 932 | ||
948 | is_gen3 = usb_match_id(intf, gen3_list) ? 1 : 0; | 933 | is_gen3 = usb_match_id(intf, gen3_list) ? 1 : 0; |