EmbLogic's Blog

Character Device Driver

Implemented the following:

1.Set-up Scull for multiple devices.

2.Export a self made function to symbol table of kernel, and use the function in some other file.

Log file for init.c:

head    1.4;
access;
symbols;
locks
root:1.4; strict;
comment    @ * @;

1.4
date    2014.01.09.11.07.19;    author root;    state Exp;
branches;
next    1.3;

1.3
date    2014.01.06.15.38.44;    author root;    state Exp;
branches;
next    1.2;

1.2
date    2014.01.06.14.16.20;    author root;    state Exp;
branches;
next    1.1;

1.1
date    2014.01.06.13.06.31;    author root;    state Exp;
branches;
next    ;

desc
@This is the source file of initialization file of driver initialization by new mechanism.
@

1.4
log
@Setup scull for multiple devices and export a function in symbol table by using EXPORT_SYMBOL.
@

Log file for exit.c:

head    1.3;
access;
symbols;
locks
root:1.3; strict;
comment    @ * @;

1.3
date    2014.01.06.15.41.04;    author root;    state Exp;
branches;
next    1.2;

1.2
date    2014.01.06.14.20.34;    author root;    state Exp;
branches;
next    1.1;

1.1
date    2014.01.06.13.07.52;    author root;    state Exp;
branches;
next    ;

desc
@This is the source file of exit file of driver initialization by new mechanism.
@

1.3
log
@After allocating the memory and adding the cdev to device table, remove the cdev from device table using cdev_del and deallocate the memory too and unregister the driver.
@

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>