summaryrefslogtreecommitdiff
path: root/drivers/staging/dgnc
diff options
context:
space:
mode:
authorGiedrius Statkevičius <giedrius.statkevicius@gmail.com>2015-03-13 15:56:32 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-24 15:40:59 +0100
commitd533a524a88a278ea3fd1dd279000cb0df0e0014 (patch)
treeeaf0a305a1569d3ff121b5d4b44d70680c708a17 /drivers/staging/dgnc
parent850b41f7ba75aa4fb472eff730061957e42a2372 (diff)
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>
Diffstat (limited to 'drivers/staging/dgnc')
-rw-r--r--drivers/staging/dgnc/dgnc_cls.h3
-rw-r--r--drivers/staging/dgnc/dgnc_driver.h5
-rw-r--r--drivers/staging/dgnc/dgnc_neo.h1
-rw-r--r--drivers/staging/dgnc/dgnc_tty.c10
-rw-r--r--drivers/staging/dgnc/dgnc_types.h27
5 files changed, 7 insertions, 39 deletions
diff --git a/drivers/staging/dgnc/dgnc_cls.h b/drivers/staging/dgnc/dgnc_cls.h
index 2398514e10ec..85042bdf3a5f 100644
--- a/drivers/staging/dgnc/dgnc_cls.h
+++ b/drivers/staging/dgnc/dgnc_cls.h
@@ -16,9 +16,6 @@
#ifndef __DGNC_CLS_H
#define __DGNC_CLS_H
-#include "dgnc_types.h"
-
-
/************************************************************************
* Per channel/port Classic UART structure *
************************************************************************
diff --git a/drivers/staging/dgnc/dgnc_driver.h b/drivers/staging/dgnc/dgnc_driver.h
index 15c4d95cfe07..2bde3b2c359f 100644
--- a/drivers/staging/dgnc/dgnc_driver.h
+++ b/drivers/staging/dgnc/dgnc_driver.h
@@ -25,7 +25,6 @@
#include <linux/tty.h> /* To pick up the various tty structs/defines */
#include <linux/interrupt.h> /* For irqreturn_t type */
-#include "dgnc_types.h" /* Additional types needed by the Digi header files */
#include "digi.h" /* Digi specific ioctl header */
#include "dgnc_kcompat.h" /* Kernel 2.4/2.6 compat includes */
#include "dgnc_sysfs.h" /* Support for SYSFS */
@@ -206,8 +205,8 @@ struct dgnc_board {
struct tty_driver PrintDriver;
char PrintName[200];
- uint dgnc_Major_Serial_Registered;
- uint dgnc_Major_TransparentPrint_Registered;
+ bool dgnc_Major_Serial_Registered;
+ bool dgnc_Major_TransparentPrint_Registered;
uint dgnc_Serial_Major;
uint dgnc_TransparentPrint_Major;
diff --git a/drivers/staging/dgnc/dgnc_neo.h b/drivers/staging/dgnc/dgnc_neo.h
index d7e764a307b9..c528df5a0e5a 100644
--- a/drivers/staging/dgnc/dgnc_neo.h
+++ b/drivers/staging/dgnc/dgnc_neo.h
@@ -16,7 +16,6 @@
#ifndef __DGNC_NEO_H
#define __DGNC_NEO_H
-#include "dgnc_types.h"
#include "dgnc_driver.h"
/************************************************************************
diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
index d7a19d8c8c75..ce4187f60cb4 100644
--- a/drivers/staging/dgnc/dgnc_tty.c
+++ b/drivers/staging/dgnc/dgnc_tty.c
@@ -29,6 +29,7 @@
#include <linux/ctype.h>
#include <linux/tty.h>
#include <linux/tty_flip.h>
+#include <linux/types.h>
#include <linux/serial_reg.h>
#include <linux/slab.h>
#include <linux/delay.h> /* For udelay */
@@ -36,7 +37,6 @@
#include <linux/pci.h>
#include "dgnc_driver.h"
#include "dgnc_tty.h"
-#include "dgnc_types.h"
#include "dgnc_neo.h"
#include "dgnc_cls.h"
#include "dgnc_sysfs.h"
@@ -220,7 +220,7 @@ int dgnc_tty_register(struct dgnc_board *brd)
"Can't register tty device (%d)\n", rc);
return rc;
}
- brd->dgnc_Major_Serial_Registered = TRUE;
+ brd->dgnc_Major_Serial_Registered = true;
}
/*
@@ -270,7 +270,7 @@ int dgnc_tty_register(struct dgnc_board *brd)
rc);
return rc;
}
- brd->dgnc_Major_TransparentPrint_Registered = TRUE;
+ brd->dgnc_Major_TransparentPrint_Registered = true;
}
dgnc_BoardsByMajor[brd->SerialDriver.major] = brd;
@@ -408,7 +408,7 @@ void dgnc_tty_uninit(struct dgnc_board *brd)
tty_unregister_device(&brd->SerialDriver, i);
}
tty_unregister_driver(&brd->SerialDriver);
- brd->dgnc_Major_Serial_Registered = FALSE;
+ brd->dgnc_Major_Serial_Registered = false;
}
if (brd->dgnc_Major_TransparentPrint_Registered) {
@@ -419,7 +419,7 @@ void dgnc_tty_uninit(struct dgnc_board *brd)
tty_unregister_device(&brd->PrintDriver, i);
}
tty_unregister_driver(&brd->PrintDriver);
- brd->dgnc_Major_TransparentPrint_Registered = FALSE;
+ brd->dgnc_Major_TransparentPrint_Registered = false;
}
kfree(brd->SerialDriver.ttys);
diff --git a/drivers/staging/dgnc/dgnc_types.h b/drivers/staging/dgnc/dgnc_types.h
deleted file mode 100644
index 2853d164e51e..000000000000
--- a/drivers/staging/dgnc/dgnc_types.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2003 Digi International (www.digi.com)
- * Scott H Kilau <Scott_Kilau at digi dot com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY, EXPRESS OR IMPLIED; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU General Public License for more details.
- */
-
-#ifndef __DGNC_TYPES_H
-#define __DGNC_TYPES_H
-
-#ifndef TRUE
-# define TRUE 1
-#endif
-
-#ifndef FALSE
-# define FALSE 0
-#endif
-
-#endif