--- initial
+++ final
@@ -1,105 +1,104 @@
 static int wbcir_probe(struct pnp_dev *device, const struct pnp_device_id *dev_id) {
   struct device *dev = &device->dev;
   struct wbcir_data *data;
   int err;
   if (!(pnp_port_len(device, 0) == EHFUNC_IOMEM_LEN && pnp_port_len(device, 1) == WAKEUP_IOMEM_LEN && pnp_port_len(device, 2) == SP_IOMEM_LEN)) {
     dev_err(dev, "Invalid resources\n");
     return -ENODEV;
   }
   data = kzalloc(sizeof(*data), GFP_KERNEL);
   if (!data) {
     err = -ENOMEM;
     goto exit;
   }
   pnp_set_drvdata(device, data);
   spin_lock_init(&data->spinlock);
   data->ebase = pnp_port_start(device, 0);
   data->wbase = pnp_port_start(device, 1);
   data->sbase = pnp_port_start(device, 2);
   data->irq = pnp_irq(device, 0);
   if (data->wbase == 0 || data->ebase == 0 || data->sbase == 0 || data->irq == 0) {
     err = -ENODEV;
     dev_err(dev, "Invalid resources\n");
     goto exit_free_data;
   }
   dev_dbg(&device->dev, "Found device (w: 0x%lX, e: 0x%lX, s: 0x%lX, i: %u)\n", data->wbase, data->ebase, data->sbase, data->irq);
   data->led.name = "cir::activity";
   data->led.default_trigger = "rc-feedback";
   data->led.brightness_set = wbcir_led_brightness_set;
   data->led.brightness_get = wbcir_led_brightness_get;
   err = led_classdev_register(&device->dev, &data->led);
   if (err) goto exit_free_data;
-  data->dev = rc_allocate_device();
+  data->dev = rc_allocate_device(RC_DRIVER_IR_RAW);
   if (!data->dev) {
     err = -ENOMEM;
     goto exit_unregister_led;
   }
-  data->dev->driver_type = RC_DRIVER_IR_RAW;
   data->dev->driver_name = DRVNAME;
   data->dev->input_name = WBCIR_NAME;
   data->dev->input_phys = "wbcir/cir0";
   data->dev->input_id.bustype = BUS_HOST;
   data->dev->input_id.vendor = PCI_VENDOR_ID_WINBOND;
   data->dev->input_id.product = WBCIR_ID_FAMILY;
   data->dev->input_id.version = WBCIR_ID_CHIP;
   data->dev->map_name = RC_MAP_RC6_MCE;
   data->dev->s_idle = wbcir_idle_rx;
   data->dev->s_carrier_report = wbcir_set_carrier_report;
   data->dev->s_tx_mask = wbcir_txmask;
   data->dev->s_tx_carrier = wbcir_txcarrier;
   data->dev->tx_ir = wbcir_tx;
   data->dev->priv = data;
   data->dev->dev.parent = &device->dev;
   data->dev->timeout = MS_TO_NS(100);
   data->dev->rx_resolution = US_TO_NS(2);
   data->dev->allowed_protocols = RC_BIT_ALL_IR_DECODER;
   data->dev->allowed_wakeup_protocols = RC_BIT_NEC | RC_BIT_NECX | RC_BIT_NEC32 | RC_BIT_RC5 | RC_BIT_RC6_0 | RC_BIT_RC6_6A_20 | RC_BIT_RC6_6A_24 | RC_BIT_RC6_6A_32 | RC_BIT_RC6_MCE;
   data->dev->wakeup_protocol = RC_TYPE_RC6_MCE;
   data->dev->scancode_wakeup_filter.data = 0x800f040c;
   data->dev->scancode_wakeup_filter.mask = 0xffff7fff;
   data->dev->s_wakeup_filter = wbcir_set_wakeup_filter;
   err = rc_register_device(data->dev);
   if (err) goto exit_free_rc;
   if (!request_region(data->wbase, WAKEUP_IOMEM_LEN, DRVNAME)) {
     dev_err(dev, "Region 0x%lx-0x%lx already in use!\n", data->wbase, data->wbase + WAKEUP_IOMEM_LEN - 1);
     err = -EBUSY;
     goto exit_unregister_device;
   }
   if (!request_region(data->ebase, EHFUNC_IOMEM_LEN, DRVNAME)) {
     dev_err(dev, "Region 0x%lx-0x%lx already in use!\n", data->ebase, data->ebase + EHFUNC_IOMEM_LEN - 1);
     err = -EBUSY;
     goto exit_release_wbase;
   }
   if (!request_region(data->sbase, SP_IOMEM_LEN, DRVNAME)) {
     dev_err(dev, "Region 0x%lx-0x%lx already in use!\n", data->sbase, data->sbase + SP_IOMEM_LEN - 1);
     err = -EBUSY;
     goto exit_release_ebase;
   }
   err = request_irq(data->irq, wbcir_irq_handler, 0, DRVNAME, device);
   if (err) {
     dev_err(dev, "Failed to claim IRQ %u\n", data->irq);
     err = -EBUSY;
     goto exit_release_sbase;
   }
   device_init_wakeup(&device->dev, 1);
   wbcir_init_hw(data);
   return 0;
 exit_release_sbase:
   release_region(data->sbase, SP_IOMEM_LEN);
 exit_release_ebase:
   release_region(data->ebase, EHFUNC_IOMEM_LEN);
 exit_release_wbase:
   release_region(data->wbase, WAKEUP_IOMEM_LEN);
 exit_unregister_device:
   rc_unregister_device(data->dev);
   data->dev = NULL;
 exit_free_rc:
   rc_free_device(data->dev);
 exit_unregister_led:
   led_classdev_unregister(&data->led);
 exit_free_data:
   kfree(data);
   pnp_set_drvdata(device, NULL);
 exit:
   return err;
 }<sep>@@
expression rdev,e;
@@
-       rdev = rc_allocate_device();
+       rdev = rc_allocate_device(e);
	...
-       rdev->driver_type      = e;