EmbLogic's Blog

Registering and unregistering the character driver into and from the kernel.

RCS file: ./header.h,v
Working file: ./header.h
head: 1.2
branch:
locks: strict
root: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2; selected revisions: 2
description:
this is the header file for character driver
in this file i include kernel header files
included linux/kernel.h
included linux/init.h
included linux/fs.h
—————————-
revision 1.2 locked by: root;
date: 2014/11/25 17:33:53; author: root; state: Exp; lines: +2 -0
include file linux/kdev_t.h
—————————-
revision 1.1
date: 2014/11/25 06:17:14; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: ./declaration.h,v
Working file: ./declaration.h
head: 1.3
branch:
locks: strict
root: 1.3
access list:
symbolic names:
keyword substitution: kv
total revisions: 3; selected revisions: 3
description:
this is the file in which all the declaration for kernel module is made
included file linux/module.h
declare license name
declare author namee
give description for the module
—————————-
revision 1.3 locked by: root;
date: 2014/11/25 17:33:53; author: root; state: Exp; lines: +1 -4
declared variable minor_no of type int
—————————-
revision 1.2
date: 2014/11/25 17:20:57; author: root; state: Exp; lines: +1 -0
declared extern variable dev of type dev_t
—————————-
revision 1.1
date: 2014/11/25 06:17:14; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: ./init.c,v
Working file: ./init.c
head: 1.4
branch:
locks: strict
root: 1.4
access list:
symbolic names:
keyword substitution: kv
total revisions: 4; selected revisions: 4
description:
this is the file which exicuted after inserting module to the kernel
resistering the module using register_chrdev()
get the major number for module
—————————-
revision 1.4 locked by: root;
date: 2014/11/25 17:33:53; author: root; state: Exp; lines: +4 -3
get major and minor number from the var dev of type dev_t using macros MAJOR() and MINOR()
—————————-
revision 1.3
date: 2014/11/25 17:20:57; author: root; state: Exp; lines: +7 -5
remove the use of register_chrdev function for registering device into the kernel
register driver into the kerrnel using alloc_chrdev_region()
declared variable dev of type dev_t
—————————-
revision 1.2
date: 2014/11/25 06:24:41; author: root; state: Exp; lines: +2 -2
change priority for printing messages in ring buffer for kernel
—————————-
revision 1.1
date: 2014/11/25 06:17:14; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: ./exit_fun.c,v
Working file: ./exit_fun.c
head: 1.6
branch:
locks: strict
root: 1.6
access list:
symbolic names:
keyword substitution: kv
total revisions: 6; selected revisions: 6
description:
this file executes after rmmod
unregister module using unregister_chrdev
define cleanup function
—————————-
revision 1.6 locked by: root;
date: 2014/11/25 17:33:53; author: root; state: Exp; lines: +1 -1
print major and minor number into the kernel buffer
—————————-
revision 1.5
date: 2014/11/25 17:27:25; author: root; state: Exp; lines: +1 -1
remove error
—————————-
revision 1.4
date: 2014/11/25 17:20:57; author: root; state: Exp; lines: +2 -2
remove the use of unregister_chrdev() for unregisterning driver from the kernel
unregister driver from the kernel using unregister_chrdev_region()
—————————-
revision 1.3
date: 2014/11/25 06:24:41; author: root; state: Exp; lines: +1 -1
change priority for printing messages in ring buffer for kernel
—————————-
revision 1.2
date: 2014/11/25 06:23:16; author: root; state: Exp; lines: +1 -0
give message to the kernel for unregistering the module
—————————-
revision 1.1
date: 2014/11/25 06:17:14; author: root; state: Exp;
Initial revision
=============================================================================

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>