/*
 * Unregister a new MMC card with the driver model, and
 * (eventually) free it.
 */
void mmc_remove_card(struct mmc_card *card)
{
#ifdef CONFIG_DEBUG_FS
	mmc_remove_card_debugfs(card);
#endif

	if (mmc_card_present(card)) {
		if (mmc_host_is_spi(card->host)) {
			printk(KERN_INFO "%s: SPI card removed\n",
				mmc_hostname(card->host));
		} else {
			printk(KERN_INFO "%s: card %04x removed\n",
				mmc_hostname(card->host), card->rca);
		}
        
#ifdef CONFIG_HUAWEI_KERNEL
        if(MMC_TYPE_SD  == card->type)
        {
            hw_extern_sdcard_remove();
        }
#endif

		device_del(&card->dev);
	}

	put_device(&card->dev);
}
Exemple #2
0
/*
 * Unregister a new MMC card with the driver model, and
 * (eventually) free it.
 */
void mmc_remove_card(struct mmc_card *card)
{
#ifdef CONFIG_DEBUG_FS
	mmc_remove_card_debugfs(card);
#endif

	if (mmc_card_present(card)) {
		if (mmc_host_is_spi(card->host)) {
			pr_info("%s: SPI card removed\n",
				mmc_hostname(card->host));
		} else {
			pr_info("%s: card %04x removed\n",
				mmc_hostname(card->host), card->rca);
		}
        
        #ifdef CONFIG_HUAWEI_KERNEL
        if(MMC_TYPE_SD  == card->type)
        {
            hw_extern_sdcard_remove();
        }
        #endif

		device_del(&card->dev);
	}

	kfree(card->wr_pack_stats.packing_events);

	put_device(&card->dev);
}