alanorth/android_device_huawei_u8150 — comment on commit 7bd3fdb706312c2a45a396d7c2d1863d183c046b
File:  line 0
By poruid:

- android.c::android_probe() sets nluns from its arg pdev that contains info about the platform device.
- the function pointer of android_probe() is set as the probe member of the android_platform_driver, which is registered with the kernel by the module init() function.
- the probe() member function of the platform_driver is called at some time by the Linux driver infrastructure.
- I recall having read that the kernel invokes drivers once a bus driver has enumerated the devices on the bus. another source could be the device tree.

Hope this helps.