Index: linux-2.6.9/fs/yaffs/yaffs_fs.c
===================================================================
--- linux-2.6.9.orig/fs/yaffs/yaffs_fs.c
+++ linux-2.6.9/fs/yaffs/yaffs_fs.c
@@ -54,13 +54,15 @@
#include <asm/statfs.h>
#define UnlockPage(p) unlock_page(p)
#define Page_Uptodate(page) test_bit(PG_uptodate, &(page)->flags)
-//#define kdevname(x) cdevname(to_kdev_t(x))
-#define kdevname(x) "(unavailable)" // temporary fix
+#define yaffs_devname(sb, buf) bdevname(sb->s_bdev, buf)
#else
#include <linux/locks.h>
+#define BDEVNAME_SIZE 1
+#define yaffs_devname(sb, buf) kdevname(sb->s_dev)
+
#endif
@@ -1301,6 +1303,7 @@
struct inode * inode;
struct dentry * root;
yaffs_Device *dev;
+ char bdevname_buf[BDEVNAME_SIZE];
sb->s_magic = YAFFS_MAGIC;
sb->s_op = &yaffs_super_ops;
@@ -1309,10 +1312,12 @@
printk(KERN_INFO"yaffs: sb is NULL\n");
else if(!sb->s_dev)
printk(KERN_INFO"yaffs: sb->s_dev is NULL\n");
- else if(! kdevname(sb->s_dev))
- printk(KERN_INFO"yaffs: kdevname is NULL\n");
+ else if(! yaffs_devname(sb, bdevname_buf))
+ printk(KERN_INFO"yaffs: yaffs_devname is NULL\n");
else
- printk(KERN_INFO"yaffs: dev is %d name is \"%s\"\n", sb->s_dev, kdevname(sb->s_dev));
+ printk(KERN_INFO"yaffs: dev is %u.%u name is \"%s\"\n",
+ MAJOR(sb->s_dev), MINOR(sb->s_dev),
+ yaffs_devname(sb, bdevname_buf));
@@ -1379,7 +1384,7 @@
struct mtd_info *mtd;
printk(KERN_DEBUG "yaffs: Attempting MTD mount on %u.%u, \"%s\"\n",
- MAJOR(sb->s_dev),MINOR(sb->s_dev),kdevname(sb->s_dev));
+ MAJOR(sb->s_dev),MINOR(sb->s_dev),yaffs_devname(sb, bdevname_buf));
// Check it's an mtd device.....
if(MAJOR(sb->s_dev) != MTD_BLOCK_MAJOR)