瀏覽代碼

vfio: platform: constify amba_id

amba_id are not supposed to change at runtime. All functions
working with const amba_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Arvind Yadav 8 年之前
父節點
當前提交
417fb50d55
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/vfio/platform/vfio_amba.c

+ 1 - 1
drivers/vfio/platform/vfio_amba.c

@@ -93,7 +93,7 @@ static int vfio_amba_remove(struct amba_device *adev)
 	return -EINVAL;
 	return -EINVAL;
 }
 }
 
 
-static struct amba_id pl330_ids[] = {
+static const struct amba_id pl330_ids[] = {
 	{ 0, 0 },
 	{ 0, 0 },
 };
 };