diff options
Diffstat (limited to 'drivers/mtd/chips/chipreg.c')
| -rw-r--r-- | drivers/mtd/chips/chipreg.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/mtd/chips/chipreg.c b/drivers/mtd/chips/chipreg.c index d7d739a108a..0bbc61ba952 100644 --- a/drivers/mtd/chips/chipreg.c +++ b/drivers/mtd/chips/chipreg.c @@ -1,19 +1,15 @@ /* - * $Id: chipreg.c,v 1.17 2004/11/16 18:29:00 dwmw2 Exp $ - * * Registration for chip drivers * */ #include <linux/kernel.h> -#include <linux/config.h> #include <linux/module.h> #include <linux/kmod.h> #include <linux/spinlock.h> #include <linux/slab.h> #include <linux/mtd/map.h> #include <linux/mtd/mtd.h> -#include <linux/mtd/compatmac.h> static DEFINE_SPINLOCK(chip_drvs_lock); static LIST_HEAD(chip_drvs_list); @@ -41,7 +37,7 @@ static struct mtd_chip_driver *get_mtd_chip_driver (const char *name) list_for_each(pos, &chip_drvs_list) { this = list_entry(pos, typeof(*this), list); - + if (!strcmp(this->name, name)) { ret = this; break; @@ -73,17 +69,14 @@ struct mtd_info *do_map_probe(const char *name, struct map_info *map) ret = drv->probe(map); - /* We decrease the use count here. It may have been a + /* We decrease the use count here. It may have been a probe-only module, which is no longer required from this point, having given us a handle on (and increased the use count of) the actual driver code. */ module_put(drv->module); - if (ret) - return ret; - - return NULL; + return ret; } /* * Destroy an MTD device which was created for a map device. |
