Skip to content

Commit

Permalink
staging: dgnc: renames board_t to dgnc_board
Browse files Browse the repository at this point in the history
This patch renames the struct board_t to dgnc_board. board_t
wasn't a good name for it since the _t suffix is for typedefs.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Lidza Louina authored and Greg Kroah-Hartman committed Sep 17, 2013
1 parent 538118b commit 03425f5
Show file tree
Hide file tree
Showing 8 changed files with 82 additions and 82 deletions.
14 changes: 7 additions & 7 deletions drivers/staging/dgnc/dgnc_cls.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
#include "dgnc_tty.h"
#include "dgnc_trace.h"

static inline void cls_parse_isr(struct board_t *brd, uint port);
static inline void cls_parse_isr(struct dgnc_board *brd, uint port);
static inline void cls_clear_break(struct channel_t *ch, int force);
static inline void cls_set_cts_flow_control(struct channel_t *ch);
static inline void cls_set_rts_flow_control(struct channel_t *ch);
Expand All @@ -53,7 +53,7 @@ static inline void cls_set_no_output_flow_control(struct channel_t *ch);
static inline void cls_set_no_input_flow_control(struct channel_t *ch);
static void cls_parse_modem(struct channel_t *ch, uchar signals);
static void cls_tasklet(unsigned long data);
static void cls_vpd(struct board_t *brd);
static void cls_vpd(struct dgnc_board *brd);
static void cls_uart_init(struct channel_t *ch);
static void cls_uart_off(struct channel_t *ch);
static int cls_drain(struct tty_struct *tty, uint seconds);
Expand Down Expand Up @@ -393,7 +393,7 @@ static inline void cls_clear_break(struct channel_t *ch, int force)


/* Parse the ISR register for the specific port */
static inline void cls_parse_isr(struct board_t *brd, uint port)
static inline void cls_parse_isr(struct dgnc_board *brd, uint port)
{
struct channel_t *ch;
uchar isr = 0;
Expand Down Expand Up @@ -477,7 +477,7 @@ static void cls_param(struct tty_struct *tty)
uchar uart_ier = 0;
uint baud = 9600;
int quot = 0;
struct board_t *bd;
struct dgnc_board *bd;
struct channel_t *ch;
struct un_t *un;

Expand Down Expand Up @@ -725,7 +725,7 @@ static void cls_param(struct tty_struct *tty)
*/
static void cls_tasklet(unsigned long data)
{
struct board_t *bd = (struct board_t *) data;
struct dgnc_board *bd = (struct dgnc_board *) data;
struct channel_t *ch;
ulong lock_flags;
int i;
Expand Down Expand Up @@ -802,7 +802,7 @@ static void cls_tasklet(unsigned long data)
*/
static irqreturn_t cls_intr(int irq, void *voidbrd)
{
struct board_t *brd = (struct board_t *) voidbrd;
struct dgnc_board *brd = (struct dgnc_board *) voidbrd;
uint i = 0;
uchar poll_reg;
unsigned long lock_flags;
Expand Down Expand Up @@ -1378,7 +1378,7 @@ static void cls_send_immediate_char(struct channel_t *ch, unsigned char c)
writeb(c, &ch->ch_cls_uart->txrx);
}

static void cls_vpd(struct board_t *brd)
static void cls_vpd(struct dgnc_board *brd)
{
ulong vpdbase; /* Start of io base of the card */
u8 __iomem *re_map_vpdbase;/* Remapped memory of the card */
Expand Down
20 changes: 10 additions & 10 deletions drivers/staging/dgnc/dgnc_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,16 @@ PARM_INT(trcbuf_size, 0x100000, 0644, "Debugging trace buffer size.");
*
*/
static int dgnc_start(void);
static int dgnc_finalize_board_init(struct board_t *brd);
static int dgnc_finalize_board_init(struct dgnc_board *brd);
static void dgnc_init_globals(void);
static int dgnc_found_board(struct pci_dev *pdev, int id);
static void dgnc_cleanup_board(struct board_t *brd);
static void dgnc_cleanup_board(struct dgnc_board *brd);
static void dgnc_poll_handler(ulong dummy);
static int dgnc_init_pci(void);
static int dgnc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
static void dgnc_remove_one(struct pci_dev *dev);
static int dgnc_probe1(struct pci_dev *pdev, int card_type);
static void dgnc_do_remap(struct board_t *brd);
static void dgnc_do_remap(struct dgnc_board *brd);

/* Driver load/unload functions */
int dgnc_init_module(void);
Expand All @@ -106,7 +106,7 @@ static struct file_operations dgnc_BoardFops =
* Globals
*/
uint dgnc_NumBoards;
struct board_t *dgnc_Board[MAXBOARDS];
struct dgnc_board *dgnc_Board[MAXBOARDS];
DEFINE_SPINLOCK(dgnc_global_lock);
int dgnc_driver_state = DRIVER_INITIALIZED;
ulong dgnc_poll_counter;
Expand Down Expand Up @@ -418,7 +418,7 @@ void dgnc_cleanup_module(void)
*
* Free all the memory associated with a board
*/
static void dgnc_cleanup_board(struct board_t *brd)
static void dgnc_cleanup_board(struct dgnc_board *brd)
{
int i = 0;

Expand Down Expand Up @@ -491,15 +491,15 @@ static void dgnc_cleanup_board(struct board_t *brd)
*/
static int dgnc_found_board(struct pci_dev *pdev, int id)
{
struct board_t *brd;
struct dgnc_board *brd;
unsigned int pci_irq;
int i = 0;
int rc = 0;
unsigned long flags;

/* get the board structure and prep it */
brd = dgnc_Board[dgnc_NumBoards] =
(struct board_t *) kzalloc(sizeof(struct board_t), GFP_KERNEL);
(struct dgnc_board *) kzalloc(sizeof(struct dgnc_board), GFP_KERNEL);
if (!brd) {
APR(("memory allocation for board structure failed\n"));
return(-ENOMEM);
Expand Down Expand Up @@ -734,7 +734,7 @@ static int dgnc_found_board(struct pci_dev *pdev, int id)
}


static int dgnc_finalize_board_init(struct board_t *brd) {
static int dgnc_finalize_board_init(struct dgnc_board *brd) {
int rc = 0;

DPR_INIT(("dgnc_finalize_board_init() - start\n"));
Expand Down Expand Up @@ -762,7 +762,7 @@ static int dgnc_finalize_board_init(struct board_t *brd) {
/*
* Remap PCI memory.
*/
static void dgnc_do_remap(struct board_t *brd)
static void dgnc_do_remap(struct dgnc_board *brd)
{

if (!brd || brd->magic != DGNC_BOARD_MAGIC)
Expand Down Expand Up @@ -802,7 +802,7 @@ static void dgnc_do_remap(struct board_t *brd)

static void dgnc_poll_handler(ulong dummy)
{
struct board_t *brd;
struct dgnc_board *brd;
unsigned long lock_flags;
int i;
unsigned long new_time;
Expand Down
10 changes: 5 additions & 5 deletions drivers/staging/dgnc/dgnc_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ enum {
*
*************************************************************************/

struct board_t;
struct dgnc_board;
struct channel_t;

/************************************************************************
Expand All @@ -259,7 +259,7 @@ struct board_ops {
void (*uart_off) (struct channel_t *ch);
int (*drain) (struct tty_struct *tty, uint seconds);
void (*param) (struct tty_struct *tty);
void (*vpd) (struct board_t *brd);
void (*vpd) (struct dgnc_board *brd);
void (*assert_modem_signals) (struct channel_t *ch);
void (*flush_uart_write) (struct channel_t *ch);
void (*flush_uart_read) (struct channel_t *ch);
Expand All @@ -282,7 +282,7 @@ struct board_ops {
/*
* Per-board information
*/
struct board_t {
struct dgnc_board {
int magic; /* Board Magic number. */
int boardnum; /* Board number: 0-32 */

Expand Down Expand Up @@ -449,7 +449,7 @@ struct un_t {
************************************************************************/
struct channel_t {
int magic; /* Channel Magic Number */
struct board_t *ch_bd; /* Board structure pointer */
struct dgnc_board *ch_bd; /* Board structure pointer */
struct digi_t ch_digi; /* Transparent Print structure */
struct un_t ch_tun; /* Terminal unit info */
struct un_t ch_pun; /* Printer unit info */
Expand Down Expand Up @@ -555,7 +555,7 @@ extern int dgnc_poll_tick; /* Poll interval - 20 ms */
extern int dgnc_trcbuf_size; /* Size of the ringbuffer */
extern spinlock_t dgnc_global_lock; /* Driver global spinlock */
extern uint dgnc_NumBoards; /* Total number of boards */
extern struct board_t *dgnc_Board[MAXBOARDS]; /* Array of board structs */
extern struct dgnc_board *dgnc_Board[MAXBOARDS]; /* Array of board structs */
extern ulong dgnc_poll_counter; /* Times the poller has run */
extern char *dgnc_state_text[]; /* Array of state text */
extern char *dgnc_driver_state_text[];/* Array of driver state text */
Expand Down
20 changes: 10 additions & 10 deletions drivers/staging/dgnc/dgnc_neo.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
#include "dgnc_tty.h"
#include "dgnc_trace.h"

static inline void neo_parse_lsr(struct board_t *brd, uint port);
static inline void neo_parse_isr(struct board_t *brd, uint port);
static inline void neo_parse_lsr(struct dgnc_board *brd, uint port);
static inline void neo_parse_isr(struct dgnc_board *brd, uint port);
static void neo_copy_data_from_uart_to_queue(struct channel_t *ch);
static inline void neo_clear_break(struct channel_t *ch, int force);
static inline void neo_set_cts_flow_control(struct channel_t *ch);
Expand All @@ -56,7 +56,7 @@ static inline void neo_set_no_input_flow_control(struct channel_t *ch);
static inline void neo_set_new_start_stop_chars(struct channel_t *ch);
static void neo_parse_modem(struct channel_t *ch, uchar signals);
static void neo_tasklet(unsigned long data);
static void neo_vpd(struct board_t *brd);
static void neo_vpd(struct dgnc_board *brd);
static void neo_uart_init(struct channel_t *ch);
static void neo_uart_off(struct channel_t *ch);
static int neo_drain(struct tty_struct *tty, uint seconds);
Expand Down Expand Up @@ -107,7 +107,7 @@ static uint dgnc_offset_table[8] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0
* In this case, we are reading the DVID (Read-only Device Identification)
* value of the Neo card.
*/
static inline void neo_pci_posting_flush(struct board_t *bd)
static inline void neo_pci_posting_flush(struct dgnc_board *bd)
{
readb(bd->re_map_membase + 0x8D);
}
Expand Down Expand Up @@ -411,7 +411,7 @@ static inline void neo_clear_break(struct channel_t *ch, int force)
/*
* Parse the ISR register.
*/
static inline void neo_parse_isr(struct board_t *brd, uint port)
static inline void neo_parse_isr(struct dgnc_board *brd, uint port)
{
struct channel_t *ch;
uchar isr;
Expand Down Expand Up @@ -538,7 +538,7 @@ static inline void neo_parse_isr(struct board_t *brd, uint port)
}


static inline void neo_parse_lsr(struct board_t *brd, uint port)
static inline void neo_parse_lsr(struct dgnc_board *brd, uint port)
{
struct channel_t *ch;
int linestatus;
Expand Down Expand Up @@ -650,7 +650,7 @@ static void neo_param(struct tty_struct *tty)
uchar uart_ier = 0;
uint baud = 9600;
int quot = 0;
struct board_t *bd;
struct dgnc_board *bd;
struct channel_t *ch;
struct un_t *un;

Expand Down Expand Up @@ -911,7 +911,7 @@ static void neo_param(struct tty_struct *tty)
*/
static void neo_tasklet(unsigned long data)
{
struct board_t *bd = (struct board_t *) data;
struct dgnc_board *bd = (struct dgnc_board *) data;
struct channel_t *ch;
ulong lock_flags;
int i;
Expand Down Expand Up @@ -994,7 +994,7 @@ static void neo_tasklet(unsigned long data)
*/
static irqreturn_t neo_intr(int irq, void *voidbrd)
{
struct board_t *brd = (struct board_t *) voidbrd;
struct dgnc_board *brd = (struct dgnc_board *) voidbrd;
struct channel_t *ch;
int port = 0;
int type = 0;
Expand Down Expand Up @@ -1939,7 +1939,7 @@ static unsigned int neo_read_eeprom(unsigned char __iomem *base, unsigned int ad
}


static void neo_vpd(struct board_t *brd)
static void neo_vpd(struct dgnc_board *brd)
{
unsigned int i = 0;
unsigned int a;
Expand Down
Loading

0 comments on commit 03425f5

Please sign in to comment.