diff options
author | Dominik Sliwa <dominik.sliwa@toradex.com> | 2018-09-19 10:40:46 +0200 |
---|---|---|
committer | Dominik Sliwa <dominik.sliwa@toradex.com> | 2018-09-19 10:40:46 +0200 |
commit | 1db97176edf3b4c031c25ad3b6315b1ea593ee9c (patch) | |
tree | 8cc55512588c8bfeea3bf1a9840af8e106b00dd3 /backport-include | |
parent | 781c0004e3f634ba931e588cc5af49f1268a95e5 (diff) |
backports: bluetooth: fix bluetooth debugfs compilation
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Diffstat (limited to 'backport-include')
-rw-r--r-- | backport-include/linux/seq_file.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/backport-include/linux/seq_file.h b/backport-include/linux/seq_file.h index ad1bded..4bb696c 100644 --- a/backport-include/linux/seq_file.h +++ b/backport-include/linux/seq_file.h @@ -48,4 +48,19 @@ void seq_hex_dump(struct seq_file *m, const char *prefix_str, int prefix_type, bool ascii); #endif +#if LINUX_VERSION_IS_LESS(4,16,0) +#define DEFINE_SHOW_ATTRIBUTE(__name) \ +static int __name ## _open(struct inode *inode, struct file *file) \ +{ \ + return single_open(file, __name ## _show, inode->i_private); \ +} \ + \ +static const struct file_operations __name ## _fops = { \ + .owner = THIS_MODULE, \ + .open = __name ## _open, \ + .read = seq_read, \ + .llseek = seq_lseek, \ + .release = single_release, \ +} +#endif #endif /* __BACKPORT_SEQ_FILE_H */ |