--- initial
+++ final
@@ -1,140 +1,139 @@
 static int ttusbir_probe(struct usb_interface *intf, const struct usb_device_id *id) {
   struct ttusbir *tt;
   struct usb_interface_descriptor *idesc;
   struct usb_endpoint_descriptor *desc;
   struct rc_dev *rc;
   int i, j, ret;
   int altsetting = -1;
   tt = kzalloc(sizeof(*tt), GFP_KERNEL);
-  rc = rc_allocate_device();
+  rc = rc_allocate_device(RC_DRIVER_IR_RAW);
   if (!tt || !rc) {
     ret = -ENOMEM;
     goto out;
   }
   /* find the correct alt setting */
   for (i = 0; i < intf->num_altsetting && altsetting == -1; i++) {
     int max_packet, bulk_out_endp = -1, iso_in_endp = -1;
     idesc = &intf->altsetting[i].desc;
     for (j = 0; j < idesc->bNumEndpoints; j++) {
       desc = &intf->altsetting[i].endpoint[j].desc;
       max_packet = le16_to_cpu(desc->wMaxPacketSize);
       if (usb_endpoint_dir_in(desc) && usb_endpoint_xfer_isoc(desc) && max_packet == 0x10)
         iso_in_endp = j;
       else if (usb_endpoint_dir_out(desc) && usb_endpoint_xfer_bulk(desc) && max_packet == 0x20)
         bulk_out_endp = j;
       if (bulk_out_endp != -1 && iso_in_endp != -1) {
         tt->bulk_out_endp = bulk_out_endp;
         tt->iso_in_endp = iso_in_endp;
         altsetting = i;
         break;
       }
     }
   }
   if (altsetting == -1) {
     dev_err(&intf->dev, "cannot find expected altsetting\n");
     ret = -ENODEV;
     goto out;
   }
   tt->dev = &intf->dev;
   tt->udev = interface_to_usbdev(intf);
   tt->rc = rc;
   ret = usb_set_interface(tt->udev, 0, altsetting);
   if (ret) goto out;
   for (i = 0; i < NUM_URBS; i++) {
     struct urb *urb = usb_alloc_urb(8, GFP_KERNEL);
     void *buffer;
     if (!urb) {
       ret = -ENOMEM;
       goto out;
     }
     urb->dev = tt->udev;
     urb->context = tt;
     urb->pipe = usb_rcvisocpipe(tt->udev, tt->iso_in_endp);
     urb->interval = 1;
     buffer = usb_alloc_coherent(tt->udev, 128, GFP_KERNEL, &urb->transfer_dma);
     if (!buffer) {
       usb_free_urb(urb);
       ret = -ENOMEM;
       goto out;
     }
     urb->transfer_flags = URB_NO_TRANSFER_DMA_MAP | URB_ISO_ASAP;
     urb->transfer_buffer = buffer;
     urb->complete = ttusbir_urb_complete;
     urb->number_of_packets = 8;
     urb->transfer_buffer_length = 128;
     for (j = 0; j < 8; j++) {
       urb->iso_frame_desc[j].offset = j * 16;
       urb->iso_frame_desc[j].length = 16;
     }
     tt->urb[i] = urb;
   }
   tt->bulk_urb = usb_alloc_urb(0, GFP_KERNEL);
   if (!tt->bulk_urb) {
     ret = -ENOMEM;
     goto out;
   }
   tt->bulk_buffer[0] = 0xaa;
   tt->bulk_buffer[1] = 0x01;
   tt->bulk_buffer[2] = 0x05;
   tt->bulk_buffer[3] = 0x01;
   usb_fill_bulk_urb(tt->bulk_urb, tt->udev, usb_sndbulkpipe(tt->udev, tt->bulk_out_endp), tt->bulk_buffer, sizeof(tt->bulk_buffer), ttusbir_bulk_complete, tt);
   tt->led.name = "ttusbir:green:power";
   tt->led.default_trigger = "rc-feedback";
   tt->led.brightness_set = ttusbir_brightness_set;
   tt->led.brightness_get = ttusbir_brightness_get;
   tt->is_led_on = tt->led_on = true;
   atomic_set(&tt->led_complete, 0);
   ret = led_classdev_register(&intf->dev, &tt->led);
   if (ret) goto out;
   usb_make_path(tt->udev, tt->phys, sizeof(tt->phys));
   rc->input_name = DRIVER_DESC;
   rc->input_phys = tt->phys;
   usb_to_input_id(tt->udev, &rc->input_id);
   rc->dev.parent = &intf->dev;
-  rc->driver_type = RC_DRIVER_IR_RAW;
   rc->allowed_protocols = RC_BIT_ALL_IR_DECODER;
   rc->priv = tt;
   rc->driver_name = DRIVER_NAME;
   rc->map_name = RC_MAP_TT_1500;
   rc->min_timeout = 1;
   rc->timeout = IR_DEFAULT_TIMEOUT;
   rc->max_timeout = 10 * IR_DEFAULT_TIMEOUT;
   /*
    * The precision is NS_PER_BIT, but since every 8th bit can be
    * overwritten with garbage the accuracy is at best 2 * NS_PER_BIT.
    */
   rc->rx_resolution = NS_PER_BIT;
   ret = rc_register_device(rc);
   if (ret) {
     dev_err(&intf->dev, "failed to register rc device %d\n", ret);
     goto out2;
   }
   usb_set_intfdata(intf, tt);
   for (i = 0; i < NUM_URBS; i++) {
     ret = usb_submit_urb(tt->urb[i], GFP_KERNEL);
     if (ret) {
       dev_err(tt->dev, "failed to submit urb %d\n", ret);
       goto out3;
     }
   }
   return 0;
 out3:
   rc_unregister_device(rc);
   rc = NULL;
 out2:
   led_classdev_unregister(&tt->led);
 out:
   if (tt) {
     for (i = 0; i < NUM_URBS && tt->urb[i]; i++) {
       struct urb *urb = tt->urb[i];
       usb_kill_urb(urb);
       usb_free_coherent(tt->udev, 128, urb->transfer_buffer, urb->transfer_dma);
       usb_free_urb(urb);
     }
     usb_kill_urb(tt->bulk_urb);
     usb_free_urb(tt->bulk_urb);
     kfree(tt);
   }
   rc_free_device(rc);
   return ret;
 }<sep>@@
expression rdev,e;
@@
-       rdev = rc_allocate_device();
+       rdev = rc_allocate_device(e);
	...
-       rdev->driver_type      = e;