1. 01 Feb, 2010 3 commits
    • Artem Bityutskiy's avatar
      UBI: fix attaching error path · 0bf1c439
      Artem Bityutskiy authored
      In the error path of 'ubi_attach_mtd_dev()' we have a tricky situation:
      we have to release things differently depending on at which point
      the failure happening. Namely, if @ubi->dev is not initialized, we have
      to free everything ourselves. But if it was, we should not free the @ubi
      object, because it will be freed in the 'dev_release()' function. And
      we did not get this situation right.
      
      This patch introduces additional argument to the 'uif_init()' function.
      On exit, this argument indicates whether the final 'free(ubi)' will
      happen in 'dev_release()' or not. So the caller always knows how to
      properly release the resources.
      
      Impact: all memory is now correctly released when UBI fails to attach
              an MTD device.
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      0bf1c439
    • Artem Bityutskiy's avatar
      UBI: support attaching by MTD character device name · f9b0080e
      Artem Bityutskiy authored
      This patch adds a capability to attach MTD devices by their character
      device paths. For example, one can do:
      
      $ modprobe ubi mtd=/dev/mtd0
      
      to attach /dev/mtd0.
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      f9b0080e
    • Artem Bityutskiy's avatar
      UBI: mark few variables as __initdata · 9e0c7ef3
      Artem Bityutskiy authored
      The @mtd_devs and @mtd_dev_param variables are used only during the
      initialization, and all functions that use the variables have
      the __init prefix. This means we can safely mark the variables
      as __initdata, which is a tiny optimization.
      
      Impact: tiny RAM consumption optimization when UBI is used as a kernel
              module.
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      9e0c7ef3
  2. 29 Jan, 2010 2 commits
  3. 28 Jan, 2010 7 commits
  4. 27 Jan, 2010 28 commits