Why is the probe method needed in Linux device drivers in addition to init?

后端 未结 7 1227
有刺的猬
有刺的猬 2020-12-04 09:07

In the linux kernel, what does the probe() method, that the driver provides, do? How different is it from the driver\'s init function, i.e. why can

7条回答
  •  旧巷少年郎
    2020-12-04 09:59

    Init(void) // runs once when the driver/module is invoked and sets things up for the kernel driver machine.

    Probe(*pdev) // is used by the kernel driver machine as needed to detect and install actual devices

提交回复
热议问题