Drivers broadly fall into one of two categories.
If the driver is intended to be "long running" and possibly provide for an entire "class" of USB devices such as a HID driver for a keyboard and mouse. It should be written as a module (as the example driver is). This modules initialisation process will set up communications with the USB core using the messaging system and it will be informed of devices being plugged and unplugged on the bus as they occur.
If the driver is intended for "short term" use or a specific device it only has need to be started when a device is plugged in, such as an mp3 player, camera or a scanner, it may be written as an application.
The USB system provides two mechanisms for an application driver to obtain device information. The driver may be started by the USB system when a device is plugged in obtaining the attached device information from its command line, or it may obtain a list of connected devices which are unclaimed when it is run. See Chapter 3, Driver Initialisation for more details.
This type of driver is obviously only available when there are filesystems to load drivers from, typically after system boot, and are hence only useful for devices not needed to start a system. These driver will probably be application code, perhaps even wimp tasks and do not have the development constraints of a module (no fp etc.)