bbswitch will now bind a driver to the PCI device, this should remove
races that can occur when a PCI device is removed after bbswitch is
loaded.
Fixes:
- Fixed a crash on some laptops that trigger a hotplug (a problem
since Linux 3.12,
https://github.com/Bumblebee-Project/bbswitch/issues/100)
- As a driver is bound, you cannot "accidentally" load nouveau/nvidia
anymore and confuse the power state.
Removed pci_set_master, there is no need for access to the PCI BARs.
pci_enable_device is removed too as the memory regions are not needed.
TODO:
- Remove unload_state, it is a no-op.
- Update load_state doc (assume ON by default).
- System suspend/resume probably needs special treatment to ensure that
the device is off again.