get rid of old cruft: remove args argument from the modules' init() routines

This commit is contained in:
marschap
2005-07-02 13:38:51 +00:00
parent 32545c99a2
commit 0ec83bdc66
63 changed files with 77 additions and 84 deletions
+1 -1
View File
@@ -53,7 +53,7 @@ API_VERSION in the code.
All these Basic functions should be implemented ! All these Basic functions should be implemented !
int (*init) (drvthis, char *args); int (*init) (drvthis);
void (*close) (drvthis); void (*close) (drvthis);
int (*width) (drvthis); int (*width) (drvthis);
int (*height) (drvthis); int (*height) (drvthis);
+3 -3
View File
@@ -89,12 +89,12 @@ static int driver_store_private_ptr(Driver * driver, void * private_data);
Driver * Driver *
driver_load( char * name, char * filename, char * args ) driver_load( char * name, char * filename )
{ {
Driver * driver = NULL; Driver * driver = NULL;
int res; int res;
report( RPT_DEBUG, "%s( name=\"%.40s\", filename=\"%.80s\", args=\"%.80s\")", __FUNCTION__, name, filename, args ); report( RPT_DEBUG, "%s( name=\"%.40s\", filename=\"%.80s\")", __FUNCTION__, name, filename );
/* Allocate memory for new driver struct */ /* Allocate memory for new driver struct */
driver = malloc( sizeof( Driver )); driver = malloc( sizeof( Driver ));
@@ -127,7 +127,7 @@ driver_load( char * name, char * filename, char * args )
/* Call the init function */ /* Call the init function */
debug( RPT_DEBUG, "%s: Calling driver [%.40s] init function", __FUNCTION__, driver->name ); debug( RPT_DEBUG, "%s: Calling driver [%.40s] init function", __FUNCTION__, driver->name );
res = driver->init( driver, args ); res = driver->init( driver );
if( res < 0 ) { if( res < 0 ) {
report( RPT_ERR, "Driver [%.40s] init failed, return code < 0", driver->name ); report( RPT_ERR, "Driver [%.40s] init failed, return code < 0", driver->name );
/* Driver load failed, driver should not be added to list /* Driver load failed, driver should not be added to list
+1 -1
View File
@@ -21,7 +21,7 @@
#endif #endif
Driver * Driver *
driver_load( char * name, char * filename, char * args ); driver_load( char * name, char * filename );
int int
driver_unload( Driver * driver ); driver_unload( Driver * driver );
+1 -8
View File
@@ -46,7 +46,6 @@ drivers_load_driver( char * name )
char * s; char * s;
char * driverpath; char * driverpath;
char * filename; char * filename;
char * args;
debug( RPT_DEBUG, "%s( name=\"%.40s\")", __FUNCTION__, name ); debug( RPT_DEBUG, "%s( name=\"%.40s\")", __FUNCTION__, name );
@@ -77,18 +76,13 @@ drivers_load_driver( char * name )
strcat( filename, MODULE_EXTENSION ); strcat( filename, MODULE_EXTENSION );
} }
s = config_get_string( name, "arguments", 0, "" );
args = malloc( strlen(s)+1 );
strcpy( args, s );
/* Load the module */ /* Load the module */
driver = driver_load( name, filename, args ); driver = driver_load( name, filename );
if( driver == NULL ) { if( driver == NULL ) {
/* It failed. The message has already been given by driver_load() */ /* It failed. The message has already been given by driver_load() */
report( RPT_INFO, "Module %.40s could not be loaded", filename ); report( RPT_INFO, "Module %.40s could not be loaded", filename );
free( driverpath ); free( driverpath );
free( filename ); free( filename );
free( args );
return -1; return -1;
} }
@@ -97,7 +91,6 @@ drivers_load_driver( char * name )
free( driverpath ); free( driverpath );
free( filename ); free( filename );
free( args );
/* If first driver, store display properties */ /* If first driver, store display properties */
if( driver_does_output(driver) && !display_props ) { if( driver_does_output(driver) && !display_props ) {
+2 -2
View File
@@ -107,7 +107,7 @@ static void CFontz_init_hbar (Driver *drvthis);
// Opens com port and sets baud correctly... // Opens com port and sets baud correctly...
// //
MODULE_EXPORT int MODULE_EXPORT int
CFontz_init (Driver *drvthis, char *args) CFontz_init (Driver *drvthis)
{ {
struct termios portset; struct termios portset;
int tmp, w, h; int tmp, w, h;
@@ -130,7 +130,7 @@ CFontz_init (Driver *drvthis, char *args)
p->cellheight = DEFAULT_CELL_HEIGHT; p->cellheight = DEFAULT_CELL_HEIGHT;
p->ccmode = standard; p->ccmode = standard;
debug(RPT_INFO, "CFontz: init(%p,%s)", drvthis, args ); debug(RPT_INFO, "CFontz: init(%p)", drvthis );
/* Read config file */ /* Read config file */
/* Which device should be used */ /* Which device should be used */
+1 -1
View File
@@ -13,7 +13,7 @@
#define DEFAULT_SIZE "20x4" #define DEFAULT_SIZE "20x4"
MODULE_EXPORT int CFontz_init (Driver *drvthis, char *device); MODULE_EXPORT int CFontz_init (Driver *drvthis);
MODULE_EXPORT void CFontz_close (Driver *drvthis); MODULE_EXPORT void CFontz_close (Driver *drvthis);
MODULE_EXPORT int CFontz_width (Driver *drvthis); MODULE_EXPORT int CFontz_width (Driver *drvthis);
MODULE_EXPORT int CFontz_height (Driver *drvthis); MODULE_EXPORT int CFontz_height (Driver *drvthis);
+2 -2
View File
@@ -135,7 +135,7 @@ static void CFontz633_hardware_clear (Driver *drvthis);
* Opens com port and sets baud correctly... * Opens com port and sets baud correctly...
*/ */
MODULE_EXPORT int MODULE_EXPORT int
CFontz633_init (Driver *drvthis, char *args) CFontz633_init (Driver *drvthis)
{ {
struct termios portset; struct termios portset;
int tmp, w, h; int tmp, w, h;
@@ -158,7 +158,7 @@ CFontz633_init (Driver *drvthis, char *args)
p->cellheight = DEFAULT_CELL_HEIGHT; p->cellheight = DEFAULT_CELL_HEIGHT;
p->ccmode = standard; p->ccmode = standard;
debug(RPT_INFO, "CFontz633: init(%p,%s)", drvthis, args ); debug(RPT_INFO, "CFontz633: init(%p)", drvthis );
EmptyKeyRing(&keyring); EmptyKeyRing(&keyring);
EmptyReceiveBuffer(&receivebuffer); EmptyReceiveBuffer(&receivebuffer);
+1 -1
View File
@@ -16,7 +16,7 @@
#define DEFAULT_SIZE_CF631 "20x2" #define DEFAULT_SIZE_CF631 "20x2"
MODULE_EXPORT int CFontz633_init (Driver *drvthis, char *device); MODULE_EXPORT int CFontz633_init (Driver *drvthis);
MODULE_EXPORT void CFontz633_close (Driver *drvthis); MODULE_EXPORT void CFontz633_close (Driver *drvthis);
MODULE_EXPORT int CFontz633_width (Driver *drvthis); MODULE_EXPORT int CFontz633_width (Driver *drvthis);
MODULE_EXPORT int CFontz633_height (Driver *drvthis); MODULE_EXPORT int CFontz633_height (Driver *drvthis);
+2 -2
View File
@@ -180,7 +180,7 @@ static void CFontz633_hardware_clear (Driver *drvthis);
* Opens com port and sets baud correctly... * Opens com port and sets baud correctly...
*/ */
MODULE_EXPORT int MODULE_EXPORT int
CFontz633_init (Driver *drvthis, char *args) CFontz633_init (Driver *drvthis)
{ {
struct termios portset; struct termios portset;
int tmp, w, h; int tmp, w, h;
@@ -204,7 +204,7 @@ CFontz633_init (Driver *drvthis, char *args)
p->ccmode = standard; p->ccmode = standard;
p->LEDstate = 0xFFFF; p->LEDstate = 0xFFFF;
debug(RPT_INFO, "CFontz633: init(%p,%s)", drvthis, args ); debug(RPT_INFO, "CFontz633: init(%p)", drvthis );
EmptyKeyRing(&keyring); EmptyKeyRing(&keyring);
EmptyReceiveBuffer(&receivebuffer); EmptyReceiveBuffer(&receivebuffer);
+2 -2
View File
@@ -489,7 +489,7 @@ int Write_Line_LCD(int fd, char *buf)
/***************************************************** /*****************************************************
* API: Opens com port and sets baud correctly... * API: Opens com port and sets baud correctly...
*/ */
int CwLnx_init(Driver * drvthis, char *args) int CwLnx_init(Driver * drvthis)
{ {
struct termios portset_save; struct termios portset_save;
@@ -532,7 +532,7 @@ int CwLnx_init(Driver * drvthis, char *args)
p->saved_heartbeat = -1; p->saved_heartbeat = -1;
p->heartbeat = 0; p->heartbeat = 0;
debug(RPT_INFO, "CwLnx: init(%p,%s)", drvthis, args); debug(RPT_INFO, "CwLnx: init(%p)", drvthis);
/* Read config file */ /* Read config file */
+1 -1
View File
@@ -52,7 +52,7 @@
#define DEFAULT_FORWARD_KEY CWLNX_KEY_RIGHT #define DEFAULT_FORWARD_KEY CWLNX_KEY_RIGHT
#define DEFAULT_MAIN_MENU_KEY CWLNX_KEY_DOWN #define DEFAULT_MAIN_MENU_KEY CWLNX_KEY_DOWN
MODULE_EXPORT int CwLnx_init(Driver * drvthis, char *device); MODULE_EXPORT int CwLnx_init(Driver * drvthis);
MODULE_EXPORT void CwLnx_close(Driver * drvthis); MODULE_EXPORT void CwLnx_close(Driver * drvthis);
/* */ MODULE_EXPORT int CwLnx_width (Driver * drvthis); /* */ MODULE_EXPORT int CwLnx_width (Driver * drvthis);
/* */ MODULE_EXPORT int CwLnx_height (Driver * drvthis); /* */ MODULE_EXPORT int CwLnx_height (Driver * drvthis);
+2 -2
View File
@@ -211,7 +211,7 @@ int iowled_on_off(usb_dev_handle *udh,int type, unsigned int pattern)
/***************************************************** /*****************************************************
* API: Open USB device and initialize it ... * API: Open USB device and initialize it ...
*/ */
int IOWarrior_init(Driver *drvthis, char *args) int IOWarrior_init(Driver *drvthis)
{ {
char serial[LCD_MAX_WIDTH+1] = DEFAULT_SERIALNO; char serial[LCD_MAX_WIDTH+1] = DEFAULT_SERIALNO;
char size[LCD_MAX_WIDTH+1] = DEFAULT_SIZE; char size[LCD_MAX_WIDTH+1] = DEFAULT_SIZE;
@@ -238,7 +238,7 @@ PrivateData *p;
p->backlight = DEFAULT_BACKLIGHT; p->backlight = DEFAULT_BACKLIGHT;
debug(RPT_INFO, "IOWarrior: init(%p,%s)", drvthis, args); debug(RPT_INFO, "IOWarrior: init(%p)", drvthis);
/* Read config file */ /* Read config file */
+1 -1
View File
@@ -115,7 +115,7 @@ MODULE_EXPORT int supports_multiple = 1;
MODULE_EXPORT char *symbol_prefix = "IOWarrior_"; MODULE_EXPORT char *symbol_prefix = "IOWarrior_";
/* API: functions for the server core */ /* API: functions for the server core */
MODULE_EXPORT int IOWarrior_init(Driver *drvthis, char *device); MODULE_EXPORT int IOWarrior_init(Driver *drvthis);
MODULE_EXPORT void IOWarrior_close(Driver *drvthis); MODULE_EXPORT void IOWarrior_close(Driver *drvthis);
MODULE_EXPORT int IOWarrior_width(Driver *drvthis); MODULE_EXPORT int IOWarrior_width(Driver *drvthis);
MODULE_EXPORT int IOWarrior_height(Driver *drvthis); MODULE_EXPORT int IOWarrior_height(Driver *drvthis);
+2 -2
View File
@@ -250,7 +250,7 @@ static char MtxOrb_parse_keypad_setting (Driver *drvthis, char * keyname, char d
* Called to initialize driver settings * Called to initialize driver settings
*/ */
MODULE_EXPORT int MODULE_EXPORT int
MtxOrb_init (Driver *drvthis, char *args) MtxOrb_init (Driver *drvthis)
{ {
struct termios portset; struct termios portset;
@@ -295,7 +295,7 @@ MtxOrb_init (Driver *drvthis, char *args)
p->cellwidth = LCD_DEFAULT_CELLWIDTH; p->cellwidth = LCD_DEFAULT_CELLWIDTH;
p->cellheight = LCD_DEFAULT_CELLHEIGHT; p->cellheight = LCD_DEFAULT_CELLHEIGHT;
debug( RPT_INFO, "MtxOrb: init(%p,%s)", drvthis, args ); debug( RPT_INFO, "MtxOrb: init(%p)", drvthis );
/* READ CONFIG FILE */ /* READ CONFIG FILE */
+1 -1
View File
@@ -3,7 +3,7 @@
#include "lcd.h" #include "lcd.h"
MODULE_EXPORT int MtxOrb_init (Driver *drvthis, char *device); MODULE_EXPORT int MtxOrb_init (Driver *drvthis);
MODULE_EXPORT void MtxOrb_close (Driver *drvthis); MODULE_EXPORT void MtxOrb_close (Driver *drvthis);
MODULE_EXPORT int MtxOrb_width (Driver *drvthis); MODULE_EXPORT int MtxOrb_width (Driver *drvthis);
MODULE_EXPORT int MtxOrb_height (Driver *drvthis); MODULE_EXPORT int MtxOrb_height (Driver *drvthis);
+1 -1
View File
@@ -36,7 +36,7 @@ typedef struct lcd_logical_driver {
// Functions which should probably be implemented in each driver... // Functions which should probably be implemented in each driver...
int (*init) // initialize driver int (*init) // initialize driver
(struct lcd_logical_driver * driver, char *args); (struct lcd_logical_driver * driver);
void (*close) (); // close void (*close) (); // close
void (*flush) (); // flush void (*flush) (); // flush
void (*flush_box) // flush box void (*flush_box) // flush box
+1 -1
View File
@@ -338,7 +338,7 @@ MODULE_EXPORT char *symbol_prefix = "bayrad_";
// init() should set up any device-specific stuff, and // init() should set up any device-specific stuff, and
// point all the function pointers. // point all the function pointers.
MODULE_EXPORT int MODULE_EXPORT int
bayrad_init(Driver *drvthis, char *args) bayrad_init(Driver *drvthis)
{ {
char device[256] = BAYRAD_DEFAULT_DEVICE; char device[256] = BAYRAD_DEFAULT_DEVICE;
+1 -1
View File
@@ -10,7 +10,7 @@
#include "lcd.h" #include "lcd.h"
MODULE_EXPORT int bayrad_init(Driver * drvthis, char *args); MODULE_EXPORT int bayrad_init(Driver * drvthis);
MODULE_EXPORT void bayrad_close(Driver * drvthis); MODULE_EXPORT void bayrad_close(Driver * drvthis);
MODULE_EXPORT int bayrad_width(Driver * drvthis); MODULE_EXPORT int bayrad_width(Driver * drvthis);
MODULE_EXPORT int bayrad_height(Driver * drvthis); MODULE_EXPORT int bayrad_height(Driver * drvthis);
+1 -1
View File
@@ -190,7 +190,7 @@ MODULE_EXPORT char *symbol_prefix = "curses_drv_";
MODULE_EXPORT int MODULE_EXPORT int
curses_drv_init (Driver *drvthis, char *args) curses_drv_init (Driver *drvthis)
{ {
char buf[256]; char buf[256];
+1 -1
View File
@@ -3,7 +3,7 @@
#include "lcd.h" #include "lcd.h"
MODULE_EXPORT int curses_drv_init (Driver * drvthis, char *args); MODULE_EXPORT int curses_drv_init (Driver * drvthis);
MODULE_EXPORT void curses_drv_close (Driver *drvthis); MODULE_EXPORT void curses_drv_close (Driver *drvthis);
MODULE_EXPORT int curses_drv_width (Driver *drvthis); MODULE_EXPORT int curses_drv_width (Driver *drvthis);
MODULE_EXPORT int curses_drv_height (Driver *drvthis); MODULE_EXPORT int curses_drv_height (Driver *drvthis);
+1 -1
View File
@@ -37,7 +37,7 @@ MODULE_EXPORT char *symbol_prefix = "debug_";
// function... // function...
MODULE_EXPORT int MODULE_EXPORT int
debug_init (Driver *drvthis, char *args) debug_init (Driver *drvthis)
{ {
report (RPT_INFO, "debug_init()"); report (RPT_INFO, "debug_init()");
+1 -1
View File
@@ -3,7 +3,7 @@
#include "lcd.h" #include "lcd.h"
MODULE_EXPORT int debug_init (Driver *drvthis, char *args); MODULE_EXPORT int debug_init (Driver *drvthis);
MODULE_EXPORT void debug_close (Driver *drvthis); MODULE_EXPORT void debug_close (Driver *drvthis);
MODULE_EXPORT int debug_width (Driver *drvthis); MODULE_EXPORT int debug_width (Driver *drvthis);
MODULE_EXPORT int debug_height (Driver *drvthis); MODULE_EXPORT int debug_height (Driver *drvthis);
+1 -1
View File
@@ -57,7 +57,7 @@ MODULE_EXPORT int supports_multiple = 0;
MODULE_EXPORT char *symbol_prefix = "glcdlib_"; MODULE_EXPORT char *symbol_prefix = "glcdlib_";
MODULE_EXPORT int glcdlib_init (Driver *drvthis, char *args) MODULE_EXPORT int glcdlib_init (Driver *drvthis)
{ {
glcdlibPD * pPD; glcdlibPD * pPD;
+1 -1
View File
@@ -29,7 +29,7 @@ typedef unsigned char u8;
// **************************************************************************************** // ****************************************************************************************
MODULE_EXPORT int glcdlib_init (Driver *drvthis, char *args); MODULE_EXPORT int glcdlib_init (Driver *drvthis);
MODULE_EXPORT void glcdlib_close (Driver *drvthis); MODULE_EXPORT void glcdlib_close (Driver *drvthis);
MODULE_EXPORT int glcdlib_width (Driver *drvthis); MODULE_EXPORT int glcdlib_width (Driver *drvthis);
MODULE_EXPORT int glcdlib_height (Driver *drvthis); MODULE_EXPORT int glcdlib_height (Driver *drvthis);
+1 -1
View File
@@ -69,7 +69,7 @@ MODULE_EXPORT char *symbol_prefix = "glk_";
// init() should set up any device-specific stuff, and // init() should set up any device-specific stuff, and
// point all the function pointers. // point all the function pointers.
MODULE_EXPORT int MODULE_EXPORT int
glk_init(Driver *drvthis, char *args) glk_init(Driver *drvthis)
{ {
char device[256] = GLK_DEFAULT_DEVICE; char device[256] = GLK_DEFAULT_DEVICE;
speed_t speed = GLK_DEFAULT_SPEED; speed_t speed = GLK_DEFAULT_SPEED;
+1 -1
View File
@@ -3,7 +3,7 @@
#include "lcd.h" #include "lcd.h"
MODULE_EXPORT int glk_init(Driver *drvthis, char *args); MODULE_EXPORT int glk_init(Driver *drvthis);
MODULE_EXPORT void glk_close(Driver *drvthis); MODULE_EXPORT void glk_close(Driver *drvthis);
MODULE_EXPORT int glk_width(Driver *drvthis); MODULE_EXPORT int glk_width(Driver *drvthis);
MODULE_EXPORT int glk_height(Driver *drvthis); MODULE_EXPORT int glk_height(Driver *drvthis);
+1 -1
View File
@@ -120,7 +120,7 @@ MODULE_EXPORT char *symbol_prefix = "HD44780_";
// Opens com port and sets baud correctly... // Opens com port and sets baud correctly...
// //
MODULE_EXPORT int MODULE_EXPORT int
HD44780_init (Driver * drvthis, char *args) HD44780_init (Driver * drvthis)
{ {
// TODO: remove the two magic numbers below // TODO: remove the two magic numbers below
// TODO: single point of return // TODO: single point of return
+1 -1
View File
@@ -18,7 +18,7 @@
#include "lcd.h" #include "lcd.h"
MODULE_EXPORT int HD44780_init (Driver *drvthis, char *args); MODULE_EXPORT int HD44780_init (Driver *drvthis);
MODULE_EXPORT void HD44780_close (Driver *drvthis); MODULE_EXPORT void HD44780_close (Driver *drvthis);
MODULE_EXPORT int HD44780_width (Driver *drvthis); MODULE_EXPORT int HD44780_width (Driver *drvthis);
MODULE_EXPORT int HD44780_height (Driver *drvthis); MODULE_EXPORT int HD44780_height (Driver *drvthis);
+2 -2
View File
@@ -69,7 +69,7 @@ MODULE_EXPORT char *symbol_prefix = "icp_a106_";
// Opens com port and sets baud correctly... // Opens com port and sets baud correctly...
// //
MODULE_EXPORT int MODULE_EXPORT int
icp_a106_init (Driver *drvthis, char *args) icp_a106_init (Driver *drvthis)
{ {
char device[200]; char device[200];
int speed=B1200; int speed=B1200;
@@ -77,7 +77,7 @@ icp_a106_init (Driver *drvthis, char *args)
PrivateData *p; PrivateData *p;
debug( RPT_INFO, "ICP_A106: init(%p,%s)", drvthis, args ); debug( RPT_INFO, "ICP_A106: init(%p)", drvthis );
// Alocate and store private data // Alocate and store private data
p = (PrivateData *) calloc( 1, sizeof( PrivateData) ); p = (PrivateData *) calloc( 1, sizeof( PrivateData) );
+1 -1
View File
@@ -32,7 +32,7 @@
#define ICP_A106_H #define ICP_A106_H
#include "lcd.h" #include "lcd.h"
MODULE_EXPORT int icp_a106_init (Driver *drvthis, char *args); MODULE_EXPORT int icp_a106_init (Driver *drvthis);
MODULE_EXPORT void icp_a106_close (Driver *drvthis); MODULE_EXPORT void icp_a106_close (Driver *drvthis);
MODULE_EXPORT int icp_a106_width (Driver *drvthis); MODULE_EXPORT int icp_a106_width (Driver *drvthis);
MODULE_EXPORT int icp_a106_height (Driver *drvthis); MODULE_EXPORT int icp_a106_height (Driver *drvthis);
+1 -1
View File
@@ -71,7 +71,7 @@ typedef struct {
/** /**
* driver initialization * driver initialization
*/ */
MODULE_EXPORT int imon_init (Driver *drvthis, char *args) MODULE_EXPORT int imon_init (Driver *drvthis)
{ {
imonPD * pPD = 0; imonPD * pPD = 0;
+1 -1
View File
@@ -27,7 +27,7 @@
#include "lcd.h" #include "lcd.h"
MODULE_EXPORT int imon_init (Driver *drvthis, char *args); MODULE_EXPORT int imon_init (Driver *drvthis);
MODULE_EXPORT void imon_close (Driver *drvthis); MODULE_EXPORT void imon_close (Driver *drvthis);
MODULE_EXPORT int imon_width (Driver *drvthis); MODULE_EXPORT int imon_width (Driver *drvthis);
MODULE_EXPORT int imon_height (Driver *drvthis); MODULE_EXPORT int imon_height (Driver *drvthis);
+1 -1
View File
@@ -76,7 +76,7 @@ char *codes[] = {
// init() should set up any device-specific stuff, and // init() should set up any device-specific stuff, and
// point all the function pointers. // point all the function pointers.
MODULE_EXPORT int MODULE_EXPORT int
irmanin_init (Driver *drvthis, char *args) irmanin_init (Driver *drvthis)
{ {
char device[256]; char device[256];
char *ptrdevice; char *ptrdevice;
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef LCD_IRMANIN__H #ifndef LCD_IRMANIN__H
#define LCD_IRMANIN_H #define LCD_IRMANIN_H
MODULE_EXPORT int irmanin_init (Driver *drvthis, char *args); MODULE_EXPORT int irmanin_init (Driver *drvthis);
MODULE_EXPORT void irmanin_close (Driver *drvthis); MODULE_EXPORT void irmanin_close (Driver *drvthis);
MODULE_EXPORT char irmanin_getkey (Driver *drvthis); MODULE_EXPORT char irmanin_getkey (Driver *drvthis);
+1 -1
View File
@@ -69,7 +69,7 @@ MODULE_EXPORT char *symbol_prefix = "joy_";
// init() should set up any device-specific stuff, and // init() should set up any device-specific stuff, and
// point all the function pointers. // point all the function pointers.
MODULE_EXPORT int MODULE_EXPORT int
joy_init (Driver *drvthis, char *args) joy_init (Driver *drvthis)
{ {
char device[256]; char device[256];
+1 -1
View File
@@ -3,7 +3,7 @@
#include "lcd.h" #include "lcd.h"
MODULE_EXPORT int joy_init (Driver *drvthis, char *args); MODULE_EXPORT int joy_init (Driver *drvthis);
MODULE_EXPORT void joy_close (Driver *drvthis); MODULE_EXPORT void joy_close (Driver *drvthis);
MODULE_EXPORT char joy_getkey (Driver *drvthis); MODULE_EXPORT char joy_getkey (Driver *drvthis);
+1 -1
View File
@@ -73,7 +73,7 @@ MODULE_EXPORT char *symbol_prefix = "LB216_";
// Opens com port and sets baud correctly... // Opens com port and sets baud correctly...
// //
MODULE_EXPORT int MODULE_EXPORT int
LB216_init(Driver * drvthis, char *args) LB216_init(Driver * drvthis)
{ {
struct termios portset; struct termios portset;
int reboot=0; int reboot=0;
+1 -1
View File
@@ -3,7 +3,7 @@
#include "lcd.h" #include "lcd.h"
MODULE_EXPORT int LB216_init(Driver * drvthis, char *device); MODULE_EXPORT int LB216_init(Driver * drvthis);
MODULE_EXPORT void LB216_close(Driver * drvthis); MODULE_EXPORT void LB216_close(Driver * drvthis);
MODULE_EXPORT int LB216_width (Driver *drvthis); MODULE_EXPORT int LB216_width (Driver *drvthis);
MODULE_EXPORT int LB216_height (Driver *drvthis); MODULE_EXPORT int LB216_height (Driver *drvthis);
+1 -1
View File
@@ -129,7 +129,7 @@ typedef struct lcd_logical_driver {
/* The driver loader will look for symbols with these names ! */ /* The driver loader will look for symbols with these names ! */
/* Basic functions */ /* Basic functions */
int (*init) (struct lcd_logical_driver* drvthis, char *args); int (*init) (struct lcd_logical_driver* drvthis);
void (*close) (struct lcd_logical_driver* drvthis); void (*close) (struct lcd_logical_driver* drvthis);
int (*width) (struct lcd_logical_driver* drvthis); int (*width) (struct lcd_logical_driver* drvthis);
int (*height) (struct lcd_logical_driver* drvthis); int (*height) (struct lcd_logical_driver* drvthis);
+2 -2
View File
@@ -133,7 +133,7 @@ lcdm001_cursorblink (Driver *drvthis, int on)
* point all the function pointers. * point all the function pointers.
*/ */
MODULE_EXPORT int MODULE_EXPORT int
lcdm001_init (Driver *drvthis, char *args) lcdm001_init (Driver *drvthis)
{ {
char device[200]; char device[200];
int speed=B38400; int speed=B38400;
@@ -141,7 +141,7 @@ lcdm001_init (Driver *drvthis, char *args)
char out[5]=""; char out[5]="";
debug( RPT_INFO, "LCDM001: init(%p,%s)", drvthis, args ); debug( RPT_INFO, "LCDM001: init(%p)", drvthis );
framebuf = malloc (width * height); framebuf = malloc (width * height);
+1 -1
View File
@@ -33,7 +33,7 @@
/* REMOVE: I don't thing this is actualy needed. */ /* REMOVE: I don't thing this is actualy needed. */
/* extern lcd_logical_driver *lcdm001; */ /* extern lcd_logical_driver *lcdm001; */
MODULE_EXPORT int lcdm001_init (Driver *drvthis, char *args); MODULE_EXPORT int lcdm001_init (Driver *drvthis);
MODULE_EXPORT void lcdm001_close (Driver *drvthis); MODULE_EXPORT void lcdm001_close (Driver *drvthis);
MODULE_EXPORT int lcdm001_width (Driver *drvthis); MODULE_EXPORT int lcdm001_width (Driver *drvthis);
MODULE_EXPORT int lcdm001_height (Driver *drvthis); MODULE_EXPORT int lcdm001_height (Driver *drvthis);
+2 -2
View File
@@ -74,14 +74,14 @@ MODULE_EXPORT char *symbol_prefix = "lcterm_";
// Opens com port and sets baud correctly... // Opens com port and sets baud correctly...
// //
MODULE_EXPORT int MODULE_EXPORT int
lcterm_init (Driver *drvthis, char *args) lcterm_init (Driver *drvthis)
{ {
char device[200]; char device[200];
int speed=B9600; int speed=B9600;
struct termios portset; struct termios portset;
PrivateData *p; PrivateData *p;
debug( RPT_INFO, "LCTERM: init(%p,%s)", drvthis, args ); debug( RPT_INFO, "LCTERM: init(%p)", drvthis );
// Alocate and store private data // Alocate and store private data
p = (PrivateData *) calloc( 1, sizeof( PrivateData) ); p = (PrivateData *) calloc( 1, sizeof( PrivateData) );
+1 -1
View File
@@ -27,7 +27,7 @@
#define LCTERM_H #define LCTERM_H
#include "lcd.h" #include "lcd.h"
MODULE_EXPORT int lcterm_init (Driver *drvthis, char *args); MODULE_EXPORT int lcterm_init (Driver *drvthis);
MODULE_EXPORT void lcterm_close (Driver *drvthis); MODULE_EXPORT void lcterm_close (Driver *drvthis);
MODULE_EXPORT int lcterm_width (Driver *drvthis); MODULE_EXPORT int lcterm_width (Driver *drvthis);
MODULE_EXPORT int lcterm_height (Driver *drvthis); MODULE_EXPORT int lcterm_height (Driver *drvthis);
+1 -1
View File
@@ -61,7 +61,7 @@ MODULE_EXPORT char *symbol_prefix = "lircin_";
* point all the function pointers. * point all the function pointers.
*/ */
MODULE_EXPORT int MODULE_EXPORT int
lircin_init (Driver *drvthis, char *args) lircin_init (Driver *drvthis)
{ {
char s[200]=""; char s[200]="";
char *lircrc, *prog; char *lircrc, *prog;
+1 -1
View File
@@ -21,7 +21,7 @@
#ifndef LCD_LIRCIN_H #ifndef LCD_LIRCIN_H
#define LCD_LIRCIN_H #define LCD_LIRCIN_H
MODULE_EXPORT int lircin_init (Driver *drvthis, char *args); MODULE_EXPORT int lircin_init (Driver *drvthis);
MODULE_EXPORT void lircin_close (Driver *drvthis); MODULE_EXPORT void lircin_close (Driver *drvthis);
MODULE_EXPORT char * lircin_get_key (Driver *drvthis); MODULE_EXPORT char * lircin_get_key (Driver *drvthis);
+2 -2
View File
@@ -143,14 +143,14 @@ ms6931_draw_frame (char *dat)
// Opens com port and sets baud correctly... // Opens com port and sets baud correctly...
// //
MODULE_EXPORT int MODULE_EXPORT int
ms6931_init (Driver *drvthis, char *args) ms6931_init (Driver *drvthis)
{ {
struct termios portset; struct termios portset;
int w, h; int w, h;
char device[200] = MS6931_DEF_DEVICE; char device[200] = MS6931_DEF_DEVICE;
char size[200] = MS6931_DEF_SIZE; char size[200] = MS6931_DEF_SIZE;
debug(RPT_INFO, "ms6931_init: init(%p,%s)", drvthis, args ); debug(RPT_INFO, "ms6931_init: init(%p)", drvthis );
/*Which serial device should be used*/ /*Which serial device should be used*/
strncpy(device, drvthis->config_get_string ( drvthis->name , "Device" , 0 , MS6931_DEF_DEVICE),sizeof(device)); strncpy(device, drvthis->config_get_string ( drvthis->name , "Device" , 0 , MS6931_DEF_DEVICE),sizeof(device));
+1 -1
View File
@@ -33,7 +33,7 @@
#define MS6931_DEF_CELL_HEIGHT 8 #define MS6931_DEF_CELL_HEIGHT 8
MODULE_EXPORT int ms6931_init (Driver *drvthis, char *args); MODULE_EXPORT int ms6931_init (Driver *drvthis);
MODULE_EXPORT void ms6931_close (Driver *drvthis); MODULE_EXPORT void ms6931_close (Driver *drvthis);
MODULE_EXPORT int ms6931_width (Driver *drvthis); MODULE_EXPORT int ms6931_width (Driver *drvthis);
MODULE_EXPORT int ms6931_height(Driver *drvthis); MODULE_EXPORT int ms6931_height(Driver *drvthis);
+1 -1
View File
@@ -115,7 +115,7 @@ MODULE_EXPORT char *symbol_prefix = "MTC_S16209X_";
// Opens com port and sets baud correctly... // Opens com port and sets baud correctly...
// //
MODULE_EXPORT int MODULE_EXPORT int
MTC_S16209X_init (Driver * drvthis, char *args) MTC_S16209X_init (Driver * drvthis)
{ {
struct termios portset; struct termios portset;
char device[256] = MTC_DEFAULT_DEVICE; char device[256] = MTC_DEFAULT_DEVICE;
+1 -1
View File
@@ -40,7 +40,7 @@
#include "lcd.h" #include "lcd.h"
MODULE_EXPORT int MTC_S16209X_init(Driver * drvthis, char *device); MODULE_EXPORT int MTC_S16209X_init(Driver * drvthis);
MODULE_EXPORT void MTC_S16209X_close(Driver * drvthis); MODULE_EXPORT void MTC_S16209X_close(Driver * drvthis);
MODULE_EXPORT int MTC_S16209X_width (Driver *drvthis); MODULE_EXPORT int MTC_S16209X_width (Driver *drvthis);
MODULE_EXPORT int MTC_S16209X_height (Driver *drvthis); MODULE_EXPORT int MTC_S16209X_height (Driver *drvthis);
+2 -2
View File
@@ -313,13 +313,13 @@ unsigned char sed1330_readkeypad (PrivateData *p, unsigned int YData);
// Init the driver and display // Init the driver and display
// //
MODULE_EXPORT int MODULE_EXPORT int
sed1330_init( Driver * drvthis, char *args ) sed1330_init( Driver * drvthis )
{ {
char * s; char * s;
PrivateData * p; PrivateData * p;
char data[8]; char data[8];
debug( RPT_DEBUG, "%s( %p, args=\"%s\" )", __FUNCTION__, drvthis, args ); debug( RPT_DEBUG, "%s( %p )", __FUNCTION__, drvthis );
// Alocate and store private p // Alocate and store private p
+1 -1
View File
@@ -8,7 +8,7 @@
#include "lcd.h" #include "lcd.h"
MODULE_EXPORT int sed1330_init( Driver * drvthis, char *args ); MODULE_EXPORT int sed1330_init( Driver * drvthis );
MODULE_EXPORT void sed1330_close( Driver * drvthis ); MODULE_EXPORT void sed1330_close( Driver * drvthis );
MODULE_EXPORT int sed1330_width( Driver * drvthis ); MODULE_EXPORT int sed1330_width( Driver * drvthis );
MODULE_EXPORT int sed1330_height( Driver * drvthis ); MODULE_EXPORT int sed1330_height( Driver * drvthis );
+1 -1
View File
@@ -147,7 +147,7 @@ drawchar2fb (int x, int y, unsigned char z)
// a command line argument. // a command line argument.
// //
MODULE_EXPORT int MODULE_EXPORT int
sed1520_init (Driver *drvthis, char *args) sed1520_init (Driver *drvthis)
{ {
/* Read config file */ /* Read config file */
+1 -1
View File
@@ -3,7 +3,7 @@
#include "lcd.h" #include "lcd.h"
MODULE_EXPORT int sed1520_init (Driver *drvthis, char *args); MODULE_EXPORT int sed1520_init (Driver *drvthis);
MODULE_EXPORT void sed1520_close (Driver *drvthis); MODULE_EXPORT void sed1520_close (Driver *drvthis);
MODULE_EXPORT int sed1520_width (Driver *drvthis); MODULE_EXPORT int sed1520_width (Driver *drvthis);
MODULE_EXPORT int sed1520_height (Driver *drvthis); MODULE_EXPORT int sed1520_height (Driver *drvthis);
+1 -1
View File
@@ -281,7 +281,7 @@ stv5730_drawchar2fb (int x, int y, unsigned char z)
// a command line argument. // a command line argument.
// //
MODULE_EXPORT int MODULE_EXPORT int
stv5730_init (Driver *drvthis, char *args) stv5730_init (Driver *drvthis)
{ {
int i; int i;
+1 -1
View File
@@ -3,7 +3,7 @@
#include "lcd.h" #include "lcd.h"
MODULE_EXPORT int stv5730_init (Driver *drvthis, char *args); MODULE_EXPORT int stv5730_init (Driver *drvthis);
MODULE_EXPORT void stv5730_close (Driver *drvthis); MODULE_EXPORT void stv5730_close (Driver *drvthis);
MODULE_EXPORT int stv5730_width (Driver *drvthis); MODULE_EXPORT int stv5730_width (Driver *drvthis);
MODULE_EXPORT int stv5730_height (Driver *drvthis); MODULE_EXPORT int stv5730_height (Driver *drvthis);
+1 -1
View File
@@ -252,7 +252,7 @@ MODULE_EXPORT char *symbol_prefix = "svgalib_drv_";
* Init driver * Init driver
*/ */
MODULE_EXPORT int MODULE_EXPORT int
svgalib_drv_init (Driver *drvthis, char *args) svgalib_drv_init (Driver *drvthis)
{ {
int VGAMODE; int VGAMODE;
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef LCD_SVGALIB_H #ifndef LCD_SVGALIB_H
#define LCD_SVGALIB_H #define LCD_SVGALIB_H
MODULE_EXPORT int svgalib_drv_init (Driver *drvthis, char *args); MODULE_EXPORT int svgalib_drv_init (Driver *drvthis);
MODULE_EXPORT void svgalib_drv_close (Driver *drvthis); MODULE_EXPORT void svgalib_drv_close (Driver *drvthis);
MODULE_EXPORT int svgalib_drv_width (Driver *drvthis); MODULE_EXPORT int svgalib_drv_width (Driver *drvthis);
MODULE_EXPORT int svgalib_drv_height (Driver *drvthis); MODULE_EXPORT int svgalib_drv_height (Driver *drvthis);
+2 -2
View File
@@ -62,13 +62,13 @@ MODULE_EXPORT int supports_multiple = 0;
MODULE_EXPORT char *symbol_prefix = "t6963_"; MODULE_EXPORT char *symbol_prefix = "t6963_";
MODULE_EXPORT int MODULE_EXPORT int
t6963_init (Driver *drvthis, char *args) t6963_init (Driver *drvthis)
{ {
int w, h, p, i, ecp_input; int w, h, p, i, ecp_input;
char size[200] = DEFAULT_SIZE; char size[200] = DEFAULT_SIZE;
debug(RPT_INFO, "T6963: init(%p,%s)", drvthis, args ); debug(RPT_INFO, "T6963: init(%p)", drvthis );
t6963_display_mode = 0; t6963_display_mode = 0;
t6963_graph_line[0] = 0x20; t6963_graph_line[0] = 0x20;
+1 -1
View File
@@ -112,7 +112,7 @@ typedef unsigned char u8;
// **************************************************************************************** // ****************************************************************************************
MODULE_EXPORT int t6963_init (Driver *drvthis, char *args); MODULE_EXPORT int t6963_init (Driver *drvthis);
MODULE_EXPORT void t6963_close (Driver *drvthis); MODULE_EXPORT void t6963_close (Driver *drvthis);
MODULE_EXPORT int t6963_width (Driver *drvthis); MODULE_EXPORT int t6963_width (Driver *drvthis);
MODULE_EXPORT int t6963_height (Driver *drvthis); MODULE_EXPORT int t6963_height (Driver *drvthis);
+1 -1
View File
@@ -54,7 +54,7 @@ MODULE_EXPORT char *symbol_prefix = "text_";
MODULE_EXPORT int MODULE_EXPORT int
text_init (Driver *drvthis, char *args) text_init (Driver *drvthis)
{ {
char buf[256]; char buf[256];
+1 -1
View File
@@ -3,7 +3,7 @@
#include "lcd.h" #include "lcd.h"
MODULE_EXPORT int text_init (Driver * drvthis, char *args); MODULE_EXPORT int text_init (Driver * drvthis);
MODULE_EXPORT void text_close (Driver *drvthis); MODULE_EXPORT void text_close (Driver *drvthis);
MODULE_EXPORT int text_width (Driver *drvthis); MODULE_EXPORT int text_width (Driver *drvthis);
MODULE_EXPORT int text_height (Driver *drvthis); MODULE_EXPORT int text_height (Driver *drvthis);
+1 -1
View File
@@ -50,7 +50,7 @@ MODULE_EXPORT char *symbol_prefix = "sli_";
// Opens com port and sets baud correctly... // Opens com port and sets baud correctly...
// //
MODULE_EXPORT int MODULE_EXPORT int
sli_init (Driver *drvthis, char *args) sli_init (Driver *drvthis)
{ {
struct termios portset; struct termios portset;
char out[2]; char out[2];
+1 -1
View File
@@ -9,7 +9,7 @@
#include "lcd.h" #include "lcd.h"
MODULE_EXPORT int sli_init (Driver *drvthis, char *args); MODULE_EXPORT int sli_init (Driver *drvthis);
MODULE_EXPORT void sli_close (Driver *drvthis); MODULE_EXPORT void sli_close (Driver *drvthis);
MODULE_EXPORT int sli_width (Driver *drvthis); MODULE_EXPORT int sli_width (Driver *drvthis);
MODULE_EXPORT int sli_height (Driver *drvthis); MODULE_EXPORT int sli_height (Driver *drvthis);