Przeglądaj źródła

staging: most: hdm-dim2: constify platform_device_id

platform_device_id are not supposed to change at runtime. All functions
working with platform_device_id provided by <linux/platform_device.h>
work with const platform_device_id. So mark the non-const structs as
const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arvind Yadav 8 lat temu
rodzic
commit
2c73e5761d
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      drivers/staging/most/hdm-dim2/dim2_hdm.c

+ 1 - 1
drivers/staging/most/hdm-dim2/dim2_hdm.c

@@ -894,7 +894,7 @@ static int dim2_remove(struct platform_device *pdev)
 	return 0;
 }
 
-static struct platform_device_id dim2_id[] = {
+static const struct platform_device_id dim2_id[] = {
 	{ "medialb_dim2" },
 	{ }, /* Terminating entry */
 };