summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2002-12-29 19:52:11 -0800
committerLinus Torvalds <torvalds@home.transmeta.com>2002-12-29 19:52:11 -0800
commit2cea9523ee55d8bda0b14287d5761c956868572c (patch)
treee87ee6049e318e98c42af0a458502404aa94918b /include
parent32cce74ba349764f1bda932748500232604e960d (diff)
[PATCH] more obsolete module API fixes
completly remove the old try_inc_mod_count()
Diffstat (limited to 'include')
-rw-r--r--include/linux/fs.h10
-rw-r--r--include/linux/module.h1
-rw-r--r--include/linux/mtd/mtd.h5
3 files changed, 3 insertions, 13 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 6c3188b991e6..3fa13b80747d 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -982,15 +982,9 @@ struct super_block *get_sb_pseudo(struct file_system_type *, char *,
/* Alas, no aliases. Too much hassle with bringing module.h everywhere */
#define fops_get(fops) \
- (((fops) && (fops)->owner) \
- ? (try_inc_mod_count((fops)->owner) ? (fops) : NULL) \
- : (fops))
-
+ (((fops) && try_module_get((fops)->owner) ? (fops) : NULL))
#define fops_put(fops) \
-do { \
- if ((fops) && (fops)->owner) \
- module_put((fops)->owner); \
-} while(0)
+ do { if (fops) module_put((fops)->owner); } while(0)
extern int register_filesystem(struct file_system_type *);
extern int unregister_filesystem(struct file_system_type *);
diff --git a/include/linux/module.h b/include/linux/module.h
index ebdfc27efbb8..8e1954a89913 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -357,7 +357,6 @@ static inline void __deprecated _MOD_INC_USE_COUNT(struct module *module)
_MOD_INC_USE_COUNT(THIS_MODULE)
#define MOD_DEC_USE_COUNT \
__MOD_DEC_USE_COUNT(THIS_MODULE)
-#define try_inc_mod_count(mod) try_module_get(mod)
#define EXPORT_NO_SYMBOLS
extern int module_dummy_usage;
#define GET_USE_COUNT(module) (module_dummy_usage)
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index 52d38241e91e..503a715fe014 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -215,10 +215,8 @@ static inline struct mtd_info *get_mtd_device(struct mtd_info *mtd, int num)
struct mtd_info *ret;
ret = __get_mtd_device(mtd, num);
-
- if (ret && ret->module && !try_inc_mod_count(ret->module))
+ if (ret && !try_module_get(ret->module))
return NULL;
-
return ret;
}
@@ -227,7 +225,6 @@ static inline void put_mtd_device(struct mtd_info *mtd)
module_put(mtd->module);
}
-
struct mtd_notifier {
void (*add)(struct mtd_info *mtd);
void (*remove)(struct mtd_info *mtd);