• Guennadi Liakhovetski's avatar
    mmc: sh_mmcif: fix late delayed work initialisation · 5ba85d95
    Guennadi Liakhovetski authored
    If the driver is loaded with a card in the slot, mmc_add_host() will
    schedule an immediate card-detection work, which will start IO and wait
    for command completion. Usually the kernel first returns to the sh_mmcif
    probe function, lets it finish and only then schedules the rescan work.
    But sometimes, expecially under heavy system load, the work will be
    scheduled immediately before returning to the probe method. In this case
    it is important for the driver to be fully prepared for IO. For sh_mmcif
    this means, that also the timeout work has to be initialised before
    calling mmc_add_host(). It is also better to prepare interrupts
    beforehand. Besides, since mmc_add_host() does card-detection itself,
    there is no need to do it again immediately afterwards.
    Signed-off-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
    Signed-off-by: default avatarChris Ball <cjb@laptop.org>
    5ba85d95
sh_mmcif.c 38 KB