Skip to content

Commit

Permalink
ip2: init/deinit cleanup
Browse files Browse the repository at this point in the history
Cleanup of module_init/exit:
- mostly whitespace
- remove empty functions
- replace c++ comments
- remove useless prints (module loaded, unloaded)
- mark the calls as __exit and __init
- use break; and return; to save some indent levels after it
- note resource leakage

It's still mess, but now it's readable.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Jiri Slaby authored and Linus Torvalds committed Oct 13, 2008
1 parent 7ccd702 commit f1ddfd9
Show file tree
Hide file tree
Showing 3 changed files with 198 additions and 251 deletions.
32 changes: 0 additions & 32 deletions drivers/char/ip2/i2ellis.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,38 +68,6 @@ static DEFINE_RWLOCK(Dl_spinlock);
// iiInitialize
//=======================================================

//******************************************************************************
// Function: iiEllisInit()
// Parameters: None
//
// Returns: Nothing
//
// Description:
//
// This routine performs any required initialization of the iiEllis subsystem.
//
//******************************************************************************
static void
iiEllisInit(void)
{
}

//******************************************************************************
// Function: iiEllisCleanup()
// Parameters: None
//
// Returns: Nothing
//
// Description:
//
// This routine performs any required cleanup of the iiEllis subsystem.
//
//******************************************************************************
static void
iiEllisCleanup(void)
{
}

//******************************************************************************
// Function: iiSetAddress(pB, address, delay)
// Parameters: pB - pointer to the board structure
Expand Down
2 changes: 0 additions & 2 deletions drivers/char/ip2/i2ellis.h
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,6 @@ typedef void (*delayFunc_t)(unsigned int);
//
// Initialization of a board & structure is in four (five!) parts:
//
// 0) iiEllisInit() - Initialize iiEllis subsystem.
// 1) iiSetAddress() - Define the board address & delay function for a board.
// 2) iiReset() - Reset the board (provided it exists)
// -- Note you may do this to several boards --
Expand All @@ -523,7 +522,6 @@ typedef void (*delayFunc_t)(unsigned int);
// loadware. To change loadware, you must begin again with step 2, resetting
// the board again (step 1 not needed).

static void iiEllisInit(void);
static int iiSetAddress(i2eBordStrPtr, int, delayFunc_t );
static int iiReset(i2eBordStrPtr);
static int iiResetDelay(i2eBordStrPtr);
Expand Down
Loading

0 comments on commit f1ddfd9

Please sign in to comment.