[PATCH/TRIVIAL] mtd: Use MTD_BLOCK_MAJOR instead of the magic number
Brian Norris
computersforpeace at gmail.com
Tue Oct 8 18:15:21 PDT 2013
On Tue, Oct 8, 2013 at 4:59 PM, Ezequiel Garcia
<ezequiel.garcia at free-electrons.com> wrote:
> Signed-off-by: Ezequiel Garcia <ezequiel.garcia at free-electrons.com>
> ---
> drivers/mtd/mtdblock.c | 2 +-
> drivers/mtd/mtdblock_ro.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mtd/mtdblock.c b/drivers/mtd/mtdblock.c
> index 2aef5dd..53884cc 100644
> --- a/drivers/mtd/mtdblock.c
> +++ b/drivers/mtd/mtdblock.c
> @@ -373,7 +373,7 @@ static void mtdblock_remove_dev(struct mtd_blktrans_dev *dev)
>
> static struct mtd_blktrans_ops mtdblock_tr = {
> .name = "mtdblock",
> - .major = 31,
> + .major = MTD_BLOCK_MAJOR,
> .part_bits = 0,
> .blksize = 512,
> .open = mtdblock_open,
> diff --git a/drivers/mtd/mtdblock_ro.c b/drivers/mtd/mtdblock_ro.c
> index 92759a9..70d27b4 100644
> --- a/drivers/mtd/mtdblock_ro.c
> +++ b/drivers/mtd/mtdblock_ro.c
> @@ -70,7 +70,7 @@ static void mtdblock_remove_dev(struct mtd_blktrans_dev *dev)
>
> static struct mtd_blktrans_ops mtdblock_tr = {
> .name = "mtdblock",
> - .major = 31,
> + .major = MTD_BLOCK_MAJOR,
> .part_bits = 0,
> .blksize = 512,
> .readsect = mtdblock_readsect,
Patch looks good. I'll probably apply soon. Although I might like to
see the following fixed along with it:
Why does MTD_BLOCK_MAJOR (and MTD_CHAR_MAJOR) live in
include/linux/mtd/mtd.h and not include/uapi/linux/major.h?
Brian
More information about the linux-mtd
mailing list