- /* Release resources, unregister device */
- nand_release (autcpu12_mtd);
+ struct nand_chip *this = (struct nand_chip *) &autcpu12_mtd[1];
+
+ /* Unregister partitions */
+ del_mtd_partitions(autcpu12_mtd);
+
+ /* Unregister the device */
+ del_mtd_device (autcpu12_mtd);
+
+ /* Free internal data buffers */
+ kfree (this->data_buf);