Skip to content

Commit

Permalink
dgnc: use linux/types.h instead of dgnc_types.h
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Giedrius Statkevičius authored and Greg Kroah-Hartman committed Mar 24, 2015
1 parent 850b41f commit d533a52
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 39 deletions.
3 changes: 0 additions & 3 deletions drivers/staging/dgnc/dgnc_cls.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#ifndef __DGNC_CLS_H
#define __DGNC_CLS_H

#include "dgnc_types.h"


/************************************************************************
* Per channel/port Classic UART structure *
************************************************************************
Expand Down
5 changes: 2 additions & 3 deletions drivers/staging/dgnc/dgnc_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion drivers/staging/dgnc/dgnc_neo.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#ifndef __DGNC_NEO_H
#define __DGNC_NEO_H

#include "dgnc_types.h"
#include "dgnc_driver.h"

/************************************************************************
Expand Down
10 changes: 5 additions & 5 deletions drivers/staging/dgnc/dgnc_tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@
#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 */
#include <linux/uaccess.h> /* For copy_from_user/copy_to_user */
#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"
Expand Down Expand Up @@ -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;
}

/*
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand All @@ -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);
Expand Down
27 changes: 0 additions & 27 deletions drivers/staging/dgnc/dgnc_types.h

This file was deleted.

0 comments on commit d533a52

Please sign in to comment.