@@ -796,4 +796,8 @@ static inline int snd_ctl_enum_info(struct snd_ctl_elem_info *info, unsigned int
#define usleep_range(min, max) msleep(min/1000)
#endif
+#if NEED_IS_ERR_OR_NULL
+#define IS_ERR_OR_NULL(ptr) (!(ptr) || IS_ERR_VALUE((unsigned long)(ptr)))
+#endif
+
#endif /* _COMPAT_H */
@@ -492,6 +492,7 @@ sub check_other_dependencies()
check_file_for_func("include/sound/control.h", "snd_ctl_enum_info", "NEED_SND_CTL_ENUM_INFO");
check_file_for_func("include/linux/sysfs.h", "sysfs_attr_init", "NEED_SYSFS_ATTR_INIT");
check_file_for_func("include/linux/delay.h", "usleep_range", "NEED_USLEEP_RANGE");
+ check_file_for_func("include/linux/err.h", "IS_ERR_OR_NULL", "NEED_IS_ERR_OR_NULL");
}
# Do the basic rules