当前位置: 首页>>代码示例>>C++>>正文


C++ del_mtd_device函数代码示例

本文整理汇总了C++中del_mtd_device函数的典型用法代码示例。如果您正苦于以下问题:C++ del_mtd_device函数的具体用法?C++ del_mtd_device怎么用?C++ del_mtd_device使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了del_mtd_device函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: of_flash_remove

static int of_flash_remove(struct of_device *dev)
{
	struct of_flash *info;
	int i;

	info = dev_get_drvdata(&dev->dev);
	if (!info)
		return 0;
	dev_set_drvdata(&dev->dev, NULL);

#ifdef CONFIG_MTD_CONCAT
	if (info->cmtd != info->list[0].mtd) {
		del_mtd_device(info->cmtd);
		mtd_concat_destroy(info->cmtd);
	}
#endif

	if (info->cmtd) {
		if (OF_FLASH_PARTS(info)) {
			del_mtd_partitions(info->cmtd);
			kfree(OF_FLASH_PARTS(info));
		} else {
			del_mtd_device(info->cmtd);
		}
	}

	for (i = 0; i < info->list_size; i++) {
		if (info->list[i].mtd)
			map_destroy(info->list[i].mtd);

		if (info->list[i].map.virt)
			iounmap(info->list[i].map.virt);

		if (info->list[i].res) {
			release_resource(info->list[i].res);
			kfree(info->list[i].res);
		}
	}

	kfree(info);

	return 0;
}
开发者ID:KaZoom,项目名称:buildroot-linux-kernel-m3,代码行数:43,代码来源:physmap_of.c

示例2: cleanup_brcm_physmap

static void __exit cleanup_brcm_physmap(void)
{
	if (mymtd) {
		del_mtd_device(mymtd);
		map_destroy(mymtd);
	}
	if (brcm_physmap_map.map_priv_1) {
		brcm_physmap_map.map_priv_1 = 0;
	}
}
开发者ID:nhanh0,项目名称:hah,代码行数:10,代码来源:bcm963xx.c

示例3: cleanup_tsunami_flash

static void __exit  cleanup_tsunami_flash(void)
{
	struct mtd_info *mtd;
	mtd = tsunami_flash_mtd;
	if (mtd) {
		del_mtd_device(mtd);
		map_destroy(mtd);
	}
	tsunami_flash_mtd = 0;
}
开发者ID:smx-smx,项目名称:dsl-n55u,代码行数:10,代码来源:tsunami_flash.c

示例4: cleanup_opb_mtd

static void __exit cleanup_opb_mtd(void) {
	if (mtd_bank) {
		del_mtd_device(mtd_bank);
		map_destroy(mtd_bank);
	}
	if (map_bank.virt) {
		iounmap((void *)map_bank.virt);
		map_bank.virt = 0;
	}
}
开发者ID:kennethlyn,项目名称:enclustra_zynq_linux,代码行数:10,代码来源:xilinx-opb-flash.c

示例5: cleanup_dragonix

mod_exit_t cleanup_dragonix(void)
{
	if (mymtd) {
		del_mtd_device(mymtd);
		map_destroy(mymtd);
	}
	if (dragonix_map.map_priv_1) {
		iounmap((void *)dragonix_map.map_priv_1);
		dragonix_map.map_priv_1 = 0;
	}
}
开发者ID:BackupTheBerlios,项目名称:wl530g-svn,代码行数:11,代码来源:dragonix_map.c

示例6: cleanup_s3c2410nor

static void __exit cleanup_s3c2410nor(void)
{
if (mymtd) {
del_mtd_device(mymtd);
map_destroy(mymtd);
}
if (s3c2410nor_map.virt) {
iounmap((void *)s3c2410nor_map.virt);
s3c2410nor_map.virt = 0;
}
}
开发者ID:gatieme,项目名称:LDD-LinuxDeviceDrivers,代码行数:11,代码来源:s3c2410.c

示例7: sflash_mtd_exit

mod_exit_t
sflash_mtd_exit(void)
{
#ifdef CONFIG_MTD_PARTITIONS
	del_mtd_partitions(&sflash.mtd);
#else
	del_mtd_device(&sflash.mtd);
#endif
	iounmap((void *) sflash.cc);
	sb_detach(sflash.sbh);
}
开发者ID:Cribstone,项目名称:linino,代码行数:11,代码来源:sflash.c

示例8: cleanup_physmap

static void __exit cleanup_physmap(void)
{
	if (mymtd) {
		del_mtd_device(mymtd);
		map_destroy(mymtd);
	}
	if (physmap_map.map_priv_1) {
		iounmap((void *)physmap_map.map_priv_1);
		physmap_map.map_priv_1 = 0;
	}
}
开发者ID:nhanh0,项目名称:hah,代码行数:11,代码来源:physmap.c

示例9: cleanup_rpxlite

static void __exit cleanup_rpxlite(void)
{
	if (mymtd) {
		del_mtd_device(mymtd);
		map_destroy(mymtd);
	}
	if (rpxlite_map.virt) {
		iounmap((void *)rpxlite_map.virt);
		rpxlite_map.virt = 0;
	}
}
开发者ID:jameshilliard,项目名称:actiontec_opensrc_mi424wr-rev-ef_fw-20-19-8,代码行数:11,代码来源:rpxlite.c

示例10: unregister_devices

static void unregister_devices(void)
{
	struct ps3vram_priv *priv;

	priv = ps3vram_mtd.priv;
	del_mtd_device(&ps3vram_mtd);
	iounmap(priv->real_base);
	lv1_gpu_memory_free(priv->memory_handle);
	kfree(priv);

	printk(KERN_INFO "ps3vram mtd device unregistered\n");
}
开发者ID:joshdekock,项目名称:jim-ps3,代码行数:12,代码来源:ps3vram.c

示例11: nandemul2k_cleanup

static void __exit nandemul2k_cleanup (void)
{

	nandemul2k_CleanUp();

	/* Unregister partitions */
	del_mtd_partitions(&nandemul2k_mtd);

	/* Unregister the device */
	del_mtd_device (&nandemul2k_mtd);

}
开发者ID:Blackrose,项目名称:yaffs2,代码行数:12,代码来源:nandemul2k.c

示例12: bcm476x_mtd_ram_map_exit

static void __exit bcm476x_mtd_ram_map_exit(void)
{
#ifdef CONFIG_MTD_PARTITIONS
	del_mtd_partitions(bcm476x_mtd_ram);
#else /* CONFIG_MTD_PARTITIONS */
	del_mtd_device(bcm476x_mtd_ram);
#endif

	map_destroy(bcm476x_mtd_ram);
	iounmap((void *)bcm476x_mtd_ram_map.virt);
	bcm476x_mtd_ram_map.virt = 0;
}
开发者ID:kzlin129,项目名称:tt-gpl,代码行数:12,代码来源:bcm476x-mtd-ram.c

示例13: efx_mtd_remove_partition

static void efx_mtd_remove_partition(struct efx_mtd_partition *part)
{
	int rc;

	for (;;) {
		rc = del_mtd_device(&part->mtd);
		if (rc != -EBUSY)
			break;
		ssleep(1);
	}
	WARN_ON(rc);
}
开发者ID:Medvedroid,项目名称:OT_903D-kernel-2.6.35.7,代码行数:12,代码来源:mtd.c

示例14: cleanup_vmax301

static void __exit cleanup_vmax301(void)
{
	int i;

	for (i=0; i<2; i++) {
		if (vmax_mtd[i]) {
			del_mtd_device(vmax_mtd[i]);
			map_destroy(vmax_mtd[i]);
		}
	}
	iounmap((void *)vmax_map[0].map_priv_1 - WINDOW_START);
}
开发者ID:3sOx,项目名称:asuswrt-merlin,代码行数:12,代码来源:vmax301.c

示例15: ubi_destroy_gluebi

/**
 * ubi_destroy_gluebi - close gluebi for an UBI volume.
 * @vol: volume description object
 *
 * This function is called when an UBI volume is removed in order to remove
 * corresponding fake MTD device. Returns zero in case of success and a
 * negative error code in case of failure.
 */
int ubi_destroy_gluebi(struct ubi_volume *vol)
{
	int err;
	struct mtd_info *mtd = &vol->gluebi_mtd;

	dbg_gen("remove mtd%d", mtd->index);
	err = del_mtd_device(mtd);
	if (err)
		return err;
	kfree(mtd->name);
	return 0;
}
开发者ID:johnny,项目名称:CobraDroidBeta,代码行数:20,代码来源:gluebi.c


注:本文中的del_mtd_device函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。