lkmpg/examples
linD026 06b75942cc
Fix incorrect major number registration in chardev (#77)
chardev2.c demonstrates the ioctl operation with static major
number MAJOR_NUM, but there also exists "Major," the dynamic
one, which results in registration and deregistration on different
device. Once the module remove, it cannot insert again:

  $ sudo insmod chardev2.ko
  $ sudo rmmod chardev2
  $ cat /proc/devices
  Character devices:
  ...
  100 char_dev
  $ sudo insmod chardev2.ko
  insmod: ERROR: could not insert module chardev2.ko: Device or resource busy

This patch removed the use of dynamic major number.
2021-08-26 03:16:17 +08:00
..
other Fix: errno assignment should be comparison. 2021-08-24 11:16:25 -04:00
.clang-format Enforce the customized style for example code 2021-07-22 06:58:13 +08:00
bottomhalf.c Update several example code for newer kernel 2021-08-23 21:30:43 +08:00
chardev.c Apply editorial changes 2021-08-08 01:24:59 +08:00
chardev.h Apply editorial changes 2021-08-08 01:24:59 +08:00
chardev2.c Fix incorrect major number registration in chardev (#77) 2021-08-26 03:16:17 +08:00
completions.c Apply editorial changes 2021-08-08 01:24:59 +08:00
cryptosha256.c Apply editorial changes 2021-08-08 01:24:59 +08:00
cryptosk.c Update several example code for newer kernel 2021-08-23 21:30:43 +08:00
devicemodel.c Apply editorial changes 2021-08-08 01:24:59 +08:00
example_atomic.c Apply editorial changes 2021-08-08 01:24:59 +08:00
example_mutex.c Apply editorial changes 2021-08-08 01:24:59 +08:00
example_rwlock.c Apply editorial changes 2021-08-08 01:24:59 +08:00
example_spinlock.c Apply editorial changes 2021-08-08 01:24:59 +08:00
example_tasklet.c Update several example code for newer kernel 2021-08-23 21:30:43 +08:00
hello-1.c Mention pr_info() rather than KERN_INFO 2021-08-16 21:53:22 +02:00
hello-2.c Mention pr_info() rather than KERN_INFO 2021-08-16 21:53:22 +02:00
hello-3.c Mention pr_info() rather than KERN_INFO 2021-08-16 21:53:22 +02:00
hello-4.c Mention pr_info() rather than KERN_INFO 2021-08-16 21:53:22 +02:00
hello-5.c Apply editorial changes 2021-08-08 01:24:59 +08:00
hello-sysfs.c Apply editorial changes 2021-08-08 01:24:59 +08:00
intrpt.c Apply editorial changes 2021-08-08 01:24:59 +08:00
ioctl.c Apply editorial changes 2021-08-08 01:24:59 +08:00
kbleds.c Update some file path to kernel v5.x+ in example/kbleds.c 2021-08-21 14:51:37 +08:00
Makefile Emphasize on 5.x kernel 2021-07-22 08:31:47 +08:00
print_string.c Make program style consistent again 2021-08-08 01:50:42 +08:00
procfs1.c Apply editorial changes 2021-08-08 01:24:59 +08:00
procfs2.c Apply editorial changes 2021-08-08 01:24:59 +08:00
procfs3.c Apply editorial changes 2021-08-08 01:24:59 +08:00
procfs4.c Fix alignment problem in code block (#45) 2021-08-08 01:29:50 +08:00
sched.c Apply editorial changes 2021-08-08 01:24:59 +08:00
sleep.c Fix init message 2021-08-10 00:48:19 +08:00
start.c Apply editorial changes 2021-08-08 01:24:59 +08:00
stop.c Apply editorial changes 2021-08-08 01:24:59 +08:00
syscall.c Update several example code for newer kernel 2021-08-23 21:30:43 +08:00