Chinaunix首页 | 论坛 | 博客
  • 博客访问: 15309899
  • 博文数量: 2005
  • 博客积分: 11986
  • 博客等级: 上将
  • 技术积分: 22535
  • 用 户 组: 普通用户
  • 注册时间: 2007-05-17 13:56
文章分类

全部博文(2005)

文章存档

2014年(2)

2013年(2)

2012年(16)

2011年(66)

2010年(368)

2009年(743)

2008年(491)

2007年(317)

分类: LINUX

2009-02-05 13:02:34

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口进行重新检卡操作了.
阅读(3510) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~