diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdxcp/amdgpu_xcp_drv.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdxcp/amdgpu_xcp_drv.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdxcp/amdgpu_xcp_drv.c b/drivers/gpu/drm/amd/amdxcp/amdgpu_xcp_drv.c index 90ddd8371176..faed84172dd4 100644 --- a/drivers/gpu/drm/amd/amdxcp/amdgpu_xcp_drv.c +++ b/drivers/gpu/drm/amd/amdxcp/amdgpu_xcp_drv.c @@ -43,19 +43,21 @@ static const struct drm_driver amdgpu_xcp_driver = { .minor = 0, }; -static int pdev_num; +static int8_t pdev_num; static struct xcp_device *xcp_dev[MAX_XCP_PLATFORM_DEVICE]; int amdgpu_xcp_drm_dev_alloc(struct drm_device **ddev) { struct platform_device *pdev; struct xcp_device *pxcp_dev; + char dev_name[20]; int ret; if (pdev_num >= MAX_XCP_PLATFORM_DEVICE) return -ENODEV; - pdev = platform_device_register_simple("amdgpu_xcp", pdev_num, NULL, 0); + snprintf(dev_name, sizeof(dev_name), "amdgpu_xcp_%d", pdev_num); + pdev = platform_device_register_simple(dev_name, -1, NULL, 0); if (IS_ERR(pdev)) return PTR_ERR(pdev); |