lkml.org 
[lkml]   [2006]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mtd: fix broken name_to_dev_t() declaration
On Thu, Mar 23, 2006 at 03:46:25PM -0800, Andrew Morton wrote:
> 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.

ah, well, I was not judging the mtd code ...
just fixing an issue which popped up :)

best,
Herbert

-
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/

\
 
 \ /
  Last update: 2006-03-24 00:54    [W:0.060 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site