Hi Yiping,
How about the driver source code during boot up in the kernel, for example eth0 ? for example probe,
static struct platform_driver random_driver = {
.probe = random_probe,
.remove = random_remove,
.driver = {
.owner = THIS_MODULE,
.name = CARDNAME,
.of_match_table = of_match_ptr(random),
},
};
How do these things get called when loading a module in the kernel. i am really wanting to understand as I want to build a module myself for my ethernet
Be more specific:
int (*probe) (struct pci_dev *dev, const struct pci_device_id *id);
this one that is passed to struct pci_dev *dev, who is filling up this structure ( I think it should be the writer most likely but at which source code (Or calls) to fill up this information (etc. header files or .c file) then passed to the kernel core?