mtd: blktrans: remove mtd_blkcore_priv, switch to per device queue and thread

This is the biggest change. To make hotplug possible, and this layer 
clean, the mtd_blktrans_dev now contains everything for a single mtd 
block translation device. Also removed some very old leftovers.

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
This commit is contained in:
Maxim Levitsky 2010-02-22 20:39:29 +02:00 committed by David Woodhouse
commit a863862257
2 changed files with 63 additions and 71 deletions

View file

@ -24,11 +24,13 @@ struct mtd_blktrans_dev {
int devnum;
unsigned long size;
int readonly;
void *blkcore_priv; /* gendisk in 2.5, devfs_handle in 2.4 */
struct gendisk *disk;
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 +62,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);