imamnurby/smpl_train_seed8 huggingface dataset:
--- initial
+++ final
@@ -1,7 +1,7 @@
 static int udl_framebuffer_init(struct drm_device *dev, struct udl_framebuffer *ufb, const struct drm_mode_fb_cmd2 *mode_cmd, struct udl_gem_object *obj) {
   int ret;
   ufb->obj = obj;
-  drm_helper_mode_fill_fb_struct(&ufb->base, mode_cmd);
+  drm_helper_mode_fill_fb_struct(dev, &ufb->base, mode_cmd);
   ret = drm_framebuffer_init(dev, &ufb->base, &udlfb_funcs);
   return ret;
 }<sep>@@
function func;
identifier dev;
expression E1, E2;
@@
func(struct drm_device *dev, ...)
{
 ...
 drm_helper_mode_fill_fb_struct(
+                               dev,
                                E1, E2);
 ...
}
--- initial
+++ final
@@ -1,16 +1,16 @@
 int virtio_gpu_framebuffer_init(struct drm_device *dev, struct virtio_gpu_framebuffer *vgfb, const struct drm_mode_fb_cmd2 *mode_cmd, struct drm_gem_object *obj) {
   int ret;
   struct virtio_gpu_object *bo;
   vgfb->obj = obj;
   bo = gem_to_virtio_gpu_obj(obj);
   ret = drm_framebuffer_init(dev, &vgfb->base, &virtio_gpu_fb_funcs);
   if (ret) {
     vgfb->obj = NULL;
     return ret;
   }
-  drm_helper_mode_fill_fb_struct(&vgfb->base, mode_cmd);
+  drm_helper_mode_fill_fb_struct(dev, &vgfb->base, mode_cmd);
   spin_lock_init(&vgfb->dirty_lock);
   vgfb->x1 = vgfb->y1 = INT_MAX;
   vgfb->x2 = vgfb->y2 = 0;
   return 0;
 }<sep>@@
function func;
identifier dev;
expression E1, E2;
@@
func(struct drm_device *dev, ...)
{
 ...
 drm_helper_mode_fill_fb_struct(
+                               dev,
                                E1, E2);
 ...
}
--- initial
+++ final
@@ -1,41 +1,41 @@
 static int vmw_kms_new_framebuffer_dmabuf(struct vmw_private *dev_priv, struct vmw_dma_buffer *dmabuf, struct vmw_framebuffer **out, const struct drm_mode_fb_cmd2 *mode_cmd) {
   struct drm_device *dev = dev_priv->dev;
   struct vmw_framebuffer_dmabuf *vfbd;
   unsigned int requested_size;
   struct drm_format_name_buf format_name;
   int ret;
   requested_size = mode_cmd->height * mode_cmd->pitches[0];
   if (unlikely(requested_size > dmabuf->base.num_pages * PAGE_SIZE)) {
     DRM_ERROR("Screen buffer object size is too small "
               "for requested mode.\n");
     return -EINVAL;
   }
   /* Limited framebuffer color depth support for screen objects */
   if (dev_priv->active_display_unit == vmw_du_screen_object) {
     switch (mode_cmd->pixel_format) {
     case DRM_FORMAT_XRGB8888:
     case DRM_FORMAT_ARGB8888: break;
     case DRM_FORMAT_XRGB1555:
     case DRM_FORMAT_RGB565: break;
     default: DRM_ERROR("Invalid pixel format: %s\n", drm_get_format_name(mode_cmd->pixel_format, &format_name)); return -EINVAL;
     }
   }
   vfbd = kzalloc(sizeof(*vfbd), GFP_KERNEL);
   if (!vfbd) {
     ret = -ENOMEM;
     goto out_err1;
   }
-  drm_helper_mode_fill_fb_struct(&vfbd->base.base, mode_cmd);
+  drm_helper_mode_fill_fb_struct(dev, &vfbd->base.base, mode_cmd);
   vfbd->base.dmabuf = true;
   vfbd->buffer = vmw_dmabuf_reference(dmabuf);
   vfbd->base.user_handle = mode_cmd->handles[0];
   *out = &vfbd->base;
   ret = drm_framebuffer_init(dev, &vfbd->base.base, &vmw_framebuffer_dmabuf_funcs);
   if (ret) goto out_err2;
   return 0;
 out_err2:
   vmw_dmabuf_unreference(&dmabuf);
   kfree(vfbd);
 out_err1:
   return ret;
 }<sep>@@
expression E1, E2;
@@
 drm_helper_mode_fill_fb_struct(
+                               dev,
                                E1, E2);
--- initial
+++ final
@@ -1,52 +1,52 @@
 static int vmw_kms_new_framebuffer_surface(struct vmw_private *dev_priv, struct vmw_surface *surface, struct vmw_framebuffer **out, const struct drm_mode_fb_cmd2 *mode_cmd, bool is_dmabuf_proxy) {
   struct drm_device *dev = dev_priv->dev;
   struct vmw_framebuffer_surface *vfbs;
   enum SVGA3dSurfaceFormat format;
   int ret;
   struct drm_format_name_buf format_name;
   /* 3D is only supported on HWv8 and newer hosts */
   if (dev_priv->active_display_unit == vmw_du_legacy) return -ENOSYS;
   /*
    * Sanity checks.
    */
   /* Surface must be marked as a scanout. */
   if (unlikely(!surface->scanout)) return -EINVAL;
   if (unlikely(surface->mip_levels[0] != 1 || surface->num_sizes != 1 || surface->base_size.width < mode_cmd->width || surface->base_size.height < mode_cmd->height || surface->base_size.depth != 1)) {
     DRM_ERROR("Incompatible surface dimensions "
               "for requested mode.\n");
     return -EINVAL;
   }
   switch (mode_cmd->pixel_format) {
   case DRM_FORMAT_ARGB8888: format = SVGA3D_A8R8G8B8; break;
   case DRM_FORMAT_XRGB8888: format = SVGA3D_X8R8G8B8; break;
   case DRM_FORMAT_RGB565: format = SVGA3D_R5G6B5; break;
   case DRM_FORMAT_XRGB1555: format = SVGA3D_A1R5G5B5; break;
   default: DRM_ERROR("Invalid pixel format: %s\n", drm_get_format_name(mode_cmd->pixel_format, &format_name)); return -EINVAL;
   }
   /*
    * For DX, surface format validation is done when surface->scanout
    * is set.
    */
   if (!dev_priv->has_dx && format != surface->format) {
     DRM_ERROR("Invalid surface format for requested mode.\n");
     return -EINVAL;
   }
   vfbs = kzalloc(sizeof(*vfbs), GFP_KERNEL);
   if (!vfbs) {
     ret = -ENOMEM;
     goto out_err1;
   }
-  drm_helper_mode_fill_fb_struct(&vfbs->base.base, mode_cmd);
+  drm_helper_mode_fill_fb_struct(dev, &vfbs->base.base, mode_cmd);
   vfbs->surface = vmw_surface_reference(surface);
   vfbs->base.user_handle = mode_cmd->handles[0];
   vfbs->is_dmabuf_proxy = is_dmabuf_proxy;
   *out = &vfbs->base;
   ret = drm_framebuffer_init(dev, &vfbs->base.base, &vmw_framebuffer_surface_funcs);
   if (ret) goto out_err2;
   return 0;
 out_err2:
   vmw_surface_unreference(&surface);
   kfree(vfbs);
 out_err1:
   return ret;
 }<sep>@@
expression E1, E2;
@@
 drm_helper_mode_fill_fb_struct(
+                               dev,
                                E1, E2);
