diff options
Diffstat (limited to 'drivers/gpu/drm/drm_platform.c')
-rw-r--r-- | drivers/gpu/drm/drm_platform.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_platform.c b/drivers/gpu/drm/drm_platform.c index 7223f06d8e58..2a8b6265ad3d 100644 --- a/drivers/gpu/drm/drm_platform.c +++ b/drivers/gpu/drm/drm_platform.c | |||
@@ -123,14 +123,15 @@ static int drm_platform_set_busid(struct drm_device *dev, struct drm_master *mas | |||
123 | { | 123 | { |
124 | int len, ret; | 124 | int len, ret; |
125 | 125 | ||
126 | master->unique_len = 10 + strlen(dev->platformdev->name); | 126 | master->unique_len = 13 + strlen(dev->platformdev->name); |
127 | master->unique_size = master->unique_len; | ||
127 | master->unique = kmalloc(master->unique_len + 1, GFP_KERNEL); | 128 | master->unique = kmalloc(master->unique_len + 1, GFP_KERNEL); |
128 | 129 | ||
129 | if (master->unique == NULL) | 130 | if (master->unique == NULL) |
130 | return -ENOMEM; | 131 | return -ENOMEM; |
131 | 132 | ||
132 | len = snprintf(master->unique, master->unique_len, | 133 | len = snprintf(master->unique, master->unique_len, |
133 | "platform:%s", dev->platformdev->name); | 134 | "platform:%s:%02d", dev->platformdev->name, dev->platformdev->id); |
134 | 135 | ||
135 | if (len > master->unique_len) { | 136 | if (len > master->unique_len) { |
136 | DRM_ERROR("Unique buffer overflowed\n"); | 137 | DRM_ERROR("Unique buffer overflowed\n"); |