EmbLogic's Blog

Character Device Drivers.

Implemented the following:

1.Register the driver by using the new mechanism, allocate the memory and initialise and add the cdev to device table.

2.After registration, allocation, and adding the cdev to device table, delete the cdev form device table, deallocate the memory and unregister the driver.

Log file for init.c:

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

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.3
log
@After register the driver and allocating the memory, initialize the cdev structure and add cdev to device table using cdev_init and cdev_add respectively.
@
1.2
log
@After registering the driver, allocate the memory using kmalloc by representing a structure in driver called ScullDev.
@

Log file for exit.c:

head    1.3;
access;
symbols;
locks; 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.
@
1.2
log
@After registering and allocating the size to driver, deallocate 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>