Messages in this thread | | | Date | Thu, 23 Mar 2006 15:46:25 -0800 | From | Andrew Morton <> | Subject | Re: [PATCH] mtd: fix broken name_to_dev_t() declaration |
| |
Herbert Poetzl <herbert@13thfloor.at> wrote: > > drivers/mtd/devices/blkmtd.c uses a local declaration > of name_to_dev_t() which is inconsistant with the real > one. the following patch fixes this by removing the > local declaration and including mount.h instead
OK..
Does that name_to_dev_t() call actually work? In my experience, name_to_dev_t() just doesn't work if called at times other than during early boot.
#ifdef MODULE mode = (readonly) ? O_RDONLY : O_RDWR; bdev = open_bdev_excl(devname, mode, NULL); #else mode = (readonly) ? FMODE_READ : FMODE_WRITE; bdev = open_by_devnum(name_to_dev_t(devname), mode); #endif
OK, I guess it still works at initcall-time. Still, the code is a bit, err, innovative.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |