EXPORT_SYMBOL(mmc_detect_change);
mmc_detect_change
==>mmc_schedule_delayed_work(&host->detect, delay);
==>host->detect就是mmc_rescan
INIT_DELAYED_WORK(&host->detect, mmc_rescan);
==>mmc_rescan
==>host->bus_ops->detect(host);//就是mmc_sdio_detect
==>static const struct mmc_bus_ops mmc_sdio_ops.detect = mmc_sdio_detect;
==>mmc_sdio_detect //如果发现卡已经拔走,那么执行
==>mmc_sdio_remove(host);//删除/sys/目录下的文件,同时释放kmalloc到的内存.
==>mmc_detach_bus
==>mmc_bus_put
if ((host->bus_refs == 0) && host->bus_ops)
__mmc_release_bus(host);
==>__mmc_release_bus
==>host->bus_ops = NULL;//这样mmc_rescan的时候,就可以执行对mmc口进行重新检卡操作了.
阅读(3578) | 评论(0) | 转发(1) |