Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752040AbdF2F2m (ORCPT ); Thu, 29 Jun 2017 01:28:42 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:32788 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751654AbdF2F2H (ORCPT ); Thu, 29 Jun 2017 01:28:07 -0400 From: Arvind Yadav To: balbi@kernel.org, gregkh@linuxfoundation.org Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] usb: dwc3: pci: constify dev_pm_ops structures. Date: Thu, 29 Jun 2017 10:57:15 +0530 Message-Id: <79c8f681d152d391cf24c4d051c203457e26bd25.1498713927.git.arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1145 Lines: 32 dev_pm_ops are not supposed to change at runtime. All functions working with dev_pm_ops provided by work with const dev_pm_ops. So mark the non-const structs as const. File size before: text data bss dec hex filename 2707 456 0 3163 c5b drivers/usb/dwc3/dwc3-pci.o File size After adding 'const': text data bss dec hex filename 2899 264 0 3163 c5b drivers/usb/dwc3/dwc3-pci.o Signed-off-by: Arvind Yadav --- drivers/usb/dwc3/dwc3-pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c index a15ec71..9b0fb05 100644 --- a/drivers/usb/dwc3/dwc3-pci.c +++ b/drivers/usb/dwc3/dwc3-pci.c @@ -342,7 +342,7 @@ static int dwc3_pci_resume(struct device *dev) } #endif /* CONFIG_PM_SLEEP */ -static struct dev_pm_ops dwc3_pci_dev_pm_ops = { +static const struct dev_pm_ops dwc3_pci_dev_pm_ops = { SET_SYSTEM_SLEEP_PM_OPS(dwc3_pci_suspend, dwc3_pci_resume) SET_RUNTIME_PM_OPS(dwc3_pci_runtime_suspend, dwc3_pci_runtime_resume, NULL) -- 1.9.1