From 50c39d7c5a05fb50798aa481e70d8f36ee9a6231 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Fri, 5 Apr 2013 17:23:05 +0200 Subject: [PATCH] backport PDE_DATA for Bluetooth in linux-next This backports "procfs: new helper - PDE_DATA(inode)". Signed-off-by: Johannes Berg --- backport/include/linux/compat-3.10.h | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 */ -- 2.30.2