From: Johannes Berg Date: Fri, 5 Apr 2013 15:23:05 +0000 (+0200) Subject: backport PDE_DATA for Bluetooth in linux-next X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=50c39d7c5a05fb50798aa481e70d8f36ee9a6231;p=openwrt%2Fstaging%2Fblogic.git backport PDE_DATA for Bluetooth in linux-next This backports "procfs: new helper - PDE_DATA(inode)". Signed-off-by: Johannes Berg --- diff --git a/backport/include/linux/compat-3.10.h b/backport/include/linux/compat-3.10.h index 5bc259b7bf63..2ecb249d39d6 100644 --- a/backport/include/linux/compat-3.10.h +++ b/backport/include/linux/compat-3.10.h @@ -8,6 +8,7 @@ #include #include #include +#include #define sg_page_iter_page LINUX_BACKPORT(sg_page_iter_page) /** @@ -87,6 +88,15 @@ static inline void fb_enable_skip_vt_switch(struct fb_info *info) #define ETH_P_802_3_MIN 0x0600 #endif +/* + * backport of: + * procfs: new helper - PDE_DATA(inode) + */ +static inline void *PDE_DATA(const struct inode *inode) +{ + return PROC_I(inode)->pde->data; +} + #else /* kernel is >= 3.10 */ /* * We'd delete this upstream ever got this, we use our @@ -104,6 +114,7 @@ static inline void fb_enable_skip_vt_switch(struct fb_info *info) { info->skip_vt_switch = true; } + #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)) */ #endif /* LINUX_3_10_COMPAT_H */