6 #include <linux/kernel.h>
7 #include <linux/module.h>
10 #include <linux/slab.h>
19 spin_lock(&chip_drvs_lock);
20 list_add(&drv->
list, &chip_drvs_list);
21 spin_unlock(&chip_drvs_lock);
26 spin_lock(&chip_drvs_lock);
28 spin_unlock(&chip_drvs_lock);
36 spin_lock(&chip_drvs_lock);
41 if (!
strcmp(this->name, name)) {
46 if (ret && !try_module_get(ret->
module))
49 spin_unlock(&chip_drvs_lock);
62 drv = get_mtd_chip_driver(name);
64 if (!drv && !request_module(
"%s", name))
65 drv = get_mtd_chip_driver(name);
70 ret = drv->
probe(map);
89 if (map->
fldrv->destroy)
90 map->
fldrv->destroy(mtd);
92 module_put(map->
fldrv->module);