X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=yaffs_fs.c;fp=yaffs_fs.c;h=7b55f1817e3eee43437d6db392acbd2cf18b3145;hp=c3f11f4b81b9bd06ebb0e2c1f605471eb0098c91;hb=dadd2bbe7500ebd8c99868992483aaf7e59d55be;hpb=af1e66bdb6be00b49d8500d01813cb207b930282 diff --git a/yaffs_fs.c b/yaffs_fs.c index c3f11f4..7b55f18 100644 --- a/yaffs_fs.c +++ b/yaffs_fs.c @@ -116,6 +116,12 @@ #define YPROC_ROOT NULL #endif +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26)) +#define Y_INIT_TIMER(a) init_timer(a) +#else +#define Y_INIT_TIMER(a) init_timer_on_stack(a) +#endif + #if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 17)) #define WRITE_SIZE_STR "writesize" #define WRITE_SIZE(mtd) ((mtd)->writesize) @@ -2343,7 +2349,7 @@ static int yaffs_BackgroundThread(void *data) if(time_before(expires,now)) expires = now + HZ; - init_timer_on_stack(&timer); + Y_INIT_TIMER(&timer); timer.expires = expires+1; timer.data = (unsigned long) current; timer.function = yaffs_background_waker;