serial: refactor ASYNC_ flags
Define ASYNCB_* flags which are bit numbers of the ASYNC_* flags.
This is useful for {test,set,clear}_bit.
Also convert each ASYNC_% to be (1 << ASYNCB_%) and define masks
with the macros, not constants.
Tested with:
#include "PATH_TO_KERNEL/include/linux/serial.h"
static struct {
unsigned int new, old;
} as[] = {
{ ASYNC_HUP_NOTIFY, 0x0001 },
{ ASYNC_FOURPORT, 0x0002 },
...
{ ASYNC_BOOT_ONLYMCA, 0x00400000 },
{ ASYNC_INTERNAL_FLAGS, 0xFFC00000 }
};
...
for (a = 0; a < ARRAY_SIZE(as); a++)
if (as[a].old != as[a].new)
printf("%.8x != %.8x\n", as[a].old, as[a].new);
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>