• Andreas Bombe's avatar
    m68k: amiflop - Get rid of sleep_on calls · 6d0be946
    Andreas Bombe authored
    Apart from sleep_on() calls that could be easily converted to
    wait_event() and completion calls amiflop also used a flag in ms_delay()
    and ms_isr() as a custom mutex for ms_delay() without a need for
    explicit unlocking.  I converted that to a standard mutex.
    
    The replacement for the unconditional sleep_on() in fd_motor_on() is a
    complete_all() together with a INIT_COMPLETION() before the mod_timer()
    call.  It appears to me that fd_motor_on() might be called concurrently
    and fd_select() does not guarantee mutual exclusivity in the case the
    same drive gets selected again.
    Signed-off-by: default avatarAndreas Bombe <aeb@debian.org>
    Acked-by: default avatarJörg Dorchain <joerg@dorchain.net>
    Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
    6d0be946
amiflop.c 46.2 KB