本文整理汇总了C++中del_mtd_device函数的典型用法代码示例。如果您正苦于以下问题:C++ del_mtd_device函数的具体用法?C++ del_mtd_device怎么用?C++ del_mtd_device使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了del_mtd_device函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: mtd_del_partition
int mtd_del_partition(struct mtd_info *part)
{
if (!part->master)
return -EINVAL;
del_mtd_device(part);
free(part->cdev.partname);
free(part->name);
free(part);
return 0;
}
开发者ID:RobertCNelson,项目名称:barebox,代码行数:13,代码来源:partition.c
示例17: cleanup_dc21285
static void __exit cleanup_dc21285(void)
{
#ifdef CONFIG_MTD_PARTITIONS
if (dc21285_parts) {
del_mtd_partitions(dc21285_mtd);
kfree(dc21285_parts);
} else
#endif
del_mtd_device(dc21285_mtd);
map_destroy(dc21285_mtd);
iounmap((void *)dc21285_map.map_priv_1);
}
开发者ID:BackupTheBerlios,项目名称:tuxap,代码行数:13,代码来源:dc21285.c
示例18: physmap_flash_remove
static int physmap_flash_remove(struct platform_device *dev)
{
struct physmap_flash_info *info;
struct physmap_flash_data *physmap_data;
int i;
info = platform_get_drvdata(dev);
if (info == NULL)
return 0;
platform_set_drvdata(dev, NULL);
physmap_data = dev->dev.platform_data;
if (info->cmtd) {
#ifdef CONFIG_MTD_PARTITIONS
if (info->nr_parts || physmap_data->nr_parts)
del_mtd_partitions(info->cmtd);
else
del_mtd_device(info->cmtd);
#else
del_mtd_device(info->cmtd);
#endif
}
#ifdef CONFIG_MTD_PARTITIONS
if (info->nr_parts)
kfree(info->parts);
#endif
#ifdef CONFIG_MTD_CONCAT
if (info->cmtd != info->mtd[0])
mtd_concat_destroy(info->cmtd);
#endif
for (i = 0; i < MAX_RESOURCES; i++) {
if (info->mtd[i] != NULL)
map_destroy(info->mtd[i]);
}
return 0;
}
开发者ID:PeterDaveHello,项目名称:kernel-pdk7105,代码行数:39,代码来源:physmap.c
示例19: cleanup_mtdram
static void __exit cleanup_mtdram(void)
{
if (mtd_info) {
del_mtd_device(mtd_info);
if (mtd_info->priv)
#if CONFIG_MTDRAM_ABS_POS > 0
iounmap(mtd_info->priv);
#else
vfree(mtd_info->priv);
#endif
kfree(mtd_info);
}
}
开发者ID:zipangotes,项目名称:DSL-G624T_GPL_code,代码行数:13,代码来源:mtdram.c
示例20: physmap_flash_remove
static int physmap_flash_remove(struct platform_device *dev)
{
struct physmap_flash_info *info;
struct physmap_flash_data *physmap_data;
info = platform_get_drvdata(dev);
if (info == NULL)
return 0;
platform_set_drvdata(dev, NULL);
physmap_data = dev->dev.platform_data;
if (info->mtd != NULL) {
#ifdef CONFIG_MTD_PARTITIONS
if (info->nr_parts) {
del_mtd_partitions(info->mtd);
kfree(info->parts);
} else if (physmap_data->nr_parts) {
del_mtd_partitions(info->mtd);
} else {
del_mtd_device(info->mtd);
}
#else
del_mtd_device(info->mtd);
#endif
map_destroy(info->mtd);
}
if (info->map.virt != NULL)
iounmap(info->map.virt);
if (info->res != NULL) {
release_resource(info->res);
kfree(info->res);
}
return 0;
}
开发者ID:Voskrese,项目名称:mipsonqemu,代码行数:38,代码来源:physmap.c
注:本文中的del_mtd_device函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论