Message ID | 20100406224109.2937.65315.stgit@mj.roinet.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
diff --git a/include/linux/compat-2.6.27.h b/include/linux/compat-2.6.27.h index e27115b..d667222 100644 --- a/include/linux/compat-2.6.27.h +++ b/include/linux/compat-2.6.27.h @@ -228,6 +228,14 @@ static inline void debugfs_remove_recursive(struct dentry *dentry) { } #endif +#define device_create(cls, parent, devt, drvdata, fmt, ...) \ +({ \ + struct device *_dev; \ + _dev = (device_create)(cls, parent, devt, fmt, __VA_ARGS__); \ + dev_set_drvdata(_dev, drvdata); \ + _dev; \ +}) + #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)) */ #endif /* LINUX_26_27_COMPAT_H */