What is the difference between struct cdev and struct device… here is a solution to the problem.
What is the difference between struct cdev and struct device
Can anyone explain to me the difference between struct cdev
and struct device
?
Solution
At the lowest level, each device in a Linux system is represented by an instance of a struct device
. The device structure contains the information that the device model core needs to model the system. However, most subsystems track additional information about the devices they host. Therefore, few devices are represented by bare device structures; Instead, the structure, like the kobject structure, is typically embedded in a higher-level representation of the device.
more
However,
struct cdev
is a structure that the kernel uses to internally represent character devices.
more