• Daniel Kurtz's avatar
    Input: atmel_mxt_ts - refactor when and how object table is freed · 7d4fa100
    Daniel Kurtz authored
    The Object Table is freed in three cases:
      1) When the driver is being removed.
      2) In the error path of mxt_initialize().
      3) Just after a firmware update, when a new object table is
         about to be read.
    
    For cases 2 & 3, the driver is not immediately unloaded, so this patch
    refactors these cases to use a common cleanup function.  It also refactors
    the mxt_initialize error paths to ensure that this cleanup happens.
    
    Note: mxt_update_fw_store() does not handle errors during mxt_initialize().
    A proposed fix for this is in a subsequent patchset.
    Signed-off-by: default avatarDaniel Kurtz <djkurtz@chromium.org>
    Signed-off-by: default avatarHenrik Rydberg <rydberg@euromail.se>
    7d4fa100
atmel_mxt_ts.c 29 KB