From patchwork Thu Jun 29 08:21:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9816237 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 343E1603D7 for ; Thu, 29 Jun 2017 08:22:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2C6072865A for ; Thu, 29 Jun 2017 08:22:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2128B2867D; Thu, 29 Jun 2017 08:22:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BEE642865A for ; Thu, 29 Jun 2017 08:22:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752117AbdF2IWo (ORCPT ); Thu, 29 Jun 2017 04:22:44 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:33959 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752466AbdF2IW2 (ORCPT ); Thu, 29 Jun 2017 04:22:28 -0400 Received: by mail-pg0-f68.google.com with SMTP id j186so11069837pge.1; Thu, 29 Jun 2017 01:22:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=uE3BAtYz9ltu6LyhwAoz8H0RQaDWLv4sWn8B1Nzu95w=; b=cKciNqvvU5ocZxUIBdlGupDJk9QdTcmcafeogvSwpDBPx5G1kDvrGktc2NaL3CYiqF iygcE8g32JtvqZLYlMks0YtLg4RUUONA2ITG/kvkeMMhUE01bDDiSquKPlFWmry5H8sT OgTwR432BdOa+cDq7MYaeXQwPfH79xjFohzd/vU/c70ReB3vGi1hUXILxsBiLT/HutZA 1T0SD2PLekuAsW5AtZ6V1BjipydWBH3hm1Jm/EfU3H3CJ0A8giItWGs4XyaPxzZli8UP qmUYjsZltrHRJSHoKrGAjHES1xmcJG7/pE3A3HpD/lA5YYDoFNkN22RwzC/i8cC8qnvq 2+/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=uE3BAtYz9ltu6LyhwAoz8H0RQaDWLv4sWn8B1Nzu95w=; b=LPAmDYnYRSDwEsKzOLzQP7D+LH3ahmcqJZDKvZPCtNdP9oh8/0O3vXWHjwlYyNg27x yYXbqnb53vcMPRgLYu2v96jRqT/LGZBZTx/+7hdACBrPLBV23Wlm+fP6+BbqCpJ1CzZf BoG07OncxP37RChVf+bivvP90Bcxgv7qb5uqgGLHoLeTj59KJ6OHMs6CbCW+s/MGqfE2 TQI9/VzGZxjWNQERnq2639mdxgVzM7ivQ/hJOcp36rPyMVTTitbncGal/SjixY3WQS5L yZm25mG+Hn9oPfJf079hI/JsXHcg2hVfuLUO4UX5w/zIg5a6haM5xeuXLQeg+sz6h58x zbzg== X-Gm-Message-State: AKS2vOymSIJjEwBgHn6ZfyGeQ2rfm+dk9wmuBowyR8bNiA5ysfM5xhRr uL/+NIaoUsIjj2F554k= X-Received: by 10.84.232.5 with SMTP id h5mr17109750plk.261.1498724547511; Thu, 29 Jun 2017 01:22:27 -0700 (PDT) Received: from symbol-HP-Z420-Workstation.zebra.lan ([223.31.70.102]) by smtp.googlemail.com with ESMTPSA id o66sm12282396pga.64.2017.06.29.01.22.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 29 Jun 2017 01:22:26 -0700 (PDT) From: Arvind Yadav To: kyungmin.park@samsung.com, s.nawrocki@samsung.com, mchehab@kernel.org, kgene@kernel.org Cc: javier@osg.samsung.com, linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] media: exynos4-is: fimc-is-i2c: constify dev_pm_ops structures. Date: Thu, 29 Jun 2017 13:51:35 +0530 Message-Id: <82b48f71d328c24e7b526e6bbdff15d03229217a.1498724254.git.arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 1195 376 0 1571 623 drivers/media/platform/exynos4-is/fimc-is-i2c.o File size After adding 'const': text data bss dec hex filename 1403 176 0 1579 62b drivers/media/platform/exynos4-is/fimc-is-i2c.o Signed-off-by: Arvind Yadav --- drivers/media/platform/exynos4-is/fimc-is-i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/exynos4-is/fimc-is-i2c.c b/drivers/media/platform/exynos4-is/fimc-is-i2c.c index 2f55966..70dd485 100644 --- a/drivers/media/platform/exynos4-is/fimc-is-i2c.c +++ b/drivers/media/platform/exynos4-is/fimc-is-i2c.c @@ -130,7 +130,7 @@ static int fimc_is_i2c_resume(struct device *dev) } #endif -static struct dev_pm_ops fimc_is_i2c_pm_ops = { +static const struct dev_pm_ops fimc_is_i2c_pm_ops = { SET_RUNTIME_PM_OPS(fimc_is_i2c_runtime_suspend, fimc_is_i2c_runtime_resume, NULL) SET_SYSTEM_SLEEP_PM_OPS(fimc_is_i2c_suspend, fimc_is_i2c_resume)