ptp: ptp_clockmatrix: constify copied structure
authorJulia Lawall <Julia.Lawall@inria.fr>
Wed, 1 Jan 2020 07:43:31 +0000 (08:43 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 3 Jan 2020 00:31:03 +0000 (16:31 -0800)
The idtcm_caps structure is only copied into another structure,
so make it const.

The opportunity for this change was found using Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/ptp/ptp_clockmatrix.c

index a5110b7b4ece2a30ebbc13c77dd7e7051940058d..e85836715f0b293e12edba8cf6160a7d49f365a8 100644 (file)
@@ -1102,7 +1102,7 @@ static void idtcm_display_version_info(struct idtcm *idtcm)
                 product_id, hw_rev_id, bond_id, csr_id, irq_id);
 }
 
-static struct ptp_clock_info idtcm_caps = {
+static const struct ptp_clock_info idtcm_caps = {
        .owner          = THIS_MODULE,
        .max_adj        = 244000,
        .n_per_out      = 1,