diff options
| author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-12-11 05:34:34 -0500 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2013-12-17 20:18:12 -0500 |
| commit | 8da79ccd1aaa2efe482b2c555c4684c7b503864a (patch) | |
| tree | 916684aed64742851149eae1e963887e8b998544 | |
| parent | 24986ee06929a8de3a5b4722ccadf0b85c175264 (diff) | |
drm: ->agp_init can't fail
Thanks to the removal of REQUIRE_AGP we can use a void return value
and shed a bit of complexity.
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
| -rw-r--r-- | drivers/gpu/drm/drm_pci.c | 3 | ||||
| -rw-r--r-- | drivers/gpu/drm/drm_stub.c | 7 | ||||
| -rw-r--r-- | include/drm/drmP.h | 2 |
3 files changed, 4 insertions, 8 deletions
diff --git a/drivers/gpu/drm/drm_pci.c b/drivers/gpu/drm/drm_pci.c index c99c71b3d220..d3875e3f9d9c 100644 --- a/drivers/gpu/drm/drm_pci.c +++ b/drivers/gpu/drm/drm_pci.c | |||
| @@ -262,7 +262,7 @@ static int drm_pci_irq_by_busid(struct drm_device *dev, struct drm_irq_busid *p) | |||
| 262 | return 0; | 262 | return 0; |
| 263 | } | 263 | } |
| 264 | 264 | ||
| 265 | static int drm_pci_agp_init(struct drm_device *dev) | 265 | static void drm_pci_agp_init(struct drm_device *dev) |
| 266 | { | 266 | { |
| 267 | if (drm_core_has_AGP(dev)) { | 267 | if (drm_core_has_AGP(dev)) { |
| 268 | if (drm_pci_device_is_agp(dev)) | 268 | if (drm_pci_device_is_agp(dev)) |
| @@ -274,7 +274,6 @@ static int drm_pci_agp_init(struct drm_device *dev) | |||
| 274 | 1024 * 1024); | 274 | 1024 * 1024); |
| 275 | } | 275 | } |
| 276 | } | 276 | } |
| 277 | return 0; | ||
| 278 | } | 277 | } |
| 279 | 278 | ||
| 280 | static void drm_pci_agp_destroy(struct drm_device *dev) | 279 | static void drm_pci_agp_destroy(struct drm_device *dev) |
diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c index 9de0d3d91cc6..82141e6e8ac8 100644 --- a/drivers/gpu/drm/drm_stub.c +++ b/drivers/gpu/drm/drm_stub.c | |||
| @@ -527,11 +527,8 @@ int drm_dev_register(struct drm_device *dev, unsigned long flags) | |||
| 527 | 527 | ||
| 528 | mutex_lock(&drm_global_mutex); | 528 | mutex_lock(&drm_global_mutex); |
| 529 | 529 | ||
| 530 | if (dev->driver->bus->agp_init) { | 530 | if (dev->driver->bus->agp_init) |
| 531 | ret = dev->driver->bus->agp_init(dev); | 531 | dev->driver->bus->agp_init(dev); |
| 532 | if (ret) | ||
| 533 | goto out_unlock; | ||
| 534 | } | ||
| 535 | 532 | ||
| 536 | if (drm_core_check_feature(dev, DRIVER_MODESET)) { | 533 | if (drm_core_check_feature(dev, DRIVER_MODESET)) { |
| 537 | ret = drm_get_minor(dev, &dev->control, DRM_MINOR_CONTROL); | 534 | ret = drm_get_minor(dev, &dev->control, DRM_MINOR_CONTROL); |
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index eef421bb7b95..04909a80735d 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h | |||
| @@ -767,7 +767,7 @@ struct drm_bus { | |||
| 767 | struct drm_unique *unique); | 767 | struct drm_unique *unique); |
| 768 | int (*irq_by_busid)(struct drm_device *dev, struct drm_irq_busid *p); | 768 | int (*irq_by_busid)(struct drm_device *dev, struct drm_irq_busid *p); |
| 769 | /* hooks that are for PCI */ | 769 | /* hooks that are for PCI */ |
| 770 | int (*agp_init)(struct drm_device *dev); | 770 | void (*agp_init)(struct drm_device *dev); |
| 771 | void (*agp_destroy)(struct drm_device *dev); | 771 | void (*agp_destroy)(struct drm_device *dev); |
| 772 | 772 | ||
| 773 | }; | 773 | }; |