--- initial
+++ final
@@ -1,49 +1,49 @@
 static int cros_ec_keyb_probe(struct platform_device *pdev) {
   struct cros_ec_device *ec = dev_get_drvdata(pdev->dev.parent);
   struct device *dev = &pdev->dev;
   struct cros_ec_keyb *ckdev;
   struct input_dev *idev;
   struct device_node *np;
   int err;
   np = dev->of_node;
   if (!np) return -ENODEV;
   ckdev = devm_kzalloc(dev, sizeof(*ckdev), GFP_KERNEL);
   if (!ckdev) return -ENOMEM;
-  err = matrix_keypad_parse_of_params(dev, &ckdev->rows, &ckdev->cols);
+  err = matrix_keypad_parse_properties(dev, &ckdev->rows, &ckdev->cols);
   if (err) return err;
   ckdev->valid_keys = devm_kzalloc(dev, ckdev->cols, GFP_KERNEL);
   if (!ckdev->valid_keys) return -ENOMEM;
   ckdev->old_kb_state = devm_kzalloc(dev, ckdev->cols, GFP_KERNEL);
   if (!ckdev->old_kb_state) return -ENOMEM;
   idev = devm_input_allocate_device(dev);
   if (!idev) return -ENOMEM;
   ckdev->ec = ec;
   ckdev->notifier.notifier_call = cros_ec_keyb_work;
   ckdev->dev = dev;
   idev->name = CROS_EC_DEV_NAME;
   idev->phys = ec->phys_name;
   __set_bit(EV_REP, idev->evbit);
   idev->id.bustype = BUS_VIRTUAL;
   idev->id.version = 1;
   idev->id.product = 0;
   idev->dev.parent = dev;
   idev->open = cros_ec_keyb_open;
   idev->close = cros_ec_keyb_close;
   ckdev->ghost_filter = of_property_read_bool(np, "google,needs-ghost-filter");
   err = matrix_keypad_build_keymap(NULL, NULL, ckdev->rows, ckdev->cols, NULL, idev);
   if (err) {
     dev_err(dev, "cannot build key matrix\n");
     return err;
   }
   ckdev->row_shift = get_count_order(ckdev->cols);
   input_set_capability(idev, EV_MSC, MSC_SCAN);
   input_set_drvdata(idev, ckdev);
   ckdev->idev = idev;
   cros_ec_keyb_compute_valid_keys(ckdev);
   err = input_register_device(ckdev->idev);
   if (err) {
     dev_err(dev, "cannot register input device\n");
     return err;
   }
   return 0;
 }<sep>@@
expression e1,e2,e3;
@@
-       matrix_keypad_parse_of_params
+       matrix_keypad_parse_properties
		(e1,e2,e3)
--- initial
+++ final
@@ -1,20 +1,20 @@
 static int lpc32xx_parse_dt(struct device *dev, struct lpc32xx_kscan_drv *kscandat) {
   struct device_node *np = dev->of_node;
   u32 rows = 0, columns = 0;
   int err;
-  err = matrix_keypad_parse_of_params(dev, &rows, &columns);
+  err = matrix_keypad_parse_properties(dev, &rows, &columns);
   if (err) return err;
   if (rows != columns) {
     dev_err(dev, "rows and columns must be equal!\n");
     return -EINVAL;
   }
   kscandat->matrix_sz = rows;
   kscandat->row_shift = get_count_order(columns);
   of_property_read_u32(np, "nxp,debounce-delay-ms", &kscandat->deb_clks);
   of_property_read_u32(np, "nxp,scan-delay-ms", &kscandat->scan_delay);
   if (!kscandat->deb_clks || !kscandat->scan_delay) {
     dev_err(dev, "debounce or scan delay not specified\n");
     return -EINVAL;
   }
   return 0;
 }<sep>@@
expression e1,e2,e3;
@@
-       matrix_keypad_parse_of_params
+       matrix_keypad_parse_properties
		(e1,e2,e3)
--- initial
+++ final
@@ -1,29 +1,29 @@
 int matrix_keypad_build_keymap(const struct matrix_keymap_data *keymap_data, const char *keymap_name, unsigned int rows, unsigned int cols, unsigned short *keymap, struct input_dev *input_dev) {
   unsigned int row_shift = get_count_order(cols);
   size_t max_keys = rows << row_shift;
   int i;
   int error;
   if (WARN_ON(!input_dev->dev.parent)) return -EINVAL;
   if (!keymap) {
     keymap = devm_kzalloc(input_dev->dev.parent, max_keys * sizeof(*keymap), GFP_KERNEL);
     if (!keymap) {
       dev_err(input_dev->dev.parent, "Unable to allocate memory for keymap");
       return -ENOMEM;
     }
   }
   input_dev->keycode = keymap;
   input_dev->keycodesize = sizeof(*keymap);
   input_dev->keycodemax = max_keys;
   __set_bit(EV_KEY, input_dev->evbit);
   if (keymap_data) {
     for (i = 0; i < keymap_data->keymap_size; i++) {
       unsigned int key = keymap_data->keymap[i];
       if (!matrix_keypad_map_key(input_dev, rows, cols, row_shift, key)) return -EINVAL;
     }
   } else {
-    error = matrix_keypad_parse_of_keymap(keymap_name, rows, cols, input_dev);
+    error = matrix_keypad_parse_keymap(keymap_name, rows, cols, input_dev);
     if (error) return error;
   }
   __clear_bit(KEY_RESERVED, input_dev->keybit);
   return 0;
 }<sep>@@
expression e1,e2,e3,e4;
@@
-	matrix_keypad_parse_of_keymap
+	matrix_keypad_parse_keymap
		(e1,e2,e3,e4)
--- initial
+++ final
@@ -1,8 +1,8 @@
 static int omap4_keypad_parse_dt(struct device *dev, struct omap4_keypad *keypad_data) {
   struct device_node *np = dev->of_node;
   int err;
-  err = matrix_keypad_parse_of_params(dev, &keypad_data->rows, &keypad_data->cols);
+  err = matrix_keypad_parse_properties(dev, &keypad_data->rows, &keypad_data->cols);
   if (err) return err;
   if (of_get_property(np, "linux,input-no-autorepeat", NULL)) keypad_data->no_autorepeat = true;
   return 0;
 }<sep>@@
expression e1,e2,e3;
@@
-       matrix_keypad_parse_of_params
+       matrix_keypad_parse_properties
		(e1,e2,e3)
--- initial
+++ final
@@ -1,17 +1,17 @@
 static int pxa27x_keypad_matrix_key_parse_dt(struct pxa27x_keypad *keypad, struct pxa27x_keypad_platform_data *pdata) {
   struct input_dev *input_dev = keypad->input_dev;
   struct device *dev = input_dev->dev.parent;
   u32 rows, cols;
   int error;
-  error = matrix_keypad_parse_of_params(dev, &rows, &cols);
+  error = matrix_keypad_parse_properties(dev, &rows, &cols);
   if (error) return error;
   if (rows > MAX_MATRIX_KEY_ROWS || cols > MAX_MATRIX_KEY_COLS) {
     dev_err(dev, "rows or cols exceeds maximum value\n");
     return -EINVAL;
   }
   pdata->matrix_key_rows = rows;
   pdata->matrix_key_cols = cols;
   error = matrix_keypad_build_keymap(NULL, NULL, pdata->matrix_key_rows, pdata->matrix_key_cols, keypad->keycodes, input_dev);
   if (error) return error;
   return 0;
 }<sep>@@
expression e1,e2,e3;
@@
-       matrix_keypad_parse_of_params
+       matrix_keypad_parse_properties
		(e1,e2,e3)
--- initial
+++ final
@@ -1,13 +1,13 @@
 static int keypad_matrix_key_parse_dt(struct st_keyscan *keypad_data) {
   struct device *dev = keypad_data->input_dev->dev.parent;
   struct device_node *np = dev->of_node;
   int error;
-  error = matrix_keypad_parse_of_params(dev, &keypad_data->n_rows, &keypad_data->n_cols);
+  error = matrix_keypad_parse_properties(dev, &keypad_data->n_rows, &keypad_data->n_cols);
   if (error) {
     dev_err(dev, "failed to parse keypad params\n");
     return error;
   }
   of_property_read_u32(np, "st,debounce-us", &keypad_data->debounce_us);
   dev_dbg(dev, "n_rows=%d n_col=%d debounce=%d\n", keypad_data->n_rows, keypad_data->n_cols, keypad_data->debounce_us);
   return 0;
 }<sep>@@
expression e1,e2,e3;
@@
-       matrix_keypad_parse_of_params
+       matrix_keypad_parse_properties
		(e1,e2,e3)
--- initial
+++ final
@@ -1,46 +1,46 @@
 static int stmpe_keypad_probe(struct platform_device *pdev) {
   struct stmpe *stmpe = dev_get_drvdata(pdev->dev.parent);
   struct device_node *np = pdev->dev.of_node;
   struct stmpe_keypad *keypad;
   struct input_dev *input;
   u32 rows;
   u32 cols;
   int error;
   int irq;
   irq = platform_get_irq(pdev, 0);
   if (irq < 0) return irq;
   keypad = devm_kzalloc(&pdev->dev, sizeof(struct stmpe_keypad), GFP_KERNEL);
   if (!keypad) return -ENOMEM;
   keypad->stmpe = stmpe;
   keypad->variant = &stmpe_keypad_variants[stmpe->partnum];
   of_property_read_u32(np, "debounce-interval", &keypad->debounce_ms);
   of_property_read_u32(np, "st,scan-count", &keypad->scan_count);
   keypad->no_autorepeat = of_property_read_bool(np, "st,no-autorepeat");
   input = devm_input_allocate_device(&pdev->dev);
   if (!input) return -ENOMEM;
   input->name = "STMPE keypad";
   input->id.bustype = BUS_I2C;
   input->dev.parent = &pdev->dev;
-  error = matrix_keypad_parse_of_params(&pdev->dev, &rows, &cols);
+  error = matrix_keypad_parse_properties(&pdev->dev, &rows, &cols);
   if (error) return error;
   error = matrix_keypad_build_keymap(NULL, NULL, rows, cols, keypad->keymap, input);
   if (error) return error;
   input_set_capability(input, EV_MSC, MSC_SCAN);
   if (!keypad->no_autorepeat) __set_bit(EV_REP, input->evbit);
   stmpe_keypad_fill_used_pins(keypad, rows, cols);
   keypad->input = input;
   error = stmpe_keypad_chip_init(keypad);
   if (error < 0) return error;
   error = devm_request_threaded_irq(&pdev->dev, irq, NULL, stmpe_keypad_irq, IRQF_ONESHOT, "stmpe-keypad", keypad);
   if (error) {
     dev_err(&pdev->dev, "unable to get irq: %d\n", error);
     return error;
   }
   error = input_register_device(input);
   if (error) {
     dev_err(&pdev->dev, "unable to register input device: %d\n", error);
     return error;
   }
   platform_set_drvdata(pdev, keypad);
   return 0;
 }<sep>@@
expression e1,e2,e3;
@@
-       matrix_keypad_parse_of_params
+       matrix_keypad_parse_properties
		(e1,e2,e3)
--- initial
+++ final
@@ -1,79 +1,79 @@
 static int twl4030_kp_probe(struct platform_device *pdev) {
   struct twl4030_keypad_data *pdata = dev_get_platdata(&pdev->dev);
   const struct matrix_keymap_data *keymap_data = NULL;
   struct twl4030_keypad *kp;
   struct input_dev *input;
   u8 reg;
   int error;
   kp = devm_kzalloc(&pdev->dev, sizeof(*kp), GFP_KERNEL);
   if (!kp) return -ENOMEM;
   input = devm_input_allocate_device(&pdev->dev);
   if (!input) return -ENOMEM;
   /* get the debug device */
   kp->dbg_dev = &pdev->dev;
   kp->input = input;
   /* setup input device */
   input->name = "TWL4030 Keypad";
   input->phys = "twl4030_keypad/input0";
   input->id.bustype = BUS_HOST;
   input->id.vendor = 0x0001;
   input->id.product = 0x0001;
   input->id.version = 0x0003;
   if (pdata) {
     if (!pdata->rows || !pdata->cols || !pdata->keymap_data) {
       dev_err(&pdev->dev, "Missing platform_data\n");
       return -EINVAL;
     }
     kp->n_rows = pdata->rows;
     kp->n_cols = pdata->cols;
     kp->autorepeat = pdata->rep;
     keymap_data = pdata->keymap_data;
   } else {
-    error = matrix_keypad_parse_of_params(&pdev->dev, &kp->n_rows, &kp->n_cols);
+    error = matrix_keypad_parse_properties(&pdev->dev, &kp->n_rows, &kp->n_cols);
     if (error) return error;
     kp->autorepeat = true;
   }
   if (kp->n_rows > TWL4030_MAX_ROWS || kp->n_cols > TWL4030_MAX_COLS) {
     dev_err(&pdev->dev, "Invalid rows/cols amount specified in platform/devicetree data\n");
     return -EINVAL;
   }
   kp->irq = platform_get_irq(pdev, 0);
   if (!kp->irq) {
     dev_err(&pdev->dev, "no keyboard irq assigned\n");
     return -EINVAL;
   }
   error = matrix_keypad_build_keymap(keymap_data, NULL, TWL4030_MAX_ROWS, 1 << TWL4030_ROW_SHIFT, kp->keymap, input);
   if (error) {
     dev_err(kp->dbg_dev, "Failed to build keymap\n");
     return error;
   }
   input_set_capability(input, EV_MSC, MSC_SCAN);
   /* Enable auto repeat feature of Linux input subsystem */
   if (kp->autorepeat) __set_bit(EV_REP, input->evbit);
   error = input_register_device(input);
   if (error) {
     dev_err(kp->dbg_dev, "Unable to register twl4030 keypad device\n");
     return error;
   }
   error = twl4030_kp_program(kp);
   if (error) return error;
   /*
    * This ISR will always execute in kernel thread context because of
    * the need to access the TWL4030 over the I2C bus.
    *
    * NOTE:  we assume this host is wired to TWL4040 INT1, not INT2 ...
    */
   error = devm_request_threaded_irq(&pdev->dev, kp->irq, NULL, do_kp_irq, 0, pdev->name, kp);
   if (error) {
     dev_info(kp->dbg_dev, "request_irq failed for irq no=%d: %d\n", kp->irq, error);
     return error;
   }
   /* Enable KP and TO interrupts now. */
   reg = (u8) ~(KEYP_IMR1_KP | KEYP_IMR1_TO);
   if (twl4030_kpwrite_u8(kp, reg, KEYP_IMR1)) {
     /* mask all events - we don't care about the result */
     (void)twl4030_kpwrite_u8(kp, 0xff, KEYP_IMR1);
     return -EIO;
   }
   return 0;
 }<sep>@@
expression e1,e2,e3;
@@
-       matrix_keypad_parse_of_params
+       matrix_keypad_parse_properties
		(e1,e2,e3)
--- initial
+++ final
@@ -1,58 +1,57 @@
 struct cec_adapter *cec_allocate_adapter(const struct cec_adap_ops *ops, void *priv, const char *name, u32 caps, u8 available_las) {
   struct cec_adapter *adap;
   int res;
   if (WARN_ON(!caps)) return ERR_PTR(-EINVAL);
   if (WARN_ON(!ops)) return ERR_PTR(-EINVAL);
   if (WARN_ON(!available_las || available_las > CEC_MAX_LOG_ADDRS)) return ERR_PTR(-EINVAL);
   adap = kzalloc(sizeof(*adap), GFP_KERNEL);
   if (!adap) return ERR_PTR(-ENOMEM);
   strlcpy(adap->name, name, sizeof(adap->name));
   adap->phys_addr = CEC_PHYS_ADDR_INVALID;
   adap->log_addrs.cec_version = CEC_OP_CEC_VERSION_2_0;
   adap->log_addrs.vendor_id = CEC_VENDOR_ID_NONE;
   adap->capabilities = caps;
   adap->available_log_addrs = available_las;
   adap->sequence = 0;
   adap->ops = ops;
   adap->priv = priv;
   memset(adap->phys_addrs, 0xff, sizeof(adap->phys_addrs));
   mutex_init(&adap->lock);
   INIT_LIST_HEAD(&adap->transmit_queue);
   INIT_LIST_HEAD(&adap->wait_queue);
   init_waitqueue_head(&adap->kthread_waitq);
   adap->kthread = kthread_run(cec_thread_func, adap, "cec-%s", name);
   if (IS_ERR(adap->kthread)) {
     pr_err("cec-%s: kernel_thread() failed\n", name);
     res = PTR_ERR(adap->kthread);
     kfree(adap);
     return ERR_PTR(res);
   }
   if (!(caps & CEC_CAP_RC)) return adap;
 #if IS_REACHABLE(CONFIG_RC_CORE)
   /* Prepare the RC input device */
-  adap->rc = rc_allocate_device();
+  adap->rc = rc_allocate_device(RC_DRIVER_SCANCODE);
   if (!adap->rc) {
     pr_err("cec-%s: failed to allocate memory for rc_dev\n", name);
     kthread_stop(adap->kthread);
     kfree(adap);
     return ERR_PTR(-ENOMEM);
   }
   snprintf(adap->input_name, sizeof(adap->input_name), "RC for %s", name);
   snprintf(adap->input_phys, sizeof(adap->input_phys), "%s/input0", name);
   adap->rc->input_name = adap->input_name;
   adap->rc->input_phys = adap->input_phys;
   adap->rc->input_id.bustype = BUS_CEC;
   adap->rc->input_id.vendor = 0;
   adap->rc->input_id.product = 0;
   adap->rc->input_id.version = 1;
-  adap->rc->driver_type = RC_DRIVER_SCANCODE;
   adap->rc->driver_name = CEC_NAME;
   adap->rc->allowed_protocols = RC_BIT_CEC;
   adap->rc->priv = adap;
   adap->rc->map_name = RC_MAP_CEC;
   adap->rc->timeout = MS_TO_NS(100);
 #else
   adap->capabilities &= ~CEC_CAP_RC;
 #endif
   return adap;
 }<sep>@@
expression rdev,e;
@@
-       rdev = rc_allocate_device();
+       rdev = rc_allocate_device(e);
	...
-       rdev->driver_type      = e;
--- initial
+++ final
@@ -1,30 +1,29 @@
 static int dm1105_ir_init(struct dm1105_dev *dm1105) {
   struct rc_dev *dev;
   int err = -ENOMEM;
-  dev = rc_allocate_device();
+  dev = rc_allocate_device(RC_DRIVER_SCANCODE);
   if (!dev) return -ENOMEM;
   snprintf(dm1105->ir.input_phys, sizeof(dm1105->ir.input_phys), "pci-%s/ir0", pci_name(dm1105->pdev));
   dev->driver_name = MODULE_NAME;
   dev->map_name = RC_MAP_DM1105_NEC;
-  dev->driver_type = RC_DRIVER_SCANCODE;
   dev->input_name = "DVB on-card IR receiver";
   dev->input_phys = dm1105->ir.input_phys;
   dev->input_id.bustype = BUS_PCI;
   dev->input_id.version = 1;
   if (dm1105->pdev->subsystem_vendor) {
     dev->input_id.vendor = dm1105->pdev->subsystem_vendor;
     dev->input_id.product = dm1105->pdev->subsystem_device;
   } else {
     dev->input_id.vendor = dm1105->pdev->vendor;
     dev->input_id.product = dm1105->pdev->device;
   }
   dev->dev.parent = &dm1105->pdev->dev;
   INIT_WORK(&dm1105->ir.work, dm1105_emit_key);
   err = rc_register_device(dev);
   if (err < 0) {
     rc_free_device(dev);
     return err;
   }
   dm1105->ir.dev = dev;
   return 0;
 }<sep>@@
expression rdev,e;
@@
-       rdev = rc_allocate_device();
+       rdev = rc_allocate_device(e);
	...
-       rdev->driver_type      = e;
--- initial
+++ final
@@ -1,30 +1,29 @@
 static int rc_core_dvb_usb_remote_init(struct dvb_usb_device *d) {
   int err, rc_interval;
   struct rc_dev *dev;
-  dev = rc_allocate_device();
+  dev = rc_allocate_device(d->props.rc.core.driver_type);
   if (!dev) return -ENOMEM;
   dev->driver_name = d->props.rc.core.module_name;
   dev->map_name = d->props.rc.core.rc_codes;
   dev->change_protocol = d->props.rc.core.change_protocol;
   dev->allowed_protocols = d->props.rc.core.allowed_protos;
-  dev->driver_type = d->props.rc.core.driver_type;
   usb_to_input_id(d->udev, &dev->input_id);
   dev->input_name = "IR-receiver inside an USB DVB receiver";
   dev->input_phys = d->rc_phys;
   dev->dev.parent = &d->udev->dev;
   dev->priv = d;
   err = rc_register_device(dev);
   if (err < 0) {
     rc_free_device(dev);
     return err;
   }
   d->input_dev = NULL;
   d->rc_dev = dev;
   if (!d->props.rc.core.rc_query || d->props.rc.core.bulk_mode) return 0;
   /* Polling mode - initialize a work queue for handling it */
   INIT_DELAYED_WORK(&d->rc_query_work, dvb_usb_read_remote_control);
   rc_interval = d->props.rc.core.rc_interval;
   info("schedule remote query interval to %d msecs.", rc_interval);
   schedule_delayed_work(&d->rc_query_work, msecs_to_jiffies(rc_interval));
   return 0;
 }<sep>@@
expression rdev,e;
@@
-       rdev = rc_allocate_device();
+       rdev = rc_allocate_device(e);
	...
-       rdev->driver_type      = e;