--- initial
+++ final
@@ -1,118 +1,117 @@
 int cx23885_input_init(struct cx23885_dev *dev) {
   struct cx23885_kernel_ir *kernel_ir;
   struct rc_dev *rc;
   char *rc_map;
   enum rc_driver_type driver_type;
   u64 allowed_protos;
   int ret;
   /*
    * If the IR device (hardware registers, chip, GPIO lines, etc.) isn't
    * encapsulated in a v4l2_subdev, then I'm not going to deal with it.
    */
   if (dev->sd_ir == NULL) return -ENODEV;
   switch (dev->board) {
   case CX23885_BOARD_HAUPPAUGE_HVR1270:
   case CX23885_BOARD_HAUPPAUGE_HVR1850:
   case CX23885_BOARD_HAUPPAUGE_HVR1290:
   case CX23885_BOARD_HAUPPAUGE_HVR1250:
     /* Integrated CX2388[58] IR controller */
     driver_type = RC_DRIVER_IR_RAW;
     allowed_protos = RC_BIT_ALL_IR_DECODER;
     /* The grey Hauppauge RC-5 remote */
     rc_map = RC_MAP_HAUPPAUGE;
     break;
   case CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL:
     /* Integrated CX23885 IR controller */
     driver_type = RC_DRIVER_IR_RAW;
     allowed_protos = RC_BIT_ALL_IR_DECODER;
     /* The grey Terratec remote with orange buttons */
     rc_map = RC_MAP_NEC_TERRATEC_CINERGY_XS;
     break;
   case CX23885_BOARD_TEVII_S470:
     /* Integrated CX23885 IR controller */
     driver_type = RC_DRIVER_IR_RAW;
     allowed_protos = RC_BIT_ALL_IR_DECODER;
     /* A guess at the remote */
     rc_map = RC_MAP_TEVII_NEC;
     break;
   case CX23885_BOARD_MYGICA_X8507:
     /* Integrated CX23885 IR controller */
     driver_type = RC_DRIVER_IR_RAW;
     allowed_protos = RC_BIT_ALL_IR_DECODER;
     /* A guess at the remote */
     rc_map = RC_MAP_TOTAL_MEDIA_IN_HAND_02;
     break;
   case CX23885_BOARD_TBS_6980:
   case CX23885_BOARD_TBS_6981:
     /* Integrated CX23885 IR controller */
     driver_type = RC_DRIVER_IR_RAW;
     allowed_protos = RC_BIT_ALL_IR_DECODER;
     /* A guess at the remote */
     rc_map = RC_MAP_TBS_NEC;
     break;
   case CX23885_BOARD_DVBSKY_T9580:
   case CX23885_BOARD_DVBSKY_T980C:
   case CX23885_BOARD_DVBSKY_S950C:
   case CX23885_BOARD_DVBSKY_S950:
   case CX23885_BOARD_DVBSKY_S952:
   case CX23885_BOARD_DVBSKY_T982:
     /* Integrated CX23885 IR controller */
     driver_type = RC_DRIVER_IR_RAW;
     allowed_protos = RC_BIT_ALL_IR_DECODER;
     rc_map = RC_MAP_DVBSKY;
     break;
   case CX23885_BOARD_TT_CT2_4500_CI:
     /* Integrated CX23885 IR controller */
     driver_type = RC_DRIVER_IR_RAW;
     allowed_protos = RC_BIT_ALL_IR_DECODER;
     rc_map = RC_MAP_TT_1500;
     break;
   default: return -ENODEV;
   }
   /* cx23885 board instance kernel IR state */
   kernel_ir = kzalloc(sizeof(struct cx23885_kernel_ir), GFP_KERNEL);
   if (kernel_ir == NULL) return -ENOMEM;
   kernel_ir->cx = dev;
   kernel_ir->name = kasprintf(GFP_KERNEL, "cx23885 IR (%s)", cx23885_boards[dev->board].name);
   kernel_ir->phys = kasprintf(GFP_KERNEL, "pci-%s/ir0", pci_name(dev->pci));
   /* input device */
-  rc = rc_allocate_device();
+  rc = rc_allocate_device(driver_type);
   if (!rc) {
     ret = -ENOMEM;
     goto err_out_free;
   }
   kernel_ir->rc = rc;
   rc->input_name = kernel_ir->name;
   rc->input_phys = kernel_ir->phys;
   rc->input_id.bustype = BUS_PCI;
   rc->input_id.version = 1;
   if (dev->pci->subsystem_vendor) {
     rc->input_id.vendor = dev->pci->subsystem_vendor;
     rc->input_id.product = dev->pci->subsystem_device;
   } else {
     rc->input_id.vendor = dev->pci->vendor;
     rc->input_id.product = dev->pci->device;
   }
   rc->dev.parent = &dev->pci->dev;
-  rc->driver_type = driver_type;
   rc->allowed_protocols = allowed_protos;
   rc->priv = kernel_ir;
   rc->open = cx23885_input_ir_open;
   rc->close = cx23885_input_ir_close;
   rc->map_name = rc_map;
   rc->driver_name = MODULE_NAME;
   /* Go */
   dev->kernel_ir = kernel_ir;
   ret = rc_register_device(rc);
   if (ret) goto err_out_stop;
   return 0;
 err_out_stop:
   cx23885_input_ir_stop(dev);
   dev->kernel_ir = NULL;
   rc_free_device(rc);
 err_out_free:
   kfree(kernel_ir->phys);
   kfree(kernel_ir->name);
   kfree(kernel_ir);
   return ret;
 }<sep>@@
expression rdev,e;
@@
-       rdev = rc_allocate_device();
+       rdev = rc_allocate_device(e);
	...
-       rdev->driver_type      = e;