Messages in this thread | | | Date | Wed, 8 Mar 2000 00:27:10 +0100 | From | Jamie Lokier <> | Subject | Re: creating a character driver |
| |
Richard B. Johnson wrote: > NULL, }; /*release*/ > ^_______ Right here. > > Trailing commas are allowed, but not good coding style. I suggest you > fill in all the blanks. There was a recent change in the kernel (six > months ago), that changed the size of this structure. The hack to > get around this, until the size stabilizes, is the trailing comma.
The was an even more recent change in the kernel that changed all the operations structures to use labelled initialisers. The new recommended syntax is this:
static struct file_operations th_fops = { write: th_write, };
Trailing commas are used extensively in the kernel, to avoid typos when cutting and pasting or when using #ifdef. E.g. take a look at mem.c and lp.c.
have a nice day, -- Jamie
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |