aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mtd/blktrans.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mtd/blktrans.h')
-rw-r--r--include/linux/mtd/blktrans.h31
1 files changed, 24 insertions, 7 deletions
diff --git a/include/linux/mtd/blktrans.h b/include/linux/mtd/blktrans.h
index 8b4aa0523db7..26529ebd59cc 100644
--- a/include/linux/mtd/blktrans.h
+++ b/include/linux/mtd/blktrans.h
@@ -1,7 +1,19 @@
1/* 1/*
2 * (C) 2003 David Woodhouse <dwmw2@infradead.org> 2 * Copyright © 2003-2010 David Woodhouse <dwmw2@infradead.org>
3 * 3 *
4 * Interface to Linux block layer for MTD 'translation layers'. 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
5 * 17 *
6 */ 18 */
7 19
@@ -9,6 +21,8 @@
9#define __MTD_TRANS_H__ 21#define __MTD_TRANS_H__
10 22
11#include <linux/mutex.h> 23#include <linux/mutex.h>
24#include <linux/kref.h>
25#include <linux/sysfs.h>
12 26
13struct hd_geometry; 27struct hd_geometry;
14struct mtd_info; 28struct mtd_info;
@@ -24,11 +38,16 @@ struct mtd_blktrans_dev {
24 int devnum; 38 int devnum;
25 unsigned long size; 39 unsigned long size;
26 int readonly; 40 int readonly;
27 void *blkcore_priv; /* gendisk in 2.5, devfs_handle in 2.4 */ 41 int open;
42 struct kref ref;
43 struct gendisk *disk;
44 struct attribute_group *disk_attributes;
45 struct task_struct *thread;
46 struct request_queue *rq;
47 spinlock_t queue_lock;
48 void *priv;
28}; 49};
29 50
30struct blkcore_priv; /* Differs for 2.4 and 2.5 kernels; private */
31
32struct mtd_blktrans_ops { 51struct mtd_blktrans_ops {
33 char *name; 52 char *name;
34 int major; 53 int major;
@@ -60,8 +79,6 @@ struct mtd_blktrans_ops {
60 struct list_head devs; 79 struct list_head devs;
61 struct list_head list; 80 struct list_head list;
62 struct module *owner; 81 struct module *owner;
63
64 struct mtd_blkcore_priv *blkcore_priv;
65}; 82};
66 83
67extern int register_mtd_blktrans(struct mtd_blktrans_ops *tr); 84extern int register_mtd_blktrans(struct mtd_blktrans_ops *tr);