From cde592cbe53fdfbcffb3b5ed01eca35b1b811bb6 Mon Sep 17 00:00:00 2001 From: Andreas Fenkart Date: Tue, 3 Mar 2015 13:28:15 +0100 Subject: [PATCH] mmc: omap_hsmmc: use distinctive code paths for cover / card detect logic Mobile phones (some) have no card detect pin, but can detect if the cover is removed. The purpose is the same; detect if card is being added/removed, but the details differ. When the cover is removed, it does not mean the card is gone. But it might, since it is accessible now. It's like a warning. All the driver does is to limit write access to the card, see protect_card flag. In contrast, card detect notifies us after the fact, e.g. card is gone, card is inserted. We can't take precautions, but we can rely on those events, -- the card is really gone, or do scan the card. To summarize there is not much code sharing between cover and card detect, it only increases confusion. By splitting, both will be simplified in a followup patch. Signed-off-by: Andreas Fenkart Signed-off-by: Ulf Hansson --- Reading git-format-patch failed