mirror of
https://github.com/sysprog21/lkmpg.git
synced 2024-11-22 15:05:54 +08:00
Make each source file more consistent
It is vital to denote the file name and summary for each source, otherwise readers could not figure out the corresponding files.
This commit is contained in:
parent
1c93f2f5ef
commit
faf3aa7c22
|
@ -1,8 +1,8 @@
|
||||||
/*
|
/*
|
||||||
* bottomhalf.c - Top and bottom half interrupt handling
|
* bottomhalf.c - Top and bottom half interrupt handling
|
||||||
*
|
*
|
||||||
* Based upon the RPi example by Stefan Wendler (devnull@kaltpost.de)
|
* Based upon the RPi example by Stefan Wendler (devnull@kaltpost.de)
|
||||||
* from:
|
* from:
|
||||||
* https://github.com/wendlers/rpi-kmod-samples
|
* https://github.com/wendlers/rpi-kmod-samples
|
||||||
*
|
*
|
||||||
* Press one button to turn on a LED and another to turn it off
|
* Press one button to turn on a LED and another to turn it off
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* chardev2.h - the header file with the ioctl definitions.
|
* chardev.h - the header file with the ioctl definitions.
|
||||||
*
|
*
|
||||||
* The declarations here have to be in a header file, because
|
* The declarations here have to be in a header file, because
|
||||||
* they need to be known both to the kernel module
|
* they need to be known both to the kernel module
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
/*
|
||||||
|
* completions.c
|
||||||
|
*/
|
||||||
#include <linux/completion.h>
|
#include <linux/completion.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
/*
|
||||||
|
* cryptosha256.c
|
||||||
|
*/
|
||||||
#include <crypto/internal/hash.h>
|
#include <crypto/internal/hash.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
/*
|
||||||
|
* cryptosk.c
|
||||||
|
*/
|
||||||
#include <crypto/internal/skcipher.h>
|
#include <crypto/internal/skcipher.h>
|
||||||
#include <linux/crypto.h>
|
#include <linux/crypto.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
/*
|
||||||
|
* devicemodel.c
|
||||||
|
*/
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
/*
|
||||||
|
* example_atomic.c
|
||||||
|
*/
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
/*
|
||||||
|
* example_mutex.c
|
||||||
|
*/
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
/*
|
||||||
|
* example_rwlock.c
|
||||||
|
*/
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
/*
|
||||||
|
* example_spinlock.c
|
||||||
|
*/
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
/*
|
||||||
|
* example_tasklet.c
|
||||||
|
*/
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* hello-sysfs.c sysfs example
|
* hello-sysfs.c sysfs example
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/kobject.h>
|
#include <linux/kobject.h>
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
/*
|
||||||
|
* ioctl.c
|
||||||
|
*/
|
||||||
#include <linux/cdev.h>
|
#include <linux/cdev.h>
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
/* cat_noblock.c - open a file and display its contents, but exit rather than
|
/*
|
||||||
* wait for input */
|
* cat_noblock.c - open a file and display its contents, but exit rather than
|
||||||
|
* wait for input.
|
||||||
|
*/
|
||||||
#include <errno.h> /* for errno */
|
#include <errno.h> /* for errno */
|
||||||
#include <fcntl.h> /* for open */
|
#include <fcntl.h> /* for open */
|
||||||
#include <stdio.h> /* standard I/O */
|
#include <stdio.h> /* standard I/O */
|
||||||
|
@ -9,7 +10,6 @@
|
||||||
|
|
||||||
#define MAX_BYTES 1024 * 4
|
#define MAX_BYTES 1024 * 4
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
int fd; /* The file descriptor for the file to read */
|
int fd; /* The file descriptor for the file to read */
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
procfs1.c
|
* procfs1.c
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
/**
|
/*
|
||||||
* procfs2.c - create a "file" in /proc
|
* procfs2.c - create a "file" in /proc
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/kernel.h> /* We're doing kernel work */
|
#include <linux/kernel.h> /* We're doing kernel work */
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
procfs3.c
|
* procfs3.c
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/*
|
||||||
* procfs4.c - create a "file" in /proc
|
* procfs4.c - create a "file" in /proc
|
||||||
* This program uses the seq_file library to manage the /proc file.
|
* This program uses the seq_file library to manage the /proc file.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
/*
|
||||||
|
* sched.c
|
||||||
|
*/
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/workqueue.h>
|
#include <linux/workqueue.h>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user