aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-02-10 07:04:52 -0500
committerDave Airlie <airlied@redhat.com>2012-02-13 07:07:36 -0500
commit51a59ac8739b333eaa43a3102b6acaab5037bfa2 (patch)
treed0c255c23196b38ff31f1b3d68996f729d95e1d1 /drivers
parentade510153ecb7d50aaf9338fb2def2d5a80f1e1e (diff)
drm: Fix kcalloc parameters swapped
The first parameter should be "number of elements" and the second parameter should be "element size". Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/gma500/intel_gmbus.c2
-rw-r--r--drivers/gpu/drm/i915/intel_i2c.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/gma500/intel_gmbus.c b/drivers/gpu/drm/gma500/intel_gmbus.c
index 147584ac8d02..9db90527bf0f 100644
--- a/drivers/gpu/drm/gma500/intel_gmbus.c
+++ b/drivers/gpu/drm/gma500/intel_gmbus.c
@@ -395,7 +395,7 @@ int gma_intel_setup_gmbus(struct drm_device *dev)
395 struct drm_psb_private *dev_priv = dev->dev_private; 395 struct drm_psb_private *dev_priv = dev->dev_private;
396 int ret, i; 396 int ret, i;
397 397
398 dev_priv->gmbus = kcalloc(sizeof(struct intel_gmbus), GMBUS_NUM_PORTS, 398 dev_priv->gmbus = kcalloc(GMBUS_NUM_PORTS, sizeof(struct intel_gmbus),
399 GFP_KERNEL); 399 GFP_KERNEL);
400 if (dev_priv->gmbus == NULL) 400 if (dev_priv->gmbus == NULL)
401 return -ENOMEM; 401 return -ENOMEM;
diff --git a/drivers/gpu/drm/i915/intel_i2c.c b/drivers/gpu/drm/i915/intel_i2c.c
index 7fa4f640e6fd..03573e00471b 100644
--- a/drivers/gpu/drm/i915/intel_i2c.c
+++ b/drivers/gpu/drm/i915/intel_i2c.c
@@ -375,7 +375,7 @@ int intel_setup_gmbus(struct drm_device *dev)
375 struct drm_i915_private *dev_priv = dev->dev_private; 375 struct drm_i915_private *dev_priv = dev->dev_private;
376 int ret, i; 376 int ret, i;
377 377
378 dev_priv->gmbus = kcalloc(sizeof(struct intel_gmbus), GMBUS_NUM_PORTS, 378 dev_priv->gmbus = kcalloc(GMBUS_NUM_PORTS, sizeof(struct intel_gmbus),
379 GFP_KERNEL); 379 GFP_KERNEL);
380 if (dev_priv->gmbus == NULL) 380 if (dev_priv->gmbus == NULL)
381 return -ENOMEM; 381 return -ENOMEM;