summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_dma.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-08-09 19:18:43 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-08-11 13:44:48 +0200
commitdbbe91279511d6a18a521b953a3c139e4787e660 (patch)
tree688df67fbdf4e5ef02bcd68ec07d699463d8075a /drivers/gpu/drm/i915/i915_dma.c
parent9bec9b1334d687c0a9fcf3d3a1987a61b4826a45 (diff)
downloadop-kernel-dev-dbbe91279511d6a18a521b953a3c139e4787e660.zip
op-kernel-dev-dbbe91279511d6a18a521b953a3c139e4787e660.tar.gz
drm/i915: Agnostic INTEL_INFO
Adapt the macro so that we can pass either the struct drm_device or the struct drm_i915_private pointers and get the answer we want. Over time, my plan is to convert all users over to using drm_i915_private and so trimming down the pointer dance. Having spent a few hours chasing that goal and achieved over 8k of object code saving, it appears to be a worthwhile target. This interim macro allows us to slowly convert over. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> [danvet: Drop the (struct drm_device *) cast per the m-l discussion. Also explain the seemingly unecessary first cast.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_dma.c')
-rw-r--r--drivers/gpu/drm/i915/i915_dma.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 1867e26..1763fbf 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1596,6 +1596,9 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
if (!drm_core_check_feature(dev, DRIVER_MODESET) && !dev->agp)
return -EINVAL;
+ /* For the ugly agnostic INTEL_INFO macro */
+ BUILD_BUG_ON(sizeof(*dev_priv) == sizeof(*dev));
+
dev_priv = kzalloc(sizeof(*dev_priv), GFP_KERNEL);
if (dev_priv == NULL)
return -ENOMEM;
OpenPOWER on IntegriCloud