imamnurby/smpl_train_seed8 huggingface dataset:
--- initial
+++ final
@@ -1,26 +1,26 @@
 static int sd_config(struct gspca_dev *gspca_dev, const struct usb_device_id *id) {
   struct cam *cam = &gspca_dev->cam;
   struct sd *dev = (struct sd *)gspca_dev;
   int ret;
   PDEBUG(D_PROBE, "SQ9050 camera detected (vid/pid 0x%04X:0x%04X)", id->idVendor, id->idProduct);
   ret = sq905c_command(gspca_dev, SQ905C_GET_ID, 0);
   if (ret < 0) {
-    PERR("Get version command failed");
+    gspca_err(gspca_dev, "Get version command failed\n");
     return ret;
   }
   ret = sq905c_read(gspca_dev, 0xf5, 0, 20);
   if (ret < 0) {
-    PERR("Reading version command failed");
+    gspca_err(gspca_dev, "Reading version command failed\n");
     return ret;
   }
   /* Note we leave out the usb id and the manufacturing date */
   PDEBUG(D_PROBE, "SQ9050 ID string: %02x - %*ph", gspca_dev->usb_buf[3], 6, gspca_dev->usb_buf + 14);
   cam->cam_mode = sq905c_mode;
   cam->nmodes = 2;
   if (gspca_dev->usb_buf[15] == 0) cam->nmodes = 1;
   /* We don't use the buffer gspca allocates so make it small. */
   cam->bulk_size = 32;
   cam->bulk = 1;
   INIT_WORK(&dev->work_struct, sq905c_dostream);
   return 0;
 }<sep>@@
if String.length c < 3 || not(String.sub c (String.length c - 3) 2 = "\\n")
then c1 := make_expr ((String.sub c 0 (String.length c - 1)) ^ "\\n\"")
else c1 := make_expr c

@@
symbol gspca_dev;
constant char[] r.c;
expression s.c1;
@@
-               PERR(c
+               gspca_err(gspca_dev,c1
		,...)
--- initial
+++ final
@@ -1,22 +1,22 @@
 static int sd_start(struct gspca_dev *gspca_dev) {
   struct sd *dev = (struct sd *)gspca_dev;
   int ret;
   dev->cap_mode = gspca_dev->cam.cam_mode;
   /* "Open the shutter" and set size, to start capture */
   switch (gspca_dev->pixfmt.width) {
   case 640:
     PDEBUG(D_STREAM, "Start streaming at high resolution");
     dev->cap_mode++;
     ret = sq905c_command(gspca_dev, SQ905C_CAPTURE_HI, SQ905C_CAPTURE_INDEX);
     break;
   default: /* 320 */ PDEBUG(D_STREAM, "Start streaming at medium resolution"); ret = sq905c_command(gspca_dev, SQ905C_CAPTURE_MED, SQ905C_CAPTURE_INDEX);
   }
   if (ret < 0) {
-    PERR("Start streaming command failed");
+    gspca_err(gspca_dev, "Start streaming command failed\n");
     return ret;
   }
   /* Start the workqueue function to do the streaming */
   dev->work_thread = create_singlethread_workqueue(MODULE_NAME);
   queue_work(dev->work_thread, &dev->work_struct);
   return 0;
 }<sep>@@
if String.length c < 3 || not(String.sub c (String.length c - 3) 2 = "\\n")
then c1 := make_expr ((String.sub c 0 (String.length c - 1)) ^ "\\n\"")
else c1 := make_expr c

@@
symbol gspca_dev;
constant char[] r.c;
expression s.c1;
@@
-               PERR(c
+               gspca_err(gspca_dev,c1
		,...)
--- initial
+++ final
@@ -1,39 +1,39 @@
 static void ucbus_write(struct gspca_dev *gspca_dev, const struct ucbus_write_cmd *cmd, int ncmds, int batchsize) {
   u8 *buf;
   u16 val, idx;
   int len, ret;
   if (gspca_dev->usb_err < 0) return;
   if ((batchsize - 1) * 3 > USB_BUF_SZ) {
-    PERR("Bug: usb_buf overflow\n");
+    gspca_err(gspca_dev, "Bug: usb_buf overflow\n");
     gspca_dev->usb_err = -ENOMEM;
     return;
   }
   for (;;) {
     len = ncmds;
     if (len > batchsize) len = batchsize;
     ncmds -= len;
     val = (cmd->bw_addr << 8) | SQ930_CTRL_UCBUS_IO;
     idx = (cmd->bw_data << 8) | (cmd->bw_addr >> 8);
     buf = gspca_dev->usb_buf;
     while (--len > 0) {
       cmd++;
       *buf++ = cmd->bw_addr;
       *buf++ = cmd->bw_addr >> 8;
       *buf++ = cmd->bw_data;
     }
     if (buf != gspca_dev->usb_buf)
       PDEBUG(D_USBO, "ucbus v: %04x i: %04x %02x...%02x", val, idx, gspca_dev->usb_buf[0], buf[-1]);
     else
       PDEBUG(D_USBO, "ucbus v: %04x i: %04x", val, idx);
     ret = usb_control_msg(gspca_dev->dev, usb_sndctrlpipe(gspca_dev->dev, 0), 0x0c, /* request */
                           USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, val, idx, gspca_dev->usb_buf, buf - gspca_dev->usb_buf, 500);
     if (ret < 0) {
       pr_err("ucbus_write failed %d\n", ret);
       gspca_dev->usb_err = ret;
       return;
     }
     msleep(30);
     if (ncmds <= 0) break;
     cmd++;
   }
 }<sep>@@
if String.length c < 3 || not(String.sub c (String.length c - 3) 2 = "\\n")
then c1 := make_expr ((String.sub c 0 (String.length c - 1)) ^ "\\n\"")
else c1 := make_expr c

@@
symbol gspca_dev;
constant char[] r.c;
expression s.c1;
@@
-               PERR(c
+               gspca_err(gspca_dev,c1
		,...)
--- initial
+++ final
@@ -1,10 +1,10 @@
 static int stv0680_get_video_mode(struct gspca_dev *gspca_dev) {
   /* Note not sure if this init of usb_buf is really necessary */
   memset(gspca_dev->usb_buf, 0, 8);
   gspca_dev->usb_buf[0] = 0x0f;
   if (stv_sndctrl(gspca_dev, 0, 0x87, 0, 0x08) != 0x08) {
-    PERR("Get_Camera_Mode failed");
+    gspca_err(gspca_dev, "Get_Camera_Mode failed\n");
     return stv0680_handle_error(gspca_dev, -EIO);
   }
   return gspca_dev->usb_buf[0]; /* 01 = VGA, 03 = QVGA, 00 = CIF */
 }<sep>@@
if String.length c < 3 || not(String.sub c (String.length c - 3) 2 = "\\n")
then c1 := make_expr ((String.sub c 0 (String.length c - 1)) ^ "\\n\"")
else c1 := make_expr c

@@
symbol gspca_dev;
constant char[] r.c;
expression s.c1;
@@
-               PERR(c
+               gspca_err(gspca_dev,c1
		,...)
--- initial
+++ final
@@ -1,17 +1,17 @@
 static int stv0680_set_video_mode(struct gspca_dev *gspca_dev, u8 mode) {
   struct sd *sd = (struct sd *)gspca_dev;
   if (sd->current_mode == mode) return 0;
   memset(gspca_dev->usb_buf, 0, 8);
   gspca_dev->usb_buf[0] = mode;
   if (stv_sndctrl(gspca_dev, 3, 0x07, 0x0100, 0x08) != 0x08) {
-    PERR("Set_Camera_Mode failed");
+    gspca_err(gspca_dev, "Set_Camera_Mode failed\n");
     return stv0680_handle_error(gspca_dev, -EIO);
   }
   /* Verify we got what we've asked for */
   if (stv0680_get_video_mode(gspca_dev) != mode) {
-    PERR("Error setting camera video mode!");
+    gspca_err(gspca_dev, "Error setting camera video mode!\n");
     return -EIO;
   }
   sd->current_mode = mode;
   return 0;
 }<sep>@@
if String.length c < 3 || not(String.sub c (String.length c - 3) 2 = "\\n")
then c1 := make_expr ((String.sub c 0 (String.length c - 1)) ^ "\\n\"")
else c1 := make_expr c

@@
symbol gspca_dev;
constant char[] r.c;
expression s.c1;
@@
-               PERR(c
+               gspca_err(gspca_dev,c1
		,...)
--- initial
+++ final
@@ -1,26 +1,26 @@
 static int stv06xx_start(struct gspca_dev *gspca_dev) {
   struct sd *sd = (struct sd *)gspca_dev;
   struct usb_host_interface *alt;
   struct usb_interface *intf;
   int err, packet_size;
   intf = usb_ifnum_to_if(sd->gspca_dev.dev, sd->gspca_dev.iface);
   alt = usb_altnum_to_altsetting(intf, sd->gspca_dev.alt);
   if (!alt) {
-    PERR("Couldn't get altsetting");
+    gspca_err(gspca_dev, "Couldn't get altsetting\n");
     return -EIO;
   }
   packet_size = le16_to_cpu(alt->endpoint[0].desc.wMaxPacketSize);
   err = stv06xx_write_bridge(sd, STV_ISO_SIZE_L, packet_size);
   if (err < 0) return err;
   /* Prepare the sensor for start */
   err = sd->sensor->start(sd);
   if (err < 0) goto out;
   /* Start isochronous streaming */
   err = stv06xx_write_bridge(sd, STV_ISO_ENABLE, 1);
 out:
   if (err < 0)
     PDEBUG(D_STREAM, "Starting stream failed");
   else
     PDEBUG(D_STREAM, "Started streaming");
   return (err < 0) ? err : 0;
 }<sep>@@
if String.length c < 3 || not(String.sub c (String.length c - 3) 2 = "\\n")
then c1 := make_expr ((String.sub c 0 (String.length c - 1)) ^ "\\n\"")
else c1 := make_expr c

@@
symbol gspca_dev;
constant char[] r.c;
expression s.c1;
@@
-               PERR(c
+               gspca_err(gspca_dev,c1
		,...)
--- initial
+++ final
@@ -1,14 +1,14 @@
 static void reg_r(struct gspca_dev *gspca_dev, u8 req, u16 index, u16 len) {
   int ret;
   if (len > USB_BUF_SZ) {
-    PERR("reg_r: buffer overflow\n");
+    gspca_err(gspca_dev, "reg_r: buffer overflow\n");
     return;
   }
   if (gspca_dev->usb_err < 0) return;
   ret = usb_control_msg(gspca_dev->dev, usb_rcvctrlpipe(gspca_dev->dev, 0), req, USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE, 0, /* value */
                         index, len ? gspca_dev->usb_buf : NULL, len, 500);
   if (ret < 0) {
     pr_err("reg_r err %d\n", ret);
     gspca_dev->usb_err = ret;
   }
 }<sep>@@
if String.length c < 3 || not(String.sub c (String.length c - 3) 2 = "\\n")
then c1 := make_expr ((String.sub c 0 (String.length c - 1)) ^ "\\n\"")
else c1 := make_expr c

@@
symbol gspca_dev;
constant char[] r.c;
expression s.c1;
@@
-               PERR(c
+               gspca_err(gspca_dev,c1
		,...)
--- initial
+++ final
@@ -1,18 +1,18 @@
 static int sd_init_controls(struct gspca_dev *gspca_dev) {
   struct sd *sd = (struct sd *)gspca_dev;
   struct v4l2_ctrl_handler *hdl = &gspca_dev->ctrl_handler;
   gspca_dev->vdev.ctrl_handler = hdl;
   v4l2_ctrl_handler_init(hdl, 4);
   gspca_dev->exposure = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
                                           /* Mostly limited by URB timeouts */
                                           /* XXX: make dynamic based on frame rate? */
                                           V4L2_CID_EXPOSURE, 0, 800, 1, 350);
   gspca_dev->gain = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops, V4L2_CID_GAIN, 0, 511, 1, 128);
   sd->blue = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops, V4L2_CID_BLUE_BALANCE, 0, 1023, 1, 80);
   sd->red = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops, V4L2_CID_RED_BALANCE, 0, 1023, 1, 295);
   if (hdl->error) {
-    PERR("Could not initialize controls\n");
+    gspca_err(gspca_dev, "Could not initialize controls\n");
     return hdl->error;
   }
   return 0;
 }<sep>@@
if String.length c < 3 || not(String.sub c (String.length c - 3) 2 = "\\n")
then c1 := make_expr ((String.sub c 0 (String.length c - 1)) ^ "\\n\"")
else c1 := make_expr c

@@
symbol gspca_dev;
constant char[] r.c;
expression s.c1;
@@
-               PERR(c
+               gspca_err(gspca_dev,c1
		,...)
--- initial
+++ final
@@ -1,13 +1,13 @@
 static int sd_start(struct gspca_dev *gspca_dev) {
   struct sd *sd = (struct sd *)gspca_dev;
   int rc;
   sd->this_f = 0;
   rc = configure(gspca_dev);
   if (rc < 0) {
-    PERR("Failed configure");
+    gspca_err(gspca_dev, "Failed configure\n");
     return rc;
   }
   /* First two frames have messed up gains
   Drop them to avoid special cases in user apps? */
   return 0;
 }<sep>@@
if String.length c < 3 || not(String.sub c (String.length c - 3) 2 = "\\n")
then c1 := make_expr ((String.sub c 0 (String.length c - 1)) ^ "\\n\"")
else c1 := make_expr c

@@
symbol gspca_dev;
constant char[] r.c;
expression s.c1;
@@
-               PERR(c
+               gspca_err(gspca_dev,c1
		,...)
--- initial
+++ final
@@ -1,13 +1,13 @@
 static void dce_v10_0_init_golden_registers(struct amdgpu_device *adev) {
   switch (adev->asic_type) {
   case CHIP_FIJI:
-    amdgpu_program_register_sequence(adev, fiji_mgcg_cgcg_init, ARRAY_SIZE(fiji_mgcg_cgcg_init));
-    amdgpu_program_register_sequence(adev, golden_settings_fiji_a10, ARRAY_SIZE(golden_settings_fiji_a10));
+    amdgpu_device_program_register_sequence(adev, fiji_mgcg_cgcg_init, ARRAY_SIZE(fiji_mgcg_cgcg_init));
+    amdgpu_device_program_register_sequence(adev, golden_settings_fiji_a10, ARRAY_SIZE(golden_settings_fiji_a10));
     break;
   case CHIP_TONGA:
-    amdgpu_program_register_sequence(adev, tonga_mgcg_cgcg_init, ARRAY_SIZE(tonga_mgcg_cgcg_init));
-    amdgpu_program_register_sequence(adev, golden_settings_tonga_a11, ARRAY_SIZE(golden_settings_tonga_a11));
+    amdgpu_device_program_register_sequence(adev, tonga_mgcg_cgcg_init, ARRAY_SIZE(tonga_mgcg_cgcg_init));
+    amdgpu_device_program_register_sequence(adev, golden_settings_tonga_a11, ARRAY_SIZE(golden_settings_tonga_a11));
     break;
   default: break;
   }
 }<sep>@@
expression e1,e2,e3;
@@
- amdgpu_program_register_sequence
+ amdgpu_device_program_register_sequence
  (e1,e2,e3)
--- initial
+++ final
@@ -1,13 +1,13 @@
 static void dce_v11_0_init_golden_registers(struct amdgpu_device *adev) {
   switch (adev->asic_type) {
   case CHIP_CARRIZO:
-    amdgpu_program_register_sequence(adev, cz_mgcg_cgcg_init, ARRAY_SIZE(cz_mgcg_cgcg_init));
-    amdgpu_program_register_sequence(adev, cz_golden_settings_a11, ARRAY_SIZE(cz_golden_settings_a11));
+    amdgpu_device_program_register_sequence(adev, cz_mgcg_cgcg_init, ARRAY_SIZE(cz_mgcg_cgcg_init));
+    amdgpu_device_program_register_sequence(adev, cz_golden_settings_a11, ARRAY_SIZE(cz_golden_settings_a11));
     break;
-  case CHIP_STONEY: amdgpu_program_register_sequence(adev, stoney_golden_settings_a11, ARRAY_SIZE(stoney_golden_settings_a11)); break;
+  case CHIP_STONEY: amdgpu_device_program_register_sequence(adev, stoney_golden_settings_a11, ARRAY_SIZE(stoney_golden_settings_a11)); break;
   case CHIP_POLARIS11:
-  case CHIP_POLARIS12: amdgpu_program_register_sequence(adev, polaris11_golden_settings_a11, ARRAY_SIZE(polaris11_golden_settings_a11)); break;
-  case CHIP_POLARIS10: amdgpu_program_register_sequence(adev, polaris10_golden_settings_a11, ARRAY_SIZE(polaris10_golden_settings_a11)); break;
+  case CHIP_POLARIS12: amdgpu_device_program_register_sequence(adev, polaris11_golden_settings_a11, ARRAY_SIZE(polaris11_golden_settings_a11)); break;
+  case CHIP_POLARIS10: amdgpu_device_program_register_sequence(adev, polaris10_golden_settings_a11, ARRAY_SIZE(polaris10_golden_settings_a11)); break;
   default: break;
   }
 }<sep>@@
expression e1,e2,e3;
@@
- amdgpu_program_register_sequence
+ amdgpu_device_program_register_sequence
  (e1,e2,e3)
--- initial
+++ final
@@ -1,9 +1,9 @@
 static void gmc_v7_0_init_golden_registers(struct amdgpu_device *adev) {
   switch (adev->asic_type) {
   case CHIP_TOPAZ:
-    amdgpu_program_register_sequence(adev, iceland_mgcg_cgcg_init, ARRAY_SIZE(iceland_mgcg_cgcg_init));
-    amdgpu_program_register_sequence(adev, golden_settings_iceland_a11, ARRAY_SIZE(golden_settings_iceland_a11));
+    amdgpu_device_program_register_sequence(adev, iceland_mgcg_cgcg_init, ARRAY_SIZE(iceland_mgcg_cgcg_init));
+    amdgpu_device_program_register_sequence(adev, golden_settings_iceland_a11, ARRAY_SIZE(golden_settings_iceland_a11));
     break;
   default: break;
   }
 }<sep>@@
expression e1,e2,e3;
@@
- amdgpu_program_register_sequence
+ amdgpu_device_program_register_sequence
  (e1,e2,e3)
--- initial
+++ final
@@ -1,21 +1,21 @@
 static void gmc_v8_0_init_golden_registers(struct amdgpu_device *adev) {
   switch (adev->asic_type) {
   case CHIP_FIJI:
-    amdgpu_program_register_sequence(adev, fiji_mgcg_cgcg_init, ARRAY_SIZE(fiji_mgcg_cgcg_init));
-    amdgpu_program_register_sequence(adev, golden_settings_fiji_a10, ARRAY_SIZE(golden_settings_fiji_a10));
+    amdgpu_device_program_register_sequence(adev, fiji_mgcg_cgcg_init, ARRAY_SIZE(fiji_mgcg_cgcg_init));
+    amdgpu_device_program_register_sequence(adev, golden_settings_fiji_a10, ARRAY_SIZE(golden_settings_fiji_a10));
     break;
   case CHIP_TONGA:
-    amdgpu_program_register_sequence(adev, tonga_mgcg_cgcg_init, ARRAY_SIZE(tonga_mgcg_cgcg_init));
-    amdgpu_program_register_sequence(adev, golden_settings_tonga_a11, ARRAY_SIZE(golden_settings_tonga_a11));
+    amdgpu_device_program_register_sequence(adev, tonga_mgcg_cgcg_init, ARRAY_SIZE(tonga_mgcg_cgcg_init));
+    amdgpu_device_program_register_sequence(adev, golden_settings_tonga_a11, ARRAY_SIZE(golden_settings_tonga_a11));
     break;
   case CHIP_POLARIS11:
-  case CHIP_POLARIS12: amdgpu_program_register_sequence(adev, golden_settings_polaris11_a11, ARRAY_SIZE(golden_settings_polaris11_a11)); break;
-  case CHIP_POLARIS10: amdgpu_program_register_sequence(adev, golden_settings_polaris10_a11, ARRAY_SIZE(golden_settings_polaris10_a11)); break;
-  case CHIP_CARRIZO: amdgpu_program_register_sequence(adev, cz_mgcg_cgcg_init, ARRAY_SIZE(cz_mgcg_cgcg_init)); break;
+  case CHIP_POLARIS12: amdgpu_device_program_register_sequence(adev, golden_settings_polaris11_a11, ARRAY_SIZE(golden_settings_polaris11_a11)); break;
+  case CHIP_POLARIS10: amdgpu_device_program_register_sequence(adev, golden_settings_polaris10_a11, ARRAY_SIZE(golden_settings_polaris10_a11)); break;
+  case CHIP_CARRIZO: amdgpu_device_program_register_sequence(adev, cz_mgcg_cgcg_init, ARRAY_SIZE(cz_mgcg_cgcg_init)); break;
   case CHIP_STONEY:
-    amdgpu_program_register_sequence(adev, stoney_mgcg_cgcg_init, ARRAY_SIZE(stoney_mgcg_cgcg_init));
-    amdgpu_program_register_sequence(adev, golden_settings_stoney_common, ARRAY_SIZE(golden_settings_stoney_common));
+    amdgpu_device_program_register_sequence(adev, stoney_mgcg_cgcg_init, ARRAY_SIZE(stoney_mgcg_cgcg_init));
+    amdgpu_device_program_register_sequence(adev, golden_settings_stoney_common, ARRAY_SIZE(golden_settings_stoney_common));
     break;
   default: break;
   }
 }<sep>@@
expression e1,e2,e3;
@@
- amdgpu_program_register_sequence
+ amdgpu_device_program_register_sequence
  (e1,e2,e3)
--- initial
+++ final
@@ -1,38 +1,38 @@
 static int gmc_v9_0_gart_enable(struct amdgpu_device *adev) {
   int r;
   bool value;
   u32 tmp;
-  amdgpu_program_register_sequence(adev, golden_settings_vega10_hdp, ARRAY_SIZE(golden_settings_vega10_hdp));
+  amdgpu_device_program_register_sequence(adev, golden_settings_vega10_hdp, ARRAY_SIZE(golden_settings_vega10_hdp));
   if (adev->gart.robj == NULL) {
     dev_err(adev->dev, "No VRAM object for PCIE GART.\n");
     return -EINVAL;
   }
   r = amdgpu_gart_table_vram_pin(adev);
   if (r) return r;
   switch (adev->asic_type) {
   case CHIP_RAVEN:
     mmhub_v1_0_initialize_power_gating(adev);
     mmhub_v1_0_update_power_gating(adev, true);
     break;
   default: break;
   }
   r = gfxhub_v1_0_gart_enable(adev);
   if (r) return r;
   r = mmhub_v1_0_gart_enable(adev);
   if (r) return r;
   WREG32_FIELD15(HDP, 0, HDP_MISC_CNTL, FLUSH_INVALIDATE_CACHE, 1);
   tmp = RREG32_SOC15(HDP, 0, mmHDP_HOST_PATH_CNTL);
   WREG32_SOC15(HDP, 0, mmHDP_HOST_PATH_CNTL, tmp);
   /* After HDP is initialized, flush HDP.*/
   adev->nbio_funcs->hdp_flush(adev);
   if (amdgpu_vm_fault_stop == AMDGPU_VM_FAULT_STOP_ALWAYS)
     value = false;
   else
     value = true;
   gfxhub_v1_0_set_fault_enable_default(adev, value);
   mmhub_v1_0_set_fault_enable_default(adev, value);
   gmc_v9_0_gart_flush_gpu_tlb(adev, 0);
   DRM_INFO("PCIE GART of %uM enabled (table at 0x%016llX).\n", (unsigned)(adev->mc.gart_size >> 20), (unsigned long long)adev->gart.table_addr);
   adev->gart.ready = true;
   return 0;
 }<sep>@@
expression e1,e2,e3;
@@
- amdgpu_program_register_sequence
+ amdgpu_device_program_register_sequence
  (e1,e2,e3)
--- initial
+++ final
@@ -1,15 +1,15 @@
 void xgpu_vi_init_golden_registers(struct amdgpu_device *adev) {
   switch (adev->asic_type) {
   case CHIP_FIJI:
-    amdgpu_program_register_sequence(adev, xgpu_fiji_mgcg_cgcg_init, ARRAY_SIZE(xgpu_fiji_mgcg_cgcg_init));
-    amdgpu_program_register_sequence(adev, xgpu_fiji_golden_settings_a10, ARRAY_SIZE(xgpu_fiji_golden_settings_a10));
-    amdgpu_program_register_sequence(adev, xgpu_fiji_golden_common_all, ARRAY_SIZE(xgpu_fiji_golden_common_all));
+    amdgpu_device_program_register_sequence(adev, xgpu_fiji_mgcg_cgcg_init, ARRAY_SIZE(xgpu_fiji_mgcg_cgcg_init));
+    amdgpu_device_program_register_sequence(adev, xgpu_fiji_golden_settings_a10, ARRAY_SIZE(xgpu_fiji_golden_settings_a10));
+    amdgpu_device_program_register_sequence(adev, xgpu_fiji_golden_common_all, ARRAY_SIZE(xgpu_fiji_golden_common_all));
     break;
   case CHIP_TONGA:
-    amdgpu_program_register_sequence(adev, xgpu_tonga_mgcg_cgcg_init, ARRAY_SIZE(xgpu_tonga_mgcg_cgcg_init));
-    amdgpu_program_register_sequence(adev, xgpu_tonga_golden_settings_a11, ARRAY_SIZE(xgpu_tonga_golden_settings_a11));
-    amdgpu_program_register_sequence(adev, xgpu_tonga_golden_common_all, ARRAY_SIZE(xgpu_tonga_golden_common_all));
+    amdgpu_device_program_register_sequence(adev, xgpu_tonga_mgcg_cgcg_init, ARRAY_SIZE(xgpu_tonga_mgcg_cgcg_init));
+    amdgpu_device_program_register_sequence(adev, xgpu_tonga_golden_settings_a11, ARRAY_SIZE(xgpu_tonga_golden_settings_a11));
+    amdgpu_device_program_register_sequence(adev, xgpu_tonga_golden_common_all, ARRAY_SIZE(xgpu_tonga_golden_common_all));
     break;
   default: BUG_ON("Doesn't support chip type.\n"); break;
   }
 }<sep>@@
expression e1,e2,e3;
@@
- amdgpu_program_register_sequence
+ amdgpu_device_program_register_sequence
  (e1,e2,e3)
--- initial
+++ final
@@ -1,9 +1,9 @@
 static void sdma_v2_4_init_golden_registers(struct amdgpu_device *adev) {
   switch (adev->asic_type) {
   case CHIP_TOPAZ:
-    amdgpu_program_register_sequence(adev, iceland_mgcg_cgcg_init, ARRAY_SIZE(iceland_mgcg_cgcg_init));
-    amdgpu_program_register_sequence(adev, golden_settings_iceland_a11, ARRAY_SIZE(golden_settings_iceland_a11));
+    amdgpu_device_program_register_sequence(adev, iceland_mgcg_cgcg_init, ARRAY_SIZE(iceland_mgcg_cgcg_init));
+    amdgpu_device_program_register_sequence(adev, golden_settings_iceland_a11, ARRAY_SIZE(golden_settings_iceland_a11));
     break;
   default: break;
   }
 }<sep>@@
expression e1,e2,e3;
@@
- amdgpu_program_register_sequence
+ amdgpu_device_program_register_sequence
  (e1,e2,e3)
--- initial
+++ final
@@ -1,24 +1,24 @@
 static void sdma_v3_0_init_golden_registers(struct amdgpu_device *adev) {
   switch (adev->asic_type) {
   case CHIP_FIJI:
-    amdgpu_program_register_sequence(adev, fiji_mgcg_cgcg_init, ARRAY_SIZE(fiji_mgcg_cgcg_init));
-    amdgpu_program_register_sequence(adev, golden_settings_fiji_a10, ARRAY_SIZE(golden_settings_fiji_a10));
+    amdgpu_device_program_register_sequence(adev, fiji_mgcg_cgcg_init, ARRAY_SIZE(fiji_mgcg_cgcg_init));
+    amdgpu_device_program_register_sequence(adev, golden_settings_fiji_a10, ARRAY_SIZE(golden_settings_fiji_a10));
     break;
   case CHIP_TONGA:
-    amdgpu_program_register_sequence(adev, tonga_mgcg_cgcg_init, ARRAY_SIZE(tonga_mgcg_cgcg_init));
-    amdgpu_program_register_sequence(adev, golden_settings_tonga_a11, ARRAY_SIZE(golden_settings_tonga_a11));
+    amdgpu_device_program_register_sequence(adev, tonga_mgcg_cgcg_init, ARRAY_SIZE(tonga_mgcg_cgcg_init));
+    amdgpu_device_program_register_sequence(adev, golden_settings_tonga_a11, ARRAY_SIZE(golden_settings_tonga_a11));
     break;
   case CHIP_POLARIS11:
-  case CHIP_POLARIS12: amdgpu_program_register_sequence(adev, golden_settings_polaris11_a11, ARRAY_SIZE(golden_settings_polaris11_a11)); break;
-  case CHIP_POLARIS10: amdgpu_program_register_sequence(adev, golden_settings_polaris10_a11, ARRAY_SIZE(golden_settings_polaris10_a11)); break;
+  case CHIP_POLARIS12: amdgpu_device_program_register_sequence(adev, golden_settings_polaris11_a11, ARRAY_SIZE(golden_settings_polaris11_a11)); break;
+  case CHIP_POLARIS10: amdgpu_device_program_register_sequence(adev, golden_settings_polaris10_a11, ARRAY_SIZE(golden_settings_polaris10_a11)); break;
   case CHIP_CARRIZO:
-    amdgpu_program_register_sequence(adev, cz_mgcg_cgcg_init, ARRAY_SIZE(cz_mgcg_cgcg_init));
-    amdgpu_program_register_sequence(adev, cz_golden_settings_a11, ARRAY_SIZE(cz_golden_settings_a11));
+    amdgpu_device_program_register_sequence(adev, cz_mgcg_cgcg_init, ARRAY_SIZE(cz_mgcg_cgcg_init));
+    amdgpu_device_program_register_sequence(adev, cz_golden_settings_a11, ARRAY_SIZE(cz_golden_settings_a11));
     break;
   case CHIP_STONEY:
-    amdgpu_program_register_sequence(adev, stoney_mgcg_cgcg_init, ARRAY_SIZE(stoney_mgcg_cgcg_init));
-    amdgpu_program_register_sequence(adev, stoney_golden_settings_a11, ARRAY_SIZE(stoney_golden_settings_a11));
+    amdgpu_device_program_register_sequence(adev, stoney_mgcg_cgcg_init, ARRAY_SIZE(stoney_mgcg_cgcg_init));
+    amdgpu_device_program_register_sequence(adev, stoney_golden_settings_a11, ARRAY_SIZE(stoney_golden_settings_a11));
     break;
   default: break;
   }
 }<sep>@@
expression e1,e2,e3;
@@
- amdgpu_program_register_sequence
+ amdgpu_device_program_register_sequence
  (e1,e2,e3)