Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752637AbdHMLMU (ORCPT ); Sun, 13 Aug 2017 07:12:20 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:36080 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752469AbdHMLMS (ORCPT ); Sun, 13 Aug 2017 07:12:18 -0400 From: Arvind Yadav To: wg@grandegger.com, mkl@pengutronix.de, madalin.bucur@nxp.com, davem@davemloft.net, sergei.shtylyov@cogentembedded.com, grygorii.strashko@ti.com Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH 2/4] net: dpaa_eth: constify platform_device_id Date: Sun, 13 Aug 2017 16:42:08 +0530 Message-Id: <1502622728-11224-1-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 896 Lines: 25 platform_device_id are not supposed to change at runtime. All functions working with platform_device_id provided by work with const platform_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c index 757b873..4521b33 100644 --- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c +++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c @@ -2829,7 +2829,7 @@ static int dpaa_remove(struct platform_device *pdev) return err; } -static struct platform_device_id dpaa_devtype[] = { +static const struct platform_device_id dpaa_devtype[] = { { .name = "dpaa-ethernet", .driver_data = 0, -- 2.7.4