X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=fs%2Fsysfs%2Fsysfs.h;h=93c6d6b27c4ded5596c783ac1bdbe4e4b2590bbd;hb=1137fb670465b6b5d15b9db7d01707a5833ee3ae;hp=a5db496f71c717ce63073440a3c9a23138b67d47;hpb=e4ddcb0a6bf04d53ce77b4eb87bbbb32c4261d11;p=linux-2.6-omap-h63xx.git diff --git a/fs/sysfs/sysfs.h b/fs/sysfs/sysfs.h index a5db496f71c..93c6d6b27c4 100644 --- a/fs/sysfs/sysfs.h +++ b/fs/sysfs/sysfs.h @@ -124,7 +124,7 @@ int sysfs_create_subdir(struct kobject *kobj, const char *name, struct sysfs_dirent **p_sd); void sysfs_remove_subdir(struct sysfs_dirent *sd); -static inline struct sysfs_dirent *sysfs_get(struct sysfs_dirent *sd) +static inline struct sysfs_dirent *__sysfs_get(struct sysfs_dirent *sd) { if (sd) { WARN_ON(!atomic_read(&sd->s_count)); @@ -132,12 +132,14 @@ static inline struct sysfs_dirent *sysfs_get(struct sysfs_dirent *sd) } return sd; } +#define sysfs_get(sd) __sysfs_get(sd) -static inline void sysfs_put(struct sysfs_dirent *sd) +static inline void __sysfs_put(struct sysfs_dirent *sd) { if (sd && atomic_dec_and_test(&sd->s_count)) release_sysfs_dirent(sd); } +#define sysfs_put(sd) __sysfs_put(sd) /* * inode.c