Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753523AbdFSHOp (ORCPT ); Mon, 19 Jun 2017 03:14:45 -0400 Received: from mail-it0-f65.google.com ([209.85.214.65]:35026 "EHLO mail-it0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751116AbdFSHOo (ORCPT ); Mon, 19 Jun 2017 03:14:44 -0400 From: Arvind Yadav To: jsarha@ti.com, tomi.valkeinen@ti.com, airlied@linux.ie Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] gpu: drm: tilcdc: make of_device_ids const. Date: Mon, 19 Jun 2017 12:44:05 +0530 Message-Id: <7f2d06e644179d6ed2fa04600d569cf1dd090df4.1497856322.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: 1461 Lines: 41 of_device_ids are not supposed to change at runtime. All functions working with of_device_ids provided by work with const of_device_ids. So mark the non-const structs as const. File size before: text data bss dec hex filename 4805 1408 0 6213 1845 drivers/gpu/drm/tilcdc/tilcdc_drv.o File size after constify tilcdc_of_match. text data bss dec hex filename 5445 800 0 6245 1865 drivers/gpu/drm/tilcdc/tilcdc_drv.o Signed-off-by: Arvind Yadav --- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c index d7ae5be..3672666 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c @@ -61,8 +61,6 @@ void tilcdc_module_cleanup(struct tilcdc_module *mod) list_del(&mod->list); } -static struct of_device_id tilcdc_of_match[]; - static struct drm_framebuffer *tilcdc_fb_create(struct drm_device *dev, struct drm_file *file_priv, const struct drm_mode_fb_cmd2 *mode_cmd) { @@ -661,7 +659,7 @@ static int tilcdc_pdev_remove(struct platform_device *pdev) return 0; } -static struct of_device_id tilcdc_of_match[] = { +static const struct of_device_id tilcdc_of_match[] = { { .compatible = "ti,am33xx-tilcdc", }, { .compatible = "ti,da850-tilcdc", }, { }, -- 1.9.1