scsi: ibmvfc: constify dev_pm_ops structures.
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Thu, 29 Jun 2017 07:54:41 +0000 (13:24 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sat, 1 Jul 2017 21:05:22 +0000 (17:05 -0400)
dev_pm_ops are not supposed to change at runtime. All functions
working with dev_pm_ops provided by <linux/device.h> work with const
dev_pm_ops. So mark the non-const structs as const.

File size before:
   text    data     bss     dec     hex filename
  41937    1296      20   43253    a8f5 drivers/scsi/ibmvscsi/ibmvfc.o

File size After adding 'const':
   text    data     bss     dec     hex filename
  42129    1104      20   43253    a8f5 drivers/scsi/ibmvscsi/ibmvfc.o

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Acked-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ibmvscsi/ibmvfc.c

index 26cd3c28186acfd56725b0f4750836b795020331..cc4e05be8d4a24aa01782a62ca2fd3d157d24777 100644 (file)
@@ -4935,7 +4935,7 @@ static struct vio_device_id ibmvfc_device_table[] = {
 };
 MODULE_DEVICE_TABLE(vio, ibmvfc_device_table);
 
-static struct dev_pm_ops ibmvfc_pm_ops = {
+static const struct dev_pm_ops ibmvfc_pm_ops = {
        .resume = ibmvfc_resume
 };