.. | .. |
---|
37 | 37 | |
---|
38 | 38 | #include <linux/export.h> |
---|
39 | 39 | |
---|
40 | | -#define DEFINE_SIMPLE_DEBUGFS_FILE(name) \ |
---|
41 | | -static int name##_open(struct inode *inode, struct file *file) \ |
---|
42 | | -{ \ |
---|
43 | | - return single_open(file, name##_show, inode->i_private); \ |
---|
44 | | -} \ |
---|
45 | | -static const struct file_operations name##_debugfs_fops = { \ |
---|
46 | | - .owner = THIS_MODULE, \ |
---|
47 | | - .open = name##_open, \ |
---|
48 | | - .read = seq_read, \ |
---|
49 | | - .llseek = seq_lseek, \ |
---|
50 | | - .release = single_release \ |
---|
51 | | -} |
---|
52 | | - |
---|
53 | 40 | struct t4_debugfs_entry { |
---|
54 | 41 | const char *name; |
---|
55 | 42 | const struct file_operations *ops; |
---|
.. | .. |
---|
62 | 49 | unsigned int rows; /* # of entries */ |
---|
63 | 50 | unsigned char width; /* size in bytes of each entry */ |
---|
64 | 51 | unsigned char skip_first; /* whether the first line is a header */ |
---|
65 | | - char data[0]; /* the table data */ |
---|
| 52 | + char data[]; /* the table data */ |
---|
66 | 53 | }; |
---|
67 | 54 | |
---|
68 | 55 | static inline unsigned int hex2val(char c) |
---|