mmc: Simplify poll CD logic in case cyclic framework is enabled
authorMarek Vasut <marek.vasut+renesas@mailbox.org>
Sat, 18 Jan 2025 03:09:53 +0000 (04:09 +0100)
committerPeng Fan <peng.fan@nxp.com>
Fri, 11 Apr 2025 03:45:50 +0000 (11:45 +0800)
commit4357167e0e941faa0471325450a30227fafbae24
tree56b4431c0eaf9c640eb4fa98dec91ba8abf715bc
parent53bb8fdea12a346ceda1ac109ebb05d2c9625e5d
mmc: Simplify poll CD logic in case cyclic framework is enabled

Simplify 90cc07fd786d ("mmc: Poll CD in case cyclic framework is enabled")
according to suggestions by Rasmus. The struct cyclic_info is zero-size in
case CONFIG_CYCLIC is not enabled and does not add any size to struct mmc,
so it can unconditionally be part of that structure. This allows clean up
of all the other conditionals in mmc.c which can now be unconditionally
present, as they also add no extra space.

Suggested-by: Rasmus Villemoes <ravi@prevas.dk>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
drivers/mmc/mmc.c
include/mmc.h