imamnurby/smpl_train_seed8 huggingface dataset:
--- initial
+++ final
@@ -1,8 +1,8 @@
 static void flow_queue_add(struct cake_flow *flow, struct sk_buff *skb) {
   if (!flow->head)
     flow->head = skb;
   else
     flow->tail->next = skb;
   flow->tail = skb;
-  skb->next = NULL;
+  skb_mark_not_on_list(skb);
 }<sep>@@
struct sk_buff *skb;
@@
- skb->next = NULL
+ skb_mark_not_on_list(skb)
--- initial
+++ final
@@ -1,6 +1,6 @@
 static inline struct sk_buff *dequeue_head(struct fq_codel_flow *flow) {
   struct sk_buff *skb = flow->head;
   flow->head = skb->next;
-  skb->next = NULL;
+  skb_mark_not_on_list(skb);
   return skb;
 }<sep>@@
struct sk_buff *skb;
@@
- skb->next = NULL
+ skb_mark_not_on_list(skb)
--- initial
+++ final
@@ -1,8 +1,8 @@
 static inline void flow_queue_add(struct fq_codel_flow *flow, struct sk_buff *skb) {
   if (flow->head == NULL)
     flow->head = skb;
   else
     flow->tail->next = skb;
   flow->tail = skb;
-  skb->next = NULL;
+  skb_mark_not_on_list(skb);
 }<sep>@@
struct sk_buff *skb;
@@
- skb->next = NULL
+ skb_mark_not_on_list(skb)
--- initial
+++ final
@@ -1,33 +1,33 @@
 static void flow_queue_add(struct fq_flow *flow, struct sk_buff *skb) {
   struct sk_buff *prev, *head = flow->head;
-  skb->next = NULL;
+  skb_mark_not_on_list(skb);
   if (!head) {
     flow->head = skb;
     flow->tail = skb;
     return;
   }
   if (likely(!skb_is_retransmit(skb))) {
     flow->tail->next = skb;
     flow->tail = skb;
     return;
   }
   /* This skb is a tcp retransmit,
    * find the last retrans packet in the queue
    */
   prev = NULL;
   while (skb_is_retransmit(head)) {
     prev = head;
     head = head->next;
     if (!head) break;
   }
   if (!prev) { /* no rtx packet in queue, become the new head */
     skb->next = flow->head;
     flow->head = skb;
   } else {
     if (prev == flow->tail)
       flow->tail = skb;
     else
       skb->next = prev->next;
     prev->next = skb;
   }
 }<sep>@@
struct sk_buff *skb;
@@
- skb->next = NULL
+ skb_mark_not_on_list(skb)
--- initial
+++ final
@@ -1,11 +1,11 @@
 static struct sk_buff *fq_dequeue_head(struct Qdisc *sch, struct fq_flow *flow) {
   struct sk_buff *skb = flow->head;
   if (skb) {
     flow->head = skb->next;
-    skb->next = NULL;
+    skb_mark_not_on_list(skb);
     flow->qlen--;
     qdisc_qstats_backlog_dec(sch, skb);
     sch->q.qlen--;
   }
   return skb;
 }<sep>@@
struct sk_buff *skb;
@@
- skb->next = NULL
+ skb_mark_not_on_list(skb)
--- initial
+++ final
@@ -1,12 +1,12 @@
 static void try_bulk_dequeue_skb(struct Qdisc *q, struct sk_buff *skb, const struct netdev_queue *txq, int *packets) {
   int bytelimit = qdisc_avail_bulklimit(txq) - skb->len;
   while (bytelimit > 0) {
     struct sk_buff *nskb = q->dequeue(q);
     if (!nskb) break;
     bytelimit -= nskb->len; /* covers GSO len */
     skb->next = nskb;
     skb = nskb;
     (*packets)++; /* GSO counts as one pkt */
   }
-  skb->next = NULL;
+  skb_mark_not_on_list(skb);
 }<sep>@@
struct sk_buff *skb;
@@
- skb->next = NULL
+ skb_mark_not_on_list(skb)
--- initial
+++ final
@@ -1,17 +1,17 @@
 static void try_bulk_dequeue_skb_slow(struct Qdisc *q, struct sk_buff *skb, int *packets) {
   int mapping = skb_get_queue_mapping(skb);
   struct sk_buff *nskb;
   int cnt = 0;
   do {
     nskb = q->dequeue(q);
     if (!nskb) break;
     if (unlikely(skb_get_queue_mapping(nskb) != mapping)) {
       qdisc_enqueue_skb_bad_txq(q, nskb);
       break;
     }
     skb->next = nskb;
     skb = nskb;
   } while (++cnt < 8);
   (*packets) += cnt;
-  skb->next = NULL;
+  skb_mark_not_on_list(skb);
 }<sep>@@
struct sk_buff *skb;
@@
- skb->next = NULL
+ skb_mark_not_on_list(skb)
--- initial
+++ final
@@ -1,8 +1,8 @@
 static void bucket_add(struct wdrr_bucket *bucket, struct sk_buff *skb) {
   if (bucket->head == NULL)
     bucket->head = skb;
   else
     bucket->tail->next = skb;
   bucket->tail = skb;
-  skb->next = NULL;
+  skb_mark_not_on_list(skb);
 }<sep>@@
struct sk_buff *skb;
@@
- skb->next = NULL
+ skb_mark_not_on_list(skb)
--- initial
+++ final
@@ -1,6 +1,6 @@
 static struct sk_buff *dequeue_head(struct wdrr_bucket *bucket) {
   struct sk_buff *skb = bucket->head;
   bucket->head = skb->next;
-  skb->next = NULL;
+  skb_mark_not_on_list(skb);
   return skb;
 }<sep>@@
struct sk_buff *skb;
@@
- skb->next = NULL
+ skb_mark_not_on_list(skb)
--- initial
+++ final
@@ -1,68 +1,68 @@
 static struct sk_buff *netem_dequeue(struct Qdisc *sch) {
   struct netem_sched_data *q = qdisc_priv(sch);
   struct sk_buff *skb;
   struct rb_node *p;
 tfifo_dequeue:
   skb = __qdisc_dequeue_head(&sch->q);
   if (skb) {
     qdisc_qstats_backlog_dec(sch, skb);
   deliver:
     qdisc_bstats_update(sch, skb);
     return skb;
   }
   p = rb_first(&q->t_root);
   if (p) {
     u64 time_to_send;
     u64 now = ktime_get_ns();
     skb = rb_to_skb(p);
     /* if more time remaining? */
     time_to_send = netem_skb_cb(skb)->time_to_send;
     if (q->slot.slot_next && q->slot.slot_next < time_to_send) get_slot_next(q, now);
     if (time_to_send <= now && q->slot.slot_next <= now) {
       rb_erase(p, &q->t_root);
       sch->q.qlen--;
       qdisc_qstats_backlog_dec(sch, skb);
-      skb->next = NULL;
+      skb_mark_not_on_list(skb);
       skb->prev = NULL;
       /* skb->dev shares skb->rbnode area,
        * we need to restore its value.
        */
       skb->dev = qdisc_dev(sch);
 #ifdef CONFIG_NET_CLS_ACT
       /*
        * If it's at ingress let's pretend the delay is
        * from the network (tstamp will be updated).
        */
       if (skb->tc_redirected && skb->tc_from_ingress) skb->tstamp = 0;
 #endif
       if (q->slot.slot_next) {
         q->slot.packets_left--;
         q->slot.bytes_left -= qdisc_pkt_len(skb);
         if (q->slot.packets_left <= 0 || q->slot.bytes_left <= 0) get_slot_next(q, now);
       }
       if (q->qdisc) {
         unsigned int pkt_len = qdisc_pkt_len(skb);
         struct sk_buff *to_free = NULL;
         int err;
         err = qdisc_enqueue(skb, q->qdisc, &to_free);
         kfree_skb_list(to_free);
         if (err != NET_XMIT_SUCCESS && net_xmit_drop_count(err)) {
           qdisc_qstats_drop(sch);
           qdisc_tree_reduce_backlog(sch, 1, pkt_len);
         }
         goto tfifo_dequeue;
       }
       goto deliver;
     }
     if (q->qdisc) {
       skb = q->qdisc->ops->dequeue(q->qdisc);
       if (skb) goto deliver;
     }
     qdisc_watchdog_schedule_ns(&q->watchdog, max(time_to_send, q->slot.slot_next));
   }
   if (q->qdisc) {
     skb = q->qdisc->ops->dequeue(q->qdisc);
     if (skb) goto deliver;
   }
   return NULL;
 }<sep>@@
struct sk_buff *skb;
@@
- skb->next = NULL
+ skb_mark_not_on_list(skb)
--- initial
+++ final
@@ -1,27 +1,27 @@
 static int tbf_segment(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) {
   struct tbf_sched_data *q = qdisc_priv(sch);
   struct sk_buff *segs, *nskb;
   netdev_features_t features = netif_skb_features(skb);
   unsigned int len = 0, prev_len = qdisc_pkt_len(skb);
   int ret, nb;
   segs = skb_gso_segment(skb, features & ~NETIF_F_GSO_MASK);
   if (IS_ERR_OR_NULL(segs)) return qdisc_drop(skb, sch, to_free);
   nb = 0;
   while (segs) {
     nskb = segs->next;
-    segs->next = NULL;
+    skb_mark_not_on_list(segs);
     qdisc_skb_cb(segs)->pkt_len = segs->len;
     len += segs->len;
     ret = qdisc_enqueue(segs, q->qdisc, to_free);
     if (ret != NET_XMIT_SUCCESS) {
       if (net_xmit_drop_count(ret)) qdisc_qstats_drop(sch);
     } else {
       nb++;
     }
     segs = nskb;
   }
   sch->q.qlen += nb;
   if (nb > 1) qdisc_tree_reduce_backlog(sch, 1 - nb, prev_len - len);
   consume_skb(skb);
   return nb > 0 ? NET_XMIT_SUCCESS : NET_XMIT_DROP;
 }<sep>@@
struct sk_buff *skb;
@@
- skb->next = NULL
+ skb_mark_not_on_list(skb)
--- initial
+++ final
@@ -1,76 +1,76 @@
 struct sk_buff *validate_xmit_xfrm(struct sk_buff *skb, netdev_features_t features, bool *again) {
   int err;
   unsigned long flags;
   struct xfrm_state *x;
   struct sk_buff *skb2;
   struct softnet_data *sd;
   netdev_features_t esp_features = features;
   struct xfrm_offload *xo = xfrm_offload(skb);
   if (!xo) return skb;
   if (!(features & NETIF_F_HW_ESP)) esp_features = features & ~(NETIF_F_SG | NETIF_F_CSUM_MASK);
   x = skb->sp->xvec[skb->sp->len - 1];
   if (xo->flags & XFRM_GRO || x->xso.flags & XFRM_OFFLOAD_INBOUND) return skb;
   local_irq_save(flags);
   sd = this_cpu_ptr(&softnet_data);
   err = !skb_queue_empty(&sd->xfrm_backlog);
   local_irq_restore(flags);
   if (err) {
     *again = true;
     return skb;
   }
   if (skb_is_gso(skb)) {
     struct net_device *dev = skb->dev;
     if (unlikely(x->xso.dev != dev)) {
       struct sk_buff *segs;
       /* Packet got rerouted, fixup features and segment it. */
       esp_features = esp_features & ~(NETIF_F_HW_ESP | NETIF_F_GSO_ESP);
       segs = skb_gso_segment(skb, esp_features);
       if (IS_ERR(segs)) {
         kfree_skb(skb);
         atomic_long_inc(&dev->tx_dropped);
         return NULL;
       } else {
         consume_skb(skb);
         skb = segs;
       }
     }
   }
   if (!skb->next) {
     x->outer_mode->xmit(x, skb);
     xo->flags |= XFRM_DEV_RESUME;
     err = x->type_offload->xmit(x, skb, esp_features);
     if (err) {
       if (err == -EINPROGRESS) return NULL;
       XFRM_INC_STATS(xs_net(x), LINUX_MIB_XFRMOUTSTATEPROTOERROR);
       kfree_skb(skb);
       return NULL;
     }
     skb_push(skb, skb->data - skb_mac_header(skb));
     return skb;
   }
   skb2 = skb;
   do {
     struct sk_buff *nskb = skb2->next;
-    skb2->next = NULL;
+    skb_mark_not_on_list(skb2);
     xo = xfrm_offload(skb2);
     xo->flags |= XFRM_DEV_RESUME;
     x->outer_mode->xmit(x, skb2);
     err = x->type_offload->xmit(x, skb2, esp_features);
     if (!err) {
       skb2->next = nskb;
     } else if (err != -EINPROGRESS) {
       XFRM_INC_STATS(xs_net(x), LINUX_MIB_XFRMOUTSTATEPROTOERROR);
       skb2->next = nskb;
       kfree_skb_list(skb2);
       return NULL;
     } else {
       if (skb == skb2) skb = nskb;
       if (!skb) return NULL;
       goto skip_push;
     }
     skb_push(skb2, skb2->data - skb_mac_header(skb2));
   skip_push:
     skb2 = nskb;
   } while (skb2);
   return skb;
 }<sep>@@
struct sk_buff *skb;
@@
- skb->next = NULL
+ skb_mark_not_on_list(skb)
--- initial
+++ final
@@ -1,21 +1,21 @@
 static int xfrm_output_gso(struct net *net, struct sock *sk, struct sk_buff *skb) {
   struct sk_buff *segs;
   BUILD_BUG_ON(sizeof(*IPCB(skb)) > SKB_SGO_CB_OFFSET);
   BUILD_BUG_ON(sizeof(*IP6CB(skb)) > SKB_SGO_CB_OFFSET);
   segs = skb_gso_segment(skb, 0);
   kfree_skb(skb);
   if (IS_ERR(segs)) return PTR_ERR(segs);
   if (segs == NULL) return -EINVAL;
   do {
     struct sk_buff *nskb = segs->next;
     int err;
-    segs->next = NULL;
+    skb_mark_not_on_list(segs);
     err = xfrm_output2(net, sk, segs);
     if (unlikely(err)) {
       kfree_skb_list(nskb);
       return err;
     }
     segs = nskb;
   } while (segs);
   return 0;
 }<sep>@@
struct sk_buff *skb;
@@
- skb->next = NULL
+ skb_mark_not_on_list(skb)
--- initial
+++ final
@@ -1,33 +1,33 @@
 static int btrfs_encode_fh(struct inode *inode, u32 *fh, int *max_len, struct inode *parent) {
   struct btrfs_fid *fid = (struct btrfs_fid *)fh;
   int len = *max_len;
   int type;
   if (parent && (len < BTRFS_FID_SIZE_CONNECTABLE)) {
     *max_len = BTRFS_FID_SIZE_CONNECTABLE;
     return FILEID_INVALID;
   } else if (len < BTRFS_FID_SIZE_NON_CONNECTABLE) {
     *max_len = BTRFS_FID_SIZE_NON_CONNECTABLE;
     return FILEID_INVALID;
   }
   len = BTRFS_FID_SIZE_NON_CONNECTABLE;
   type = FILEID_BTRFS_WITHOUT_PARENT;
   fid->objectid = btrfs_ino(BTRFS_I(inode));
-  fid->root_objectid = BTRFS_I(inode)->root->objectid;
+  fid->root_objectid = BTRFS_I(inode)->root->root_key.objectid;
   fid->gen = inode->i_generation;
   if (parent) {
     u64 parent_root_id;
     fid->parent_objectid = BTRFS_I(parent)->location.objectid;
     fid->parent_gen = parent->i_generation;
-    parent_root_id = BTRFS_I(parent)->root->objectid;
+    parent_root_id = BTRFS_I(parent)->root->root_key.objectid;
     if (parent_root_id != fid->root_objectid) {
       fid->parent_root_objectid = parent_root_id;
       len = BTRFS_FID_SIZE_CONNECTABLE_ROOT;
       type = FILEID_BTRFS_WITH_PARENT_ROOT;
     } else {
       len = BTRFS_FID_SIZE_CONNECTABLE;
       type = FILEID_BTRFS_WITH_PARENT;
     }
   }
   *max_len = len;
   return type;
 }<sep>@@
expression e;
@@

  BTRFS_I(e)->
- root->objectid
+ root->root_key.objectid
--- initial
+++ final
@@ -1,64 +1,64 @@
 static int btrfs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *dentry) {
   struct btrfs_trans_handle *trans = NULL;
   struct btrfs_root *root = BTRFS_I(dir)->root;
   struct inode *inode = d_inode(old_dentry);
   struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
   u64 index;
   int err;
   int drop_inode = 0;
   /* do not allow sys_link's with other subvols of the same device */
-  if (root->objectid != BTRFS_I(inode)->root->objectid) return -EXDEV;
+  if (root->root_key.objectid != BTRFS_I(inode)->root->root_key.objectid) return -EXDEV;
   if (inode->i_nlink >= BTRFS_LINK_MAX) return -EMLINK;
   err = btrfs_set_inode_index(BTRFS_I(dir), &index);
   if (err) goto fail;
   /*
    * 2 items for inode and inode ref
    * 2 items for dir items
    * 1 item for parent inode
    * 1 item for orphan item deletion if O_TMPFILE
    */
   trans = btrfs_start_transaction(root, inode->i_nlink ? 5 : 6);
   if (IS_ERR(trans)) {
     err = PTR_ERR(trans);
     trans = NULL;
     goto fail;
   }
   /* There are several dir indexes for this inode, clear the cache. */
   BTRFS_I(inode)->dir_index = 0ULL;
   inc_nlink(inode);
   inode_inc_iversion(inode);
   inode->i_ctime = current_time(inode);
   ihold(inode);
   set_bit(BTRFS_INODE_COPY_EVERYTHING, &BTRFS_I(inode)->runtime_flags);
   err = btrfs_add_nondir(trans, BTRFS_I(dir), dentry, BTRFS_I(inode), 1, index);
   if (err) {
     drop_inode = 1;
   } else {
     struct dentry *parent = dentry->d_parent;
     int ret;
     err = btrfs_update_inode(trans, root, inode);
     if (err) goto fail;
     if (inode->i_nlink == 1) {
       /*
        * If new hard link count is 1, it's a file created
        * with open(2) O_TMPFILE flag.
        */
       err = btrfs_orphan_del(trans, BTRFS_I(inode));
       if (err) goto fail;
     }
     d_instantiate(dentry, inode);
     ret = btrfs_log_new_name(trans, BTRFS_I(inode), NULL, parent, true, NULL);
     if (ret == BTRFS_NEED_TRANS_COMMIT) {
       err = btrfs_commit_transaction(trans);
       trans = NULL;
     }
   }
 fail:
   if (trans) btrfs_end_transaction(trans);
   if (drop_inode) {
     inode_dec_link_count(inode);
     iput(inode);
   }
   btrfs_btree_balance_dirty(fs_info);
   return err;
 }<sep>@@
struct btrfs_root *root;
@@

- root->objectid
+ root->root_key.objectid

@@
expression e;
@@

  BTRFS_I(e)->
- root->objectid
+ root->root_key.objectid
--- initial
+++ final
@@ -1,18 +1,18 @@
 static int __btrfs_qgroup_release_data(struct inode *inode, struct extent_changeset *reserved, u64 start, u64 len, int free) {
   struct extent_changeset changeset;
   int trace_op = QGROUP_RELEASE;
   int ret;
   /* In release case, we shouldn't have @reserved */
   WARN_ON(!free && reserved);
   if (free && reserved) return qgroup_free_reserved_data(inode, reserved, start, len);
   extent_changeset_init(&changeset);
   ret = clear_record_extent_bits(&BTRFS_I(inode)->io_tree, start, start + len - 1, EXTENT_QGROUP_RESERVED, &changeset);
   if (ret < 0) goto out;
   if (free) trace_op = QGROUP_FREE;
   trace_btrfs_qgroup_release_data(inode, start, len, changeset.bytes_changed, trace_op);
-  if (free) btrfs_qgroup_free_refroot(BTRFS_I(inode)->root->fs_info, BTRFS_I(inode)->root->objectid, changeset.bytes_changed, BTRFS_QGROUP_RSV_DATA);
+  if (free) btrfs_qgroup_free_refroot(BTRFS_I(inode)->root->fs_info, BTRFS_I(inode)->root->root_key.objectid, changeset.bytes_changed, BTRFS_QGROUP_RSV_DATA);
   ret = changeset.bytes_changed;
 out:
   extent_changeset_release(&changeset);
   return ret;
 }<sep>@@
expression e;
@@

  BTRFS_I(e)->
- root->objectid
+ root->root_key.objectid
--- initial
+++ final
@@ -1,17 +1,17 @@
 void btrfs_qgroup_check_reserved_leak(struct inode *inode) {
   struct extent_changeset changeset;
   struct ulist_node *unode;
   struct ulist_iterator iter;
   int ret;
   extent_changeset_init(&changeset);
   ret = clear_record_extent_bits(&BTRFS_I(inode)->io_tree, 0, (u64)-1, EXTENT_QGROUP_RESERVED, &changeset);
   WARN_ON(ret < 0);
   if (WARN_ON(changeset.bytes_changed)) {
     ULIST_ITER_INIT(&iter);
     while ((unode = ulist_next(&changeset.range_changed, &iter))) {
       btrfs_warn(BTRFS_I(inode)->root->fs_info, "leaking qgroup reserved space, ino: %lu, start: %llu, end: %llu", inode->i_ino, unode->val, unode->aux);
     }
-    btrfs_qgroup_free_refroot(BTRFS_I(inode)->root->fs_info, BTRFS_I(inode)->root->objectid, changeset.bytes_changed, BTRFS_QGROUP_RSV_DATA);
+    btrfs_qgroup_free_refroot(BTRFS_I(inode)->root->fs_info, BTRFS_I(inode)->root->root_key.objectid, changeset.bytes_changed, BTRFS_QGROUP_RSV_DATA);
   }
   extent_changeset_release(&changeset);
 }<sep>@@
expression e;
@@

  BTRFS_I(e)->
- root->objectid
+ root->root_key.objectid
--- initial
+++ final
@@ -1,64 +1,64 @@
 static int ams_delta_init(struct platform_device *pdev) {
   struct nand_chip *this;
   struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
   void __iomem *io_base;
   int err = 0;
   if (!res) return -ENXIO;
   /* Allocate memory for MTD device structure and private data */
   this = kzalloc(sizeof(struct nand_chip), GFP_KERNEL);
   if (!this) {
     pr_warn("Unable to allocate E3 NAND MTD device structure.\n");
     err = -ENOMEM;
     goto out;
   }
   ams_delta_mtd = nand_to_mtd(this);
   ams_delta_mtd->owner = THIS_MODULE;
   /*
    * Don't try to request the memory region from here,
    * it should have been already requested from the
    * gpio-omap driver and requesting it again would fail.
    */
   io_base = ioremap(res->start, resource_size(res));
   if (io_base == NULL) {
     dev_err(&pdev->dev, "ioremap failed\n");
     err = -EIO;
     goto out_free;
   }
   nand_set_controller_data(this, (void *)io_base);
   /* Set address of NAND IO lines */
   this->legacy.IO_ADDR_R = io_base + OMAP_MPUIO_INPUT_LATCH;
   this->legacy.IO_ADDR_W = io_base + OMAP_MPUIO_OUTPUT;
   this->legacy.read_byte = ams_delta_read_byte;
   this->legacy.write_buf = ams_delta_write_buf;
   this->legacy.read_buf = ams_delta_read_buf;
   this->legacy.cmd_ctrl = ams_delta_hwcontrol;
   if (gpio_request(AMS_DELTA_GPIO_PIN_NAND_RB, "nand_rdy") == 0) {
     this->legacy.dev_ready = ams_delta_nand_ready;
   } else {
     this->legacy.dev_ready = NULL;
     pr_notice("Couldn't request gpio for Delta NAND ready.\n");
   }
   /* 25 us command delay time */
-  this->chip_delay = 30;
+  this->legacy.chip_delay = 30;
   this->ecc.mode = NAND_ECC_SOFT;
   this->ecc.algo = NAND_ECC_HAMMING;
   platform_set_drvdata(pdev, io_base);
   /* Set chip enabled, but  */
   err = gpio_request_array(_mandatory_gpio, ARRAY_SIZE(_mandatory_gpio));
   if (err) goto out_gpio;
   /* Scan to find existence of the device */
   err = nand_scan(this, 1);
   if (err) goto out_mtd;
   /* Register the partitions */
   mtd_device_register(ams_delta_mtd, partition_info, ARRAY_SIZE(partition_info));
   goto out;
 out_mtd:
   gpio_free_array(_mandatory_gpio, ARRAY_SIZE(_mandatory_gpio));
 out_gpio:
   gpio_free(AMS_DELTA_GPIO_PIN_NAND_RB);
   iounmap(io_base);
 out_free:
   kfree(this);
 out:
   return err;
 }<sep>@@
struct nand_chip *chip;
@@
- chip->chip_delay
+ chip->legacy.chip_delay
--- initial
+++ final
@@ -1,70 +1,70 @@
 static int au1550nd_probe(struct platform_device *pdev) {
   struct au1550nd_platdata *pd;
   struct au1550nd_ctx *ctx;
   struct nand_chip *this;
   struct mtd_info *mtd;
   struct resource *r;
   int ret, cs;
   pd = dev_get_platdata(&pdev->dev);
   if (!pd) {
     dev_err(&pdev->dev, "missing platform data\n");
     return -ENODEV;
   }
   ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
   if (!ctx) return -ENOMEM;
   r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
   if (!r) {
     dev_err(&pdev->dev, "no NAND memory resource\n");
     ret = -ENODEV;
     goto out1;
   }
   if (request_mem_region(r->start, resource_size(r), "au1550-nand")) {
     dev_err(&pdev->dev, "cannot claim NAND memory area\n");
     ret = -ENOMEM;
     goto out1;
   }
   ctx->base = ioremap_nocache(r->start, 0x1000);
   if (!ctx->base) {
     dev_err(&pdev->dev, "cannot remap NAND memory area\n");
     ret = -ENODEV;
     goto out2;
   }
   this = &ctx->chip;
   mtd = nand_to_mtd(this);
   mtd->dev.parent = &pdev->dev;
   /* figure out which CS# r->start belongs to */
   cs = find_nand_cs(r->start);
   if (cs < 0) {
     dev_err(&pdev->dev, "cannot detect NAND chipselect\n");
     ret = -ENODEV;
     goto out3;
   }
   ctx->cs = cs;
   this->legacy.dev_ready = au1550_device_ready;
   this->select_chip = au1550_select_chip;
   this->legacy.cmdfunc = au1550_command;
   /* 30 us command delay time */
-  this->chip_delay = 30;
+  this->legacy.chip_delay = 30;
   this->ecc.mode = NAND_ECC_SOFT;
   this->ecc.algo = NAND_ECC_HAMMING;
   if (pd->devwidth) this->options |= NAND_BUSWIDTH_16;
   this->legacy.read_byte = (pd->devwidth) ? au_read_byte16 : au_read_byte;
   ctx->write_byte = (pd->devwidth) ? au_write_byte16 : au_write_byte;
   this->legacy.write_buf = (pd->devwidth) ? au_write_buf16 : au_write_buf;
   this->legacy.read_buf = (pd->devwidth) ? au_read_buf16 : au_read_buf;
   ret = nand_scan(this, 1);
   if (ret) {
     dev_err(&pdev->dev, "NAND scan failed with %d\n", ret);
     goto out3;
   }
   mtd_device_register(mtd, pd->parts, pd->num_parts);
   platform_set_drvdata(pdev, ctx);
   return 0;
 out3:
   iounmap(ctx->base);
 out2:
   release_mem_region(r->start, resource_size(r));
 out1:
   kfree(ctx);
   return ret;
 }<sep>@@
struct nand_chip *chip;
@@
- chip->chip_delay
+ chip->legacy.chip_delay
--- initial
+++ final
@@ -1,65 +1,65 @@
 static int __init cmx270_init(void) {
   struct nand_chip *this;
   int ret;
   if (!(machine_is_armcore() && cpu_is_pxa27x())) return -ENODEV;
   ret = gpio_request(GPIO_NAND_CS, "NAND CS");
   if (ret) {
     pr_warn("CM-X270: failed to request NAND CS gpio\n");
     return ret;
   }
   gpio_direction_output(GPIO_NAND_CS, 1);
   ret = gpio_request(GPIO_NAND_RB, "NAND R/B");
   if (ret) {
     pr_warn("CM-X270: failed to request NAND R/B gpio\n");
     goto err_gpio_request;
   }
   gpio_direction_input(GPIO_NAND_RB);
   /* Allocate memory for MTD device structure and private data */
   this = kzalloc(sizeof(struct nand_chip), GFP_KERNEL);
   if (!this) {
     ret = -ENOMEM;
     goto err_kzalloc;
   }
   cmx270_nand_io = ioremap(PXA_CS1_PHYS, 12);
   if (!cmx270_nand_io) {
     pr_debug("Unable to ioremap NAND device\n");
     ret = -EINVAL;
     goto err_ioremap;
   }
   cmx270_nand_mtd = nand_to_mtd(this);
   /* Link the private data with the MTD structure */
   cmx270_nand_mtd->owner = THIS_MODULE;
   /* insert callbacks */
   this->legacy.IO_ADDR_R = cmx270_nand_io;
   this->legacy.IO_ADDR_W = cmx270_nand_io;
   this->legacy.cmd_ctrl = cmx270_hwcontrol;
   this->legacy.dev_ready = cmx270_device_ready;
   /* 15 us command delay time */
-  this->chip_delay = 20;
+  this->legacy.chip_delay = 20;
   this->ecc.mode = NAND_ECC_SOFT;
   this->ecc.algo = NAND_ECC_HAMMING;
   /* read/write functions */
   this->legacy.read_byte = cmx270_read_byte;
   this->legacy.read_buf = cmx270_read_buf;
   this->legacy.write_buf = cmx270_write_buf;
   /* Scan to find existence of the device */
   ret = nand_scan(this, 1);
   if (ret) {
     pr_notice("No NAND device\n");
     goto err_scan;
   }
   /* Register the partitions */
   ret = mtd_device_register(cmx270_nand_mtd, partition_info, NUM_PARTITIONS);
   if (ret) goto err_scan;
   /* Return happy */
   return 0;
 err_scan:
   iounmap(cmx270_nand_io);
 err_ioremap:
   kfree(this);
 err_kzalloc:
   gpio_free(GPIO_NAND_RB);
 err_gpio_request:
   gpio_free(GPIO_NAND_CS);
   return ret;
 }<sep>@@
struct nand_chip *chip;
@@
- chip->chip_delay
+ chip->legacy.chip_delay