From: "Giedrius Statkevičius" <giedrius.statkevicius@gmail.com>
To: lidza.louina@gmail.com, markh@compro.net
Cc: gregkh@linuxfoundation.org,
driverdev-devel@linuxdriverproject.org,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
"Giedrius Statkevičius" <giedrius.statkevicius@gmail.com>
Subject: [PATCH 3/6] dgnc: convert TRUE/FALSE #defines to 1/0
Date: Thu, 12 Mar 2015 20:14:25 +0200 [thread overview]
Message-ID: <1426184068-5772-3-git-send-email-giedrius.statkevicius@gmail.com> (raw)
In-Reply-To: <1426184068-5772-1-git-send-email-giedrius.statkevicius@gmail.com>
TRUE/FALSE defined in dgnc_types.h are only used in dgnc_tty.c thus it
would be better to just use 1/0 to avoid unnecessary extra files and
includes.
Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
---
drivers/staging/dgnc/dgnc_cls.h | 3 ---
drivers/staging/dgnc/dgnc_driver.h | 1 -
drivers/staging/dgnc/dgnc_neo.h | 1 -
drivers/staging/dgnc/dgnc_tty.c | 9 ++++-----
drivers/staging/dgnc/dgnc_types.h | 27 ---------------------------
5 files changed, 4 insertions(+), 37 deletions(-)
delete mode 100644 drivers/staging/dgnc/dgnc_types.h
diff --git a/drivers/staging/dgnc/dgnc_cls.h b/drivers/staging/dgnc/dgnc_cls.h
index 2398514..85042bd 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 15c4d95..f28329d 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 */
diff --git a/drivers/staging/dgnc/dgnc_neo.h b/drivers/staging/dgnc/dgnc_neo.h
index d7e764a..c528df5 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 1085d4c..f8f9374 100644
--- a/drivers/staging/dgnc/dgnc_tty.c
+++ b/drivers/staging/dgnc/dgnc_tty.c
@@ -36,7 +36,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 +219,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 = 1;
}
/*
@@ -270,7 +269,7 @@ int dgnc_tty_register(struct dgnc_board *brd)
rc);
return rc;
}
- brd->dgnc_Major_TransparentPrint_Registered = TRUE;
+ brd->dgnc_Major_TransparentPrint_Registered = 1;
}
dgnc_BoardsByMajor[brd->SerialDriver.major] = brd;
@@ -408,7 +407,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 = 0;
}
if (brd->dgnc_Major_TransparentPrint_Registered) {
@@ -419,7 +418,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 = 0;
}
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 2853d16..0000000
--- 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
--
2.3.2
next prev parent reply other threads:[~2015-03-12 18:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-12 18:14 [PATCH 1/6] dgnc: clean up digi.h Giedrius Statkevičius
2015-03-12 18:14 ` [PATCH 2/6] dgnc: get rid of dpacompat.h, move remaining stuff to digi.h Giedrius Statkevičius
2015-03-12 18:14 ` Giedrius Statkevičius [this message]
2015-03-12 18:59 ` [PATCH 3/6] dgnc: convert TRUE/FALSE #defines to 1/0 Dan Carpenter
2015-03-12 19:18 ` Giedrius Statkevičius
2015-03-12 18:14 ` [PATCH 4/6] dgnc: remove old 2.4-2.6 compat kernel defines Giedrius Statkevičius
2015-03-12 18:14 ` [PATCH 5/6] dgnc: remove unused stuff from dgnc_cls.h Giedrius Statkevičius
2015-03-12 18:14 ` [PATCH 6/6] dgnc: Clean up dgnc_sysfs.h Giedrius Statkevičius
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1426184068-5772-3-git-send-email-giedrius.statkevicius@gmail.com \
--to=giedrius.statkevicius@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=driverdev-devel@linuxdriverproject.org \
--cc=gregkh@linuxfoundation.org \
--cc=lidza.louina@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=markh@compro.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome