summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_ioctl.c
diff options
context:
space:
mode:
authorJohn Stultz <john.stultz@linaro.org>2011-04-18 13:19:07 -0700
committerJohn Stultz <john.stultz@linaro.org>2011-04-18 13:19:07 -0700
commit775d71e49c65f1f6aa57776ea1da62988fc9a30a (patch)
treece03cae544bacc8dda67422fd66a543dd1ae3c99 /drivers/gpu/drm/drm_ioctl.c
parent18e82d2b952ab57fc1c8a69d4fa14e562f2aecf6 (diff)
parentc1a952f48517b5545075d8eb1a5d543099bd2ae1 (diff)
Merge branch 'upstream/linaro.38' into linaro-android.38KNOWN_GOOD
Diffstat (limited to 'drivers/gpu/drm/drm_ioctl.c')
-rw-r--r--drivers/gpu/drm/drm_ioctl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c
index 47db4df37a6..075024b88f4 100644
--- a/drivers/gpu/drm/drm_ioctl.c
+++ b/drivers/gpu/drm/drm_ioctl.c
@@ -165,14 +165,15 @@ static int drm_set_busid(struct drm_device *dev, struct drm_file *file_priv)
drm_unset_busid(dev, master);
if (drm_core_check_feature(dev, DRIVER_USE_PLATFORM_DEVICE)) {
- master->unique_len = 10 + strlen(dev->platformdev->name);
+ master->unique_len = 13 + strlen(dev->platformdev->name);
+ master->unique_size = master->unique_len;
master->unique = kmalloc(master->unique_len + 1, GFP_KERNEL);
if (master->unique == NULL)
return -ENOMEM;
len = snprintf(master->unique, master->unique_len,
- "platform:%s", dev->platformdev->name);
+ "platform:%s:%02d", dev->platformdev->name, dev->primary->index);
if (len > master->unique_len) {
DRM_ERROR("Unique buffer overflowed\n");