mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-21 04:53:46 -04:00
drm: add driver->set_busid() callback
One step closer to dropping all the drm_bus_* code: Add a driver->set_busid() callback and make all drivers use the generic helpers. Nouveau is the only driver that uses two different bus-types with the same drm_driver. This is totally broken if both buses are available on the same machine (unlikely, but lets be safe). Therefore, we create two different drivers for each platform during module_init() and set the set_busid() callback respectively. Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Reviewed-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
committed by
Dave Airlie
parent
1e444be0ef
commit
915b4d11b8
@@ -244,7 +244,13 @@ static int drm_set_busid(struct drm_device *dev, struct drm_file *file_priv)
|
||||
if (master->unique != NULL)
|
||||
drm_unset_busid(dev, master);
|
||||
|
||||
if (dev->driver->bus && dev->driver->bus->set_busid) {
|
||||
if (dev->driver->set_busid) {
|
||||
ret = dev->driver->set_busid(dev, master);
|
||||
if (ret) {
|
||||
drm_unset_busid(dev, master);
|
||||
return ret;
|
||||
}
|
||||
} else if (dev->driver->bus && dev->driver->bus->set_busid) {
|
||||
ret = dev->driver->bus->set_busid(dev, master);
|
||||
if (ret) {
|
||||
drm_unset_busid(dev, master);
|
||||
|
||||
Reference in New Issue
Block a user