本文整理汇总了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;
}
示例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;
}
}
示例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;
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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);
}
示例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;
}
}
示例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;
}
}
示例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");
}
示例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);
}
示例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;
}
示例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);
}
示例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);
}
示例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;
}