drivers/ec_module.c
branchkernel2.6
changeset 34 c1e8d61fa395
parent 33 f4171b8aadf8
child 39 6965c23a6826
equal deleted inserted replaced
33:f4171b8aadf8 34:c1e8d61fa395
    24 
    24 
    25 #include "ec_module.h"
    25 #include "ec_module.h"
    26 
    26 
    27 /******************************************************************************/
    27 /******************************************************************************/
    28 
    28 
    29 #define SUBVERSION_ID "$Id$"
    29 #define LITERAL(X) #X
       
    30 #define STRINGIFY(X) LITERAL(X)
       
    31 
       
    32 #define COMPILE_INFO "Revision " STRINGIFY(EC_REV) \
       
    33                      ", compiled by " STRINGIFY(EC_USER) \
       
    34                      " at " STRINGIFY(EC_DATE)
       
    35 
       
    36 /******************************************************************************/
    30 
    37 
    31 int ecat_master_count = 1;
    38 int ecat_master_count = 1;
    32 EtherCAT_master_t *ecat_masters = NULL;
    39 EtherCAT_master_t *ecat_masters = NULL;
    33 int *ecat_masters_reserved = NULL;
    40 int *ecat_masters_reserved = NULL;
    34 
    41 
    35 /******************************************************************************/
    42 /******************************************************************************/
    36 
    43 
    37 MODULE_AUTHOR ("Wilhelm Hagemeister <hm@igh-essen.com>, Florian Pose <fp@igh-essen.com>");
    44 MODULE_AUTHOR ("Wilhelm Hagemeister <hm@igh-essen.com>, Florian Pose <fp@igh-essen.com>");
    38 MODULE_DESCRIPTION ("EtherCAT master driver module");
    45 MODULE_DESCRIPTION ("EtherCAT master driver module");
    39 MODULE_LICENSE("GPL");
    46 MODULE_LICENSE("GPL");
    40 MODULE_VERSION(SUBVERSION_ID);
    47 MODULE_VERSION(COMPILE_INFO);
    41 
    48 
    42 module_param(ecat_master_count, int, 1);
    49 module_param(ecat_master_count, int, 1);
    43 MODULE_PARM_DESC(ecat_master_count, "Number of EtherCAT master to initialize.");
    50 MODULE_PARM_DESC(ecat_master_count, "Number of EtherCAT master to initialize.");
    44 
    51 
    45 module_init(ecat_init_module);
    52 module_init(ecat_init_module);
    64 
    71 
    65 int __init ecat_init_module(void)
    72 int __init ecat_init_module(void)
    66 {
    73 {
    67   unsigned int i;
    74   unsigned int i;
    68 
    75 
    69   printk(KERN_ERR "EtherCAT: Master driver %s\n", SUBVERSION_ID);
    76   printk(KERN_ERR "EtherCAT: Master driver, %s\n", COMPILE_INFO);
    70 
    77 
    71   if (ecat_master_count < 1)
    78   if (ecat_master_count < 1)
    72   {
    79   {
    73     printk(KERN_ERR "EtherCAT: Error - Illegal ecat_master_count: %i\n",
    80     printk(KERN_ERR "EtherCAT: Error - Illegal ecat_master_count: %i\n",
    74            ecat_master_count);
    81            ecat_master_count);