Re: [PATCH] mtd: fix broken name_to_dev_t() declaration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Herbert Poetzl <[email protected]> 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux