On Tue, Jan 3, 2012 at 11:33 AM, Ulf Hansson <ulf.hansson@xxxxxxxxxxxxxx> wrote: > Removing a card "slowly" can trigger a GPIO irq to be raised far > before the card is actually removed. This means the scheduled > detect work will not find out that the card were removed and thus > the card and the block device will not be unregistered. > > Let the mmc_detect_card_removed function trigger a new detect > work immediately when it discovers that a card has been removed. > This will solve the described issue above. Moreover we make sure > the detect work is executed as soon as possible, since there is > no reason for waiting for a "delayed" detect to happen. > > Signed-off-by: Ulf Hansson <ulf.hansson@xxxxxxxxxxxxxx> This looks way more solid than the simple variable. The old detect_change variable does not seem to be protected by any lock either. Acked-by: Linus Walleij <linus.walleij@xxxxxxxxxx> Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html