#insert the device driver and get register in the kernel i.e get the major number with a register_chrdev which is in fs.h and get unregister using the unregister_chrdev.....:) :) RCS file: init.c,v Working file: init.c head: 1.17 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 17; selected revisions: 17 description: give the defination for the module_init its the entry point to the kernel. ---------------------------- revision 1.17 date: 2014/05/06 05:22:17; author: root; state: Exp; lines: +1 -1 *** empty log message *** ---------------------------- revision 1.16 date: 2014/05/06 05:10:50; author: root; state: Exp; lines: +10 -3 give the DEVNAME macro. give the DEBUG macro. ---------------------------- revision 1.15 date: 2014/05/06 04:43:29; author: root; state: Exp; lines: +3 -2 assingning MAJORNO= majorno inside the fuction. ---------------------------- revision 1.14 date: 2014/05/06 04:33:31; author: root; state: Exp; lines: +1 -0 include the declaration.h header file in this ---------------------------- revision 1.13 date: 2014/05/06 04:22:00; author: root; state: Exp; lines: +3 -3 assigning the Macro MAJORNO equal to extern majorno. and dont use macro for process always use extern majono for process. ---------------------------- revision 1.12 date: 2014/05/06 04:11:54; author: root; state: Exp; lines: +5 -3 use the MAJORNO macro and extern majorno ---------------------------- revision 1.11 date: 2014/05/06 00:56:34; author: root; state: Exp; lines: +2 -2 *** empty log message *** ---------------------------- revision 1.10 date: 2014/05/05 23:54:45; author: root; state: Exp; lines: +1 -1 *** empty log message *** ---------------------------- revision 1.9 date: 2014/05/05 23:15:56; author: root; state: Exp; lines: +1 -1 *** empty log message *** ---------------------------- revision 1.8 date: 2014/05/05 23:14:10; author: root; state: Exp; lines: +3 -3 *** empty log message *** ---------------------------- revision 1.7 date: 2014/05/05 23:10:24; author: root; state: Exp; lines: +2 -2 *** empty log message *** ---------------------------- revision 1.6 date: 2014/05/05 22:59:35; author: root; state: Exp; lines: +2 -2 *** empty log message *** ---------------------------- revision 1.5 date: 2014/05/05 22:47:21; author: root; state: Exp; lines: +1 -1 *** empty log message *** ---------------------------- revision 1.4 date: 2014/05/05 22:29:55; author: root; state: Exp; lines: +2 -1 not include the fileopr.h and define the fops of file_operations type in init.c file itself. ---------------------------- revision 1.3 date: 2014/05/05 22:17:16; author: root; state: Exp; lines: +1 -0 include fileopr.h header file in the init.c ---------------------------- revision 1.2 date: 2014/05/05 22:13:57; author: root; state: Exp; lines: +9 -0 this is the registration of the Device Driver into the kernel. define register_chardev which is available in fs.h at 79%. ---------------------------- revision 1.1 date: 2014/05/04 03:49:15; author: root; state: Exp; Initial revision ============================================================================= RCS file: cleanup.c,v Working file: cleanup.c head: 1.7 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 7; selected revisions: 7 description: give the defination for the module_exit. ---------------------------- revision 1.7 date: 2014/05/06 05:11:26; author: root; state: Exp; lines: +3 -1 give the DEBUG and DEVNAME macro ---------------------------- revision 1.6 date: 2014/05/06 04:45:28; author: root; state: Exp; lines: +1 -1 introduce ; in the unregister_chrdev ---------------------------- revision 1.5 date: 2014/05/06 04:33:48; author: root; state: Exp; lines: +1 -0 include the declaration.h header file in this. ---------------------------- revision 1.4 date: 2014/05/06 04:12:37; author: root; state: Exp; lines: +1 -0 define the function unregister_chrdev ---------------------------- revision 1.3 date: 2014/05/04 04:17:02; author: root; state: Exp; lines: +1 -1 redeclaration of cleanup function. ---------------------------- revision 1.2 date: 2014/05/04 04:12:01; author: root; state: Exp; lines: +1 -1 this is the cleanup ---------------------------- revision 1.1 date: 2014/05/04 03:49:15; author: root; state: Exp; Initial revision ============================================================================= RCS file: declaration.h,v Working file: declaration.h head: 1.1 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: extern the int majorno. ---------------------------- revision 1.1 date: 2014/05/06 04:11:34; author: root; state: Exp; Initial revision ============================================================================= RCS file: header.h,v Working file: header.h head: 1.4 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 4; selected revisions: 4 description: this is the header file for the device driver. including the init.h and module.h. and MODULE_LICENSE for the GPL(gerneal purpose license) ---------------------------- revision 1.4 date: 2014/05/06 05:10:01; author: root; state: Exp; lines: +8 -0 define macro DEBUG for the printk. difine macro DEVNAME for the device name. ---------------------------- revision 1.3 date: 2014/05/06 04:11:01; author: root; state: Exp; lines: +5 -0 define MAJORNO macro ---------------------------- revision 1.2 date: 2014/05/06 00:56:24; author: root; state: Exp; lines: +1 -0 include the fs.h ---------------------------- revision 1.1 date: 2014/05/04 03:49:15; author: root; state: Exp; Initial revision =============================================================================