本文整理汇总了C++中del_mtd_partitions函数的典型用法代码示例。如果您正苦于以下问题:C++ del_mtd_partitions函数的具体用法?C++ del_mtd_partitions怎么用?C++ del_mtd_partitions使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了del_mtd_partitions函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: bast_flash_remove
static int bast_flash_remove(struct platform_device *pdev)
{
struct bast_flash_info *info = platform_get_drvdata(pdev);
platform_set_drvdata(pdev, NULL);
if (info == NULL)
return 0;
if (info->map.virt != NULL)
iounmap(info->map.virt);
if (info->mtd) {
del_mtd_partitions(info->mtd);
map_destroy(info->mtd);
}
kfree(info->partitions);
if (info->area) {
release_resource(info->area);
kfree(info->area);
}
kfree(info);
return 0;
}
示例2: s3c6410_nand_exit
static void s3c6410_nand_exit(void)
{
del_mtd_partitions(s3c_mtd);
kfree(s3c_mtd);
kfree(s3c_nand);
iounmap(s3c_nand_regs);
}
示例3: of_flash_remove
static int of_flash_remove(struct of_device *dev)
{
struct of_flash *info;
info = dev_get_drvdata(&dev->dev);
if (!info)
return 0;
dev_set_drvdata(&dev->dev, NULL);
if (info->mtd) {
if (OF_FLASH_PARTS(info)) {
del_mtd_partitions(info->mtd);
kfree(OF_FLASH_PARTS(info));
} else {
del_mtd_device(info->mtd);
}
map_destroy(info->mtd);
}
if (info->map.virt)
iounmap(info->map.virt);
if (info->res) {
release_resource(info->res);
kfree(info->res);
}
return 0;
}
示例4: armadillo_mtd_remove
static int __devexit
armadillo_mtd_remove(struct platform_device *pdev)
{
struct armadillo_flash_info *info = platform_get_drvdata(pdev);
platform_set_drvdata(pdev, NULL);
if (info) {
if (info->mtd) {
del_mtd_partitions(info->mtd);
map_destroy(info->mtd);
}
if (info->parts)
kfree(info->parts);
release_resource(info->res);
kfree(info->res);
if (info->plat && info->plat->exit)
info->plat->exit();
kfree(info);
}
return 0;
}
示例5: of_physmap_remove
static int of_physmap_remove(struct of_device *dev)
{
struct physmap_flash_info *info;
info = dev_get_drvdata(&dev->dev);
if (info == NULL)
return 0;
dev_set_drvdata(&dev->dev, NULL);
if (info->mtd != NULL) {
#ifdef CONFIG_MTD_PARTITIONS
if (info->nr_parts) {
del_mtd_partitions(info->mtd);
kfree(info->parts);
} 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;
}
示例6: txx9ndfmc_remove
static int __exit txx9ndfmc_remove(struct platform_device *dev)
{
struct txx9ndfmc_drvdata *drvdata = platform_get_drvdata(dev);
int i;
platform_set_drvdata(dev, NULL);
if (!drvdata)
return 0;
for (i = 0; i < MAX_TXX9NDFMC_DEV; i++) {
struct mtd_info *mtd = drvdata->mtds[i];
struct nand_chip *chip;
struct txx9ndfmc_priv *txx9_priv;
if (!mtd)
continue;
chip = mtd->priv;
txx9_priv = chip->priv;
#ifdef CONFIG_MTD_PARTITIONS
del_mtd_partitions(mtd);
kfree(drvdata->parts[i]);
#endif
del_mtd_device(mtd);
kfree(txx9_priv->mtdname);
kfree(txx9_priv);
}
return 0;
}
示例7: armflash_cfi_exit
static void armflash_cfi_exit(void)
{
if (mtd) {
del_mtd_partitions(mtd);
map_destroy(mtd);
}
}
示例8: pb1xxx_mtd_cleanup
static void __exit pb1xxx_mtd_cleanup(void)
{
if (pb1xxx_mtd) {
del_mtd_partitions(pb1xxx_mtd);
map_destroy(pb1xxx_mtd);
iounmap((void *) pb1xxx_mtd_map.virt);
}
}
示例9: cleanup_dnpc
static void __exit cleanup_dnpc(void)
{
if(merged_mtd) {
del_mtd_partitions(merged_mtd);
mtd_concat_destroy(merged_mtd);
}
if (mymtd) {
del_mtd_partitions(mymtd);
map_destroy(mymtd);
}
if (dnpc_map.virt) {
iounmap(dnpc_map.virt);
dnpc_unmap_flash();
dnpc_map.virt = NULL;
}
}
示例10: lart_flash_exit
void __exit lart_flash_exit (void)
{
#ifndef HAVE_PARTITIONS
del_mtd_device (&mtd);
#else
del_mtd_partitions (&mtd);
#endif
}
示例11: alchemy_mtd_cleanup
static void __exit alchemy_mtd_cleanup(void)
{
if (mymtd) {
del_mtd_partitions(mymtd);
map_destroy(mymtd);
iounmap(alchemy_map.virt);
}
}
示例12: cleanup_mpc1211_maps
static void __exit cleanup_mpc1211_maps(void)
{
if (parsed_parts)
del_mtd_partitions(flash_mtd);
else
del_mtd_device(flash_mtd);
map_destroy(flash_mtd);
}
示例13: db1550_mtd_cleanup
static void __exit db1550_mtd_cleanup(void)
{
if (mymtd) {
del_mtd_partitions(mymtd);
map_destroy(mymtd);
iounmap((void *) db1550_map.virt);
}
}
示例14: omap_toto_mtd_cleanup
static void __exit omap_toto_mtd_cleanup(void)
{
if (flash_mtd) {
del_mtd_partitions(flash_mtd);
map_destroy(flash_mtd);
kfree(parsed_parts);
}
}
示例15: nflash_mtd_exit
static void __exit
nflash_mtd_exit(void)
{
#ifdef CONFIG_MTD_PARTITIONS
del_mtd_partitions(&nflash.mtd);
#else
del_mtd_device(&nflash.mtd);
#endif
}