Lines Matching +full:mtd +full:- +full:name
1 // SPDX-License-Identifier: GPL-2.0-only
12 #include <linux/mtd/map.h>
13 #include <linux/mtd/mtd.h>
21 list_add(&drv->list, &chip_drvs_list); in register_mtd_chip_driver()
28 list_del(&drv->list); in unregister_mtd_chip_driver()
32 static struct mtd_chip_driver *get_mtd_chip_driver (const char *name) in get_mtd_chip_driver() argument
39 if (!strcmp(this->name, name)) { in get_mtd_chip_driver()
44 if (ret && !try_module_get(ret->module)) in get_mtd_chip_driver()
55 struct mtd_info *do_map_probe(const char *name, struct map_info *map) in do_map_probe() argument
60 drv = get_mtd_chip_driver(name); in do_map_probe()
62 if (!drv && !request_module("%s", name)) in do_map_probe()
63 drv = get_mtd_chip_driver(name); in do_map_probe()
68 ret = drv->probe(map); in do_map_probe()
71 probe-only module, which is no longer required from this in do_map_probe()
75 module_put(drv->module); in do_map_probe()
80 * Destroy an MTD device which was created for a map device.
81 * Make sure the MTD device is already unregistered before calling this
83 void map_destroy(struct mtd_info *mtd) in map_destroy() argument
85 struct map_info *map = mtd->priv; in map_destroy()
87 if (map->fldrv->destroy) in map_destroy()
88 map->fldrv->destroy(mtd); in map_destroy()
90 module_put(map->fldrv->module); in map_destroy()
92 kfree(mtd); in map_destroy()
102 MODULE_DESCRIPTION("Core routines for registering and invoking MTD chip drivers");