From: Eva Rachel Retuya Date: Thu, 22 Sep 2016 15:33:34 +0000 (+0800) Subject: staging: greybus: arche-platform: declare struct of_device_id as const X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cdcffc0cdf553500dca22d93e3a87e2e0848aa83;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git staging: greybus: arche-platform: declare struct of_device_id as const Declare the arrays 'arche_platform_of_match' and 'arche_combined_id' as const. 'arche_platform_of_match' is only stored in the .of_match_table field of a device_driver structure, which is declared as const. 'arche_combined_id' is passed to MODULE_DEVICE_TABLE. This macro does not modify the array and therefore the array can be declared as const. Checkpatch pointed out both issues. WARNING: struct of_device_id should be normally const Signed-off-by: Eva Rachel Retuya Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/arche-platform.c b/drivers/staging/greybus/arche-platform.c index d6b36099d8ea..e36ee984485b 100644 --- a/drivers/staging/greybus/arche-platform.c +++ b/drivers/staging/greybus/arche-platform.c @@ -776,12 +776,12 @@ static SIMPLE_DEV_PM_OPS(arche_platform_pm_ops, arche_platform_suspend, arche_platform_resume); -static struct of_device_id arche_platform_of_match[] = { +static const struct of_device_id arche_platform_of_match[] = { { .compatible = "google,arche-platform", }, /* Use PID/VID of SVC device */ { }, }; -static struct of_device_id arche_combined_id[] = { +static const struct of_device_id arche_combined_id[] = { { .compatible = "google,arche-platform", }, /* Use PID/VID of SVC device */ { .compatible = "usbffff,2", }, { },