Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mmc: tmio: Remove redundant check of mmc->slot.cd_irq

To validate whether native hotplug needs to be used, the tmio driver checks
whether the mmc->slot.cd_irq has been successfully assigned.

This check is redundant at its current place in tmio_mmc_host_probe(), as
the mmc core assigns mmc->slot.cd_irq a valid value first when
mmc_gpiod_request_cd_irq() is called. Therefore, let's just remove the
check for now, as that also removes a layering violation of the tmio driver
accessing core specific data via ->slot.cd_irq.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

+1 -2
+1 -2
drivers/mmc/host/tmio_mmc_pio.c
··· 1175 1175 1176 1176 _host->native_hotplug = !(pdata->flags & TMIO_MMC_USE_GPIO_CD || 1177 1177 mmc->caps & MMC_CAP_NEEDS_POLL || 1178 - !mmc_card_is_removable(mmc) || 1179 - mmc->slot.cd_irq >= 0); 1178 + !mmc_card_is_removable(mmc)); 1180 1179 1181 1180 /* 1182 1181 * On Gen2+, eMMC with NONREMOVABLE currently fails because native