Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dgnc: use linux/types.h instead of dgnc_types.h

Dgnc_types.h unnecesarily defines TRUE as 1 and FALSE as 0 because we
already have a widely used linux/types.h so convert all TRUE to true,
FALSE to false and edit the dgnc_board struct to make sure it uses
"bool".

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Giedrius Statkevičius and committed by
Greg Kroah-Hartman
d533a524 850b41f7

+7 -39
-3
drivers/staging/dgnc/dgnc_cls.h
··· 16 16 #ifndef __DGNC_CLS_H 17 17 #define __DGNC_CLS_H 18 18 19 - #include "dgnc_types.h" 20 - 21 - 22 19 /************************************************************************ 23 20 * Per channel/port Classic UART structure * 24 21 ************************************************************************
+2 -3
drivers/staging/dgnc/dgnc_driver.h
··· 25 25 #include <linux/tty.h> /* To pick up the various tty structs/defines */ 26 26 #include <linux/interrupt.h> /* For irqreturn_t type */ 27 27 28 - #include "dgnc_types.h" /* Additional types needed by the Digi header files */ 29 28 #include "digi.h" /* Digi specific ioctl header */ 30 29 #include "dgnc_kcompat.h" /* Kernel 2.4/2.6 compat includes */ 31 30 #include "dgnc_sysfs.h" /* Support for SYSFS */ ··· 205 206 struct tty_driver PrintDriver; 206 207 char PrintName[200]; 207 208 208 - uint dgnc_Major_Serial_Registered; 209 - uint dgnc_Major_TransparentPrint_Registered; 209 + bool dgnc_Major_Serial_Registered; 210 + bool dgnc_Major_TransparentPrint_Registered; 210 211 211 212 uint dgnc_Serial_Major; 212 213 uint dgnc_TransparentPrint_Major;
-1
drivers/staging/dgnc/dgnc_neo.h
··· 16 16 #ifndef __DGNC_NEO_H 17 17 #define __DGNC_NEO_H 18 18 19 - #include "dgnc_types.h" 20 19 #include "dgnc_driver.h" 21 20 22 21 /************************************************************************
+5 -5
drivers/staging/dgnc/dgnc_tty.c
··· 29 29 #include <linux/ctype.h> 30 30 #include <linux/tty.h> 31 31 #include <linux/tty_flip.h> 32 + #include <linux/types.h> 32 33 #include <linux/serial_reg.h> 33 34 #include <linux/slab.h> 34 35 #include <linux/delay.h> /* For udelay */ ··· 37 36 #include <linux/pci.h> 38 37 #include "dgnc_driver.h" 39 38 #include "dgnc_tty.h" 40 - #include "dgnc_types.h" 41 39 #include "dgnc_neo.h" 42 40 #include "dgnc_cls.h" 43 41 #include "dgnc_sysfs.h" ··· 220 220 "Can't register tty device (%d)\n", rc); 221 221 return rc; 222 222 } 223 - brd->dgnc_Major_Serial_Registered = TRUE; 223 + brd->dgnc_Major_Serial_Registered = true; 224 224 } 225 225 226 226 /* ··· 270 270 rc); 271 271 return rc; 272 272 } 273 - brd->dgnc_Major_TransparentPrint_Registered = TRUE; 273 + brd->dgnc_Major_TransparentPrint_Registered = true; 274 274 } 275 275 276 276 dgnc_BoardsByMajor[brd->SerialDriver.major] = brd; ··· 408 408 tty_unregister_device(&brd->SerialDriver, i); 409 409 } 410 410 tty_unregister_driver(&brd->SerialDriver); 411 - brd->dgnc_Major_Serial_Registered = FALSE; 411 + brd->dgnc_Major_Serial_Registered = false; 412 412 } 413 413 414 414 if (brd->dgnc_Major_TransparentPrint_Registered) { ··· 419 419 tty_unregister_device(&brd->PrintDriver, i); 420 420 } 421 421 tty_unregister_driver(&brd->PrintDriver); 422 - brd->dgnc_Major_TransparentPrint_Registered = FALSE; 422 + brd->dgnc_Major_TransparentPrint_Registered = false; 423 423 } 424 424 425 425 kfree(brd->SerialDriver.ttys);
-27
drivers/staging/dgnc/dgnc_types.h
··· 1 - /* 2 - * Copyright 2003 Digi International (www.digi.com) 3 - * Scott H Kilau <Scott_Kilau at digi dot com> 4 - * 5 - * This program is free software; you can redistribute it and/or modify 6 - * it under the terms of the GNU General Public License as published by 7 - * the Free Software Foundation; either version 2, or (at your option) 8 - * any later version. 9 - * 10 - * This program is distributed in the hope that it will be useful, 11 - * but WITHOUT ANY WARRANTY, EXPRESS OR IMPLIED; without even the 12 - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 13 - * PURPOSE. See the GNU General Public License for more details. 14 - */ 15 - 16 - #ifndef __DGNC_TYPES_H 17 - #define __DGNC_TYPES_H 18 - 19 - #ifndef TRUE 20 - # define TRUE 1 21 - #endif 22 - 23 - #ifndef FALSE 24 - # define FALSE 0 25 - #endif 26 - 27 - #endif