Arve Hjønnevåg | 8237911 | 2010-05-18 20:35:30 -0700 | [diff] [blame] | 1 | /* |
| 2 | * YAFFS: Yet another Flash File System . A NAND-flash specific file system. |
| 3 | * |
| 4 | * Copyright (C) 2002-2010 Aleph One Ltd. |
| 5 | * for Toby Churchill Ltd and Brightstar Engineering |
| 6 | * |
| 7 | * Created by Charles Manning <charles@aleph1.co.uk> |
| 8 | * |
| 9 | * This program is free software; you can redistribute it and/or modify |
| 10 | * it under the terms of the GNU Lesser General Public License version 2.1 as |
| 11 | * published by the Free Software Foundation. |
| 12 | * |
| 13 | * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL. |
| 14 | */ |
| 15 | |
| 16 | #ifndef __YAFFS_LINUX_H__ |
| 17 | #define __YAFFS_LINUX_H__ |
| 18 | |
| 19 | #include "yportenv.h" |
| 20 | |
| 21 | struct yaffs_linux_context { |
| 22 | struct list_head context_list; /* List of these we have mounted */ |
| 23 | struct yaffs_dev *dev; |
| 24 | struct super_block *super; |
| 25 | struct task_struct *bg_thread; /* Background thread for this device */ |
| 26 | int bg_running; |
| 27 | struct mutex gross_lock; /* Gross locking mutex*/ |
| 28 | u8 *spare_buffer; /* For mtdif2 use. Don't know the size of the buffer |
| 29 | * at compile time so we have to allocate it. |
| 30 | */ |
| 31 | struct list_head search_contexts; |
| 32 | void (*put_super_fn) (struct super_block * sb); |
| 33 | |
| 34 | struct task_struct *readdir_process; |
| 35 | unsigned mount_id; |
| 36 | }; |
| 37 | |
| 38 | #define yaffs_dev_to_lc(dev) ((struct yaffs_linux_context *)((dev)->os_context)) |
| 39 | #define yaffs_dev_to_mtd(dev) ((struct mtd_info *)((dev)->driver_context)) |
| 40 | |
| 41 | #endif |