]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - include/linux/mtd/blktrans.h
mtd: Update copyright notices
[net-next-2.6.git] / include / linux / mtd / blktrans.h
index 8b4aa0523db76d22f821d07037e36bdcf2eb62be..26529ebd59ccf3872fddca921c141184915fcf62 100644 (file)
@@ -1,7 +1,19 @@
 /*
- * (C) 2003 David Woodhouse <dwmw2@infradead.org>
+ * Copyright © 2003-2010 David Woodhouse <dwmw2@infradead.org>
  *
- * Interface to Linux block layer for MTD 'translation layers'.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  *
  */
 
@@ -9,6 +21,8 @@
 #define __MTD_TRANS_H__
 
 #include <linux/mutex.h>
+#include <linux/kref.h>
+#include <linux/sysfs.h>
 
 struct hd_geometry;
 struct mtd_info;
@@ -24,11 +38,16 @@ struct mtd_blktrans_dev {
        int devnum;
        unsigned long size;
        int readonly;
-       void *blkcore_priv; /* gendisk in 2.5, devfs_handle in 2.4 */
+       int open;
+       struct kref ref;
+       struct gendisk *disk;
+       struct attribute_group *disk_attributes;
+       struct task_struct *thread;
+       struct request_queue *rq;
+       spinlock_t queue_lock;
+       void *priv;
 };
 
-struct blkcore_priv; /* Differs for 2.4 and 2.5 kernels; private */
-
 struct mtd_blktrans_ops {
        char *name;
        int major;
@@ -60,8 +79,6 @@ struct mtd_blktrans_ops {
        struct list_head devs;
        struct list_head list;
        struct module *owner;
-
-       struct mtd_blkcore_priv *blkcore_priv;
 };
 
 extern int register_mtd_blktrans(struct mtd_blktrans_ops *tr);