From bec7aa00ffe5b1270837b965fdfe80be3e8e6e2e Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Sun, 29 Dec 2002 03:26:34 -0800 Subject: [PATCH] more module warning fixes this is only for the module-related warning introduced by my __deprecated patch. --- include/linux/mtd/map.h | 5 +---- include/linux/mtd/mtd.h | 3 +-- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'include/linux') diff --git a/include/linux/mtd/map.h b/include/linux/mtd/map.h index 94ffed22315b..ad8dfcbda17d 100644 --- a/include/linux/mtd/map.h +++ b/include/linux/mtd/map.h @@ -81,10 +81,7 @@ static inline void map_destroy(struct mtd_info *mtd) if (map->fldrv->destroy) map->fldrv->destroy(mtd); -#ifdef CONFIG_MODULES - if (map->fldrv->module) - __MOD_DEC_USE_COUNT(map->fldrv->module); -#endif + module_put(map->fldrv->module); kfree(mtd); } diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index ae5bfe3e10fb..52d38241e91e 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h @@ -224,8 +224,7 @@ static inline struct mtd_info *get_mtd_device(struct mtd_info *mtd, int num) static inline void put_mtd_device(struct mtd_info *mtd) { - if (mtd->module) - __MOD_DEC_USE_COUNT(mtd->module); + module_put(mtd->module); } -- cgit v1.2.3