Hi
In one of my kernel module I have pointer to device_node and pointer to module of interested me another kernel driver. So I have below pointers?
Code:
struct module *owner;
struct device_node *of_node;
I need to do something like that in my kernel module:
Code:
if(!strcmp(name of driver, "specific name of driver"))
{
do sthm
}
How to find pointer to struct* device_driver if I have above?
device_node has const char* name and full_name but those are names of node in device tree which might be chosen freely by user. Instead device_driver name is statically declared in kernel module and it is not changed, example:
Code:
static struct platform_driver some_driver = {
....
.driver = { //this is device_driver type
.name = DRIVER_NAME, //I need to get access to this one from another module
...
}