-
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17))
- if (tags)
- yaffs_PackTags2(&pt, tags);
+
+
+ addr = ((loff_t) chunkInNAND) * dev->totalBytesPerChunk;
+
+ /* For yaffs2 writing there must be both data and tags.
+ * If we're using inband tags, then the tags are stuffed into
+ * the end of the data buffer.
+ */
+ if(!data || !tags)
+ BUG();
+ else if(dev->inbandTags){
+ yaffs_PackedTags2TagsPart *pt2tp;
+ pt2tp = (yaffs_PackedTags2TagsPart *)(data + dev->nDataBytesPerChunk);
+ yaffs_PackTags2TagsPart(pt2tp,tags);
+ }