Article 50Z2G how to find device_driver name if we have pointer to device_node?

how to find device_driver name if we have pointer to device_node?

by
DeanAnderson
from LinuxQuestions.org on (#50Z2G)
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
...
}latest?d=yIl2AUoC8zA latest?i=UTW1ATBgDEs:2OzLUQfAgz4:F7zBnMy latest?i=UTW1ATBgDEs:2OzLUQfAgz4:V_sGLiP latest?d=qj6IDK7rITs latest?i=UTW1ATBgDEs:2OzLUQfAgz4:gIN9vFwUTW1ATBgDEs
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments