projects
/
yaffs2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
yaffs: Fix compile error in multi-version Linux glue
[yaffs2.git]
/
patches
/
yaffs_linux_allocator.c
diff --git
a/patches/yaffs_linux_allocator.c
b/patches/yaffs_linux_allocator.c
index d0837f8696e946150dff107a90e4238179190be7..395f4eac548953198785806e66c7dd8bf2045d5f 100644
(file)
--- a/
patches/yaffs_linux_allocator.c
+++ b/
patches/yaffs_linux_allocator.c
@@
-42,7
+42,7
@@
typedef struct yaffs_AllocatorStruct yaffs_Allocator;
int mount_id;
int mount_id;
-void yaffs_deinit_raw_tnodes_and_objs(
yaffs_dev_t
*dev)
+void yaffs_deinit_raw_tnodes_and_objs(
struct yaffs_dev
*dev)
{
yaffs_Allocator *allocator = (yaffs_Allocator *)dev->allocator;
{
yaffs_Allocator *allocator = (yaffs_Allocator *)dev->allocator;
@@
-67,7
+67,7
@@
void yaffs_deinit_raw_tnodes_and_objs(yaffs_dev_t *dev)
YBUG();
}
YBUG();
}
-
YFREE
(allocator);
+
kfree
(allocator);
} else {
T(YAFFS_TRACE_ALWAYS,
} else {
T(YAFFS_TRACE_ALWAYS,
@@
-102,10
+102,10
@@
static void (*fake_ctor_list[10]) (void *) = {
fake_ctor9,
};
fake_ctor9,
};
-void yaffs_init_raw_tnodes_and_objs(
yaffs_dev_t
*dev)
+void yaffs_init_raw_tnodes_and_objs(
struct yaffs_dev
*dev)
{
yaffs_Allocator *allocator;
{
yaffs_Allocator *allocator;
- unsigned mount_id =
yaffs_dev_t
o_lc(dev)->mount_id;
+ unsigned mount_id =
struct yaffs_dev
o_lc(dev)->mount_id;
T(YAFFS_TRACE_ALLOCATE,(TSTR("Initialising yaffs allocator\n")));
T(YAFFS_TRACE_ALLOCATE,(TSTR("Initialising yaffs allocator\n")));
@@
-114,7
+114,7
@@
void yaffs_init_raw_tnodes_and_objs(yaffs_dev_t *dev)
else if(mount_id >= 10){
T(YAFFS_TRACE_ALWAYS,(TSTR("Bad mount_id %u\n"),mount_id));
} else {
else if(mount_id >= 10){
T(YAFFS_TRACE_ALWAYS,(TSTR("Bad mount_id %u\n"),mount_id));
} else {
- allocator =
YMALLOC
(sizeof(yaffs_Allocator));
+ allocator =
kmalloc
(sizeof(yaffs_Allocator));
memset(allocator,0,sizeof(yaffs_Allocator));
dev->allocator = allocator;
memset(allocator,0,sizeof(yaffs_Allocator));
dev->allocator = allocator;
@@
-147,7
+147,7
@@
void yaffs_init_raw_tnodes_and_objs(yaffs_dev_t *dev)
allocator->object_cache =
kmem_cache_create(allocator->object_name,
allocator->object_cache =
kmem_cache_create(allocator->object_name,
- sizeof(
yaffs_obj_t
),
+ sizeof(
struct yaffs_obj
),
0, 0,
fake_ctor_list[mount_id]);
0, 0,
fake_ctor_list[mount_id]);
@@
-165,7
+165,7
@@
void yaffs_init_raw_tnodes_and_objs(yaffs_dev_t *dev)
}
}
-
yaffs_tnode_t *yaffs_alloc_raw_tnode(yaffs_dev_t
*dev)
+
struct yaffs_tnode *yaffs_alloc_raw_tnode(struct yaffs_dev
*dev)
{
yaffs_Allocator *allocator = dev->allocator;
if(!allocator || !allocator->tnode_cache){
{
yaffs_Allocator *allocator = dev->allocator;
if(!allocator || !allocator->tnode_cache){
@@
-175,13
+175,13
@@
yaffs_tnode_t *yaffs_alloc_raw_tnode(yaffs_dev_t *dev)
return kmem_cache_alloc(allocator->tnode_cache, GFP_NOFS);
}
return kmem_cache_alloc(allocator->tnode_cache, GFP_NOFS);
}
-void yaffs_free_raw_tnode(
yaffs_dev_t *dev, yaffs_tnode_t
*tn)
+void yaffs_free_raw_tnode(
struct yaffs_dev *dev, struct yaffs_tnode
*tn)
{
yaffs_Allocator *allocator = dev->allocator;
kmem_cache_free(allocator->tnode_cache,tn);
}
{
yaffs_Allocator *allocator = dev->allocator;
kmem_cache_free(allocator->tnode_cache,tn);
}
-
yaffs_obj_t *yaffs_alloc_raw_obj(yaffs_dev_t
*dev)
+
struct yaffs_obj *yaffs_alloc_raw_obj(struct yaffs_dev
*dev)
{
yaffs_Allocator *allocator = dev->allocator;
if(!allocator){
{
yaffs_Allocator *allocator = dev->allocator;
if(!allocator){
@@
-195,7
+195,7
@@
yaffs_obj_t *yaffs_alloc_raw_obj(yaffs_dev_t *dev)
return kmem_cache_alloc(allocator->object_cache, GFP_NOFS);
}
return kmem_cache_alloc(allocator->object_cache, GFP_NOFS);
}
-void yaffs_free_raw_obj(
yaffs_dev_t *dev, yaffs_obj_t
*obj)
+void yaffs_free_raw_obj(
struct yaffs_dev *dev, struct yaffs_obj
*obj)
{
yaffs_Allocator *allocator = dev->allocator;
kmem_cache_free(allocator->object_cache,obj);
{
yaffs_Allocator *allocator = dev->allocator;
kmem_cache_free(allocator->object_cache,obj);