MTD devices at the wrong place
Eugene Surovegin
ebs at innocent.com
Fri Nov 1 20:06:15 EST 2002
At 02:53 PM 11/1/2002, JЖrn Engel wrote:
>On Fri, 1 November 2002 14:46:53 -0800, Eugene Surovegin wrote:
> > >> /dev/mtd4 should be c 90 8
> > >
> > >Correction:
> > >/dev/mtd4 *should be* c 90 4, but for historical reasons, it is c 90 8.
> >
> > Well, maybe I missing something, but mtdchar.c:
> >
> > static int mtd_open(struct inode *inode, struct file *file)
> > {
> > int minor = MINOR(inode->i_rdev);
> > int devnum = minor >> 1;
> > struct mtd_info *mtd;
> >
> > ....
> >
> > Notice "minor >> 1".
> >
> > As far as I understand, even numbers are used for rw access, odd - for ro.
>
>Yes, that is the status quo. But that is not, how is *should be*,
>merely how it *is*.
>There is no point in the -ro devices, they only lead to
>misunderstandings like the current one.
OK, I got your point :)). Agreed.
But Anders *should* use "c 90 8" otherwise he have to change code for char
device to not right-shift minor number.
Eugene
More information about the linux-mtd
mailing list