On 2013-03-15 16:16, Greg Kroah-Hartman wrote:
On Fri, Mar 15, 2013 at 01:15:33PM +0000, Ian Abbott wrote:
--- a/drivers/staging/comedi/comedidev.h
+++ b/drivers/staging/comedi/comedidev.h
@@ -207,7 +207,7 @@ struct comedi_device {

        const char *board_name;
        const void *board_ptr;
-       int attached;
+       bool attached:1;

I'm not objecting to this, but for some reason I thought that bit fields
could only be a 'unsigned int'.  Or am I just used to C88 or some such
really old spec of the C standard?

It's used elsewhere in the kernel in quite a few places, e.g. in "kernel/printk.c" for the `flushed` member of `static struct cont`.

C99 certainly allows `_Bool` bit-fields (and a `bool` is a `_Bool` in the kernel).

--
-=( Ian Abbott @ MEV Ltd.    E-mail: <[email protected]>        )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

Reply via email to