can: constify platform_device_id
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Sun, 13 Aug 2017 11:11:45 +0000 (16:41 +0530)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 Aug 2017 03:12:23 +0000 (20:12 -0700)
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: David S. Miller <davem@davemloft.net>
drivers/net/can/c_can/c_can_platform.c

index e36d10520e248cd2b4d67bee15b1876cccf994d3..46a746ee80bb02142d3187815fb2f6edfaefd2a9 100644 (file)
@@ -220,7 +220,7 @@ static const struct c_can_driver_data am3352_dcan_drvdata = {
        .raminit_bits = am3352_raminit_bits,
 };
 
-static struct platform_device_id c_can_id_table[] = {
+static const struct platform_device_id c_can_id_table[] = {
        {
                .name = KBUILD_MODNAME,
                .driver_data = (kernel_ulong_t)&c_can_drvdata,