• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /****************************************************************************
2  ****************************************************************************
3  ***
4  ***   This header was automatically generated from a Linux kernel header
5  ***   of the same name, to make information necessary for userspace to
6  ***   call into the kernel available to libc.  It contains only constants,
7  ***   structures, and macros generated from the original header, and thus,
8  ***   contains no copyrightable information.
9  ***
10  ****************************************************************************
11  ****************************************************************************/
12 #ifndef __MTD_TRANS_H__
13 #define __MTD_TRANS_H__
14 
15 #include <linux/mutex.h>
16 
17 struct hd_geometry;
18 struct mtd_info;
19 struct mtd_blktrans_ops;
20 struct file;
21 struct inode;
22 
23 struct mtd_blktrans_dev {
24  struct mtd_blktrans_ops *tr;
25  struct list_head list;
26  struct mtd_info *mtd;
27  struct mutex lock;
28  int devnum;
29  int blksize;
30  unsigned long size;
31  int readonly;
32  void *blkcore_priv;
33 };
34 
35 struct blkcore_priv;
36 
37 struct mtd_blktrans_ops {
38  char *name;
39  int major;
40  int part_bits;
41 
42  int (*readsect)(struct mtd_blktrans_dev *dev,
43  unsigned long block, char *buffer);
44  int (*writesect)(struct mtd_blktrans_dev *dev,
45  unsigned long block, char *buffer);
46 
47  int (*getgeo)(struct mtd_blktrans_dev *dev, struct hd_geometry *geo);
48  int (*flush)(struct mtd_blktrans_dev *dev);
49 
50  int (*open)(struct mtd_blktrans_dev *dev);
51  int (*release)(struct mtd_blktrans_dev *dev);
52 
53  void (*add_mtd)(struct mtd_blktrans_ops *tr, struct mtd_info *mtd);
54  void (*remove_dev)(struct mtd_blktrans_dev *dev);
55 
56  struct list_head devs;
57  struct list_head list;
58  struct module *owner;
59 
60  struct mtd_blkcore_priv *blkcore_priv;
61 };
62 
63 #endif
64