scsi: sr: constify sr_pm_ops structure
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sun, 28 Aug 2016 20:17:38 +0000 (22:17 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sun, 4 Sep 2016 05:28:08 +0000 (01:28 -0400)
sr_pm_ops, of type struct dev_pm_ops, is never modified, so declare it
as const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/sr.c

index ed179348de80b6d39a5600caf2784f37a3413237..bed2bbd6b92304cec9eabb73245224782da7fc21 100644 (file)
@@ -83,7 +83,7 @@ static int sr_init_command(struct scsi_cmnd *SCpnt);
 static int sr_done(struct scsi_cmnd *);
 static int sr_runtime_suspend(struct device *dev);
 
-static struct dev_pm_ops sr_pm_ops = {
+static const struct dev_pm_ops sr_pm_ops = {
        .runtime_suspend        = sr_runtime_suspend,
 };