05 Apr, 2013

3 commits

  • The MTD subsystem has historically tried to be as configurable as possible. The
    side-effect of this is that its configuration menu is rather large, and we are
    gradually shrinking it. For example, we recently merged partitions support with
    the mtdcore.

    This patch does the next step - it merges the mtdchar module to mtdcore. And in
    this case this is not only about eliminating too fine-grained separation and
    simplifying the configuration menu. This is also about eliminating seemingly
    useless kernel module.

    Indeed, mtdchar is a module that allows user-space making use of MTD devices
    via /dev/mtd* character devices. If users do not enable it, they simply cannot
    use MTD devices at all. They cannot read or write the flash contents. Is it a
    sane and useful setup? I believe not. And everyone just enables mtdchar.

    Having mtdchar separate is also a little bit harmful. People sometimes miss the
    fact that they need to enable an additional configuration option to have
    user-space MTD interfaces, and then they wonder why on earth the kernel does
    not allow using the flash? They spend time asking around.

    Thus, let's just get rid of this module and make it part of mtd core.

    Note, mtdchar had additional configuration option to enable OTP interfaces,
    which are present on some flashes. I removed that option as well - it saves a
    really tiny amount space.

    [dwmw2: Strictly speaking, you can mount file systems on MTD devices just
    fine without the mtdchar (or mtdblock) devices; you just can't do
    other manipulations directly on the underlying device. But still I
    agree that it makes sense to make this unconditional. And Yay! we
    get to kill off an instance of checking CONFIG_foo_MODULE, which is
    an abomination that should never happen.]

    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Artem Bityutskiy
     
  • Remove useless extern qualifiers. Not that this is a problem, but we more often
    declare function prototypes without 'extern', so this is just about being more
    consistent. And I am going to add a couple more prototypes here.

    Additionally, remove a useless comment.

    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Artem Bityutskiy
     
  • 'mtd_device_parse_register()' and 'parse_mtd_partitions()' functions accept a
    an array of character pointers. These functions modify neither the pointers nor
    the characters they point to. The characters are actually names of the MTD
    parsers.

    At the moment, the argument type is 'const char **', which means that only the
    names of the parsers are constant. Let's turn the argument type into 'const
    char * const *', which means that both names and the pointers which point to
    them are constant.

    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Artem Bityutskiy
     

11 Sep, 2011

1 commit

  • There is no need to export parse_mtd_partitions() now , as it's fully handled
    by registration functions. So move the definition to private header and
    remove respective EXPORT_SYMBOL_GPL.

    Signed-off-by: Dmitry Eremin-Solenikov
    Signed-off-by: Artem Bityutskiy

    Dmitry Eremin-Solenikov
     

25 May, 2011

1 commit


25 Feb, 2010

2 commits