From patchwork Mon Jan 23 19:01:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhumika Goyal X-Patchwork-Id: 9533373 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 595D960434 for ; Mon, 23 Jan 2017 19:01:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4B78527F17 for ; Mon, 23 Jan 2017 19:01:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3F97C2838D; Mon, 23 Jan 2017 19:01:21 +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 E5F0627F17 for ; Mon, 23 Jan 2017 19:01:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751124AbdAWTBT (ORCPT ); Mon, 23 Jan 2017 14:01:19 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:33489 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751102AbdAWTBT (ORCPT ); Mon, 23 Jan 2017 14:01:19 -0500 Received: by mail-pf0-f193.google.com with SMTP id e4so10495783pfg.0; Mon, 23 Jan 2017 11:01:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=P2/U0rVwdAbn9dFaqlnAmz6cNy9vsDq9t0NGNhksSOo=; b=YTs9v2BW71p+zaLuitNZAuKx9Ms5vFwfMSFqsITytgeYqdARasj8q827THrp0DbTwU 0+zwC6SFWt07UnesZxr/U4nyW75byg9oxAcpBKeVBI8A7E6+ht0X/gu/k02oq7SRZOAD 9dI6Yfoc9TdubMZwnwp6151o9AGd53WuYO0UP6p4FmdHQ46XF4pCxf89IyjWEBSvSOq0 x5jH3ra46bmJZ3lohCQkukklVfp/MlVNfi1C7PqFyCAvCMPweJc2IMWiawIvLGhlc6uO m4NiihJUm5zJCZkIgtFkKqZWCYBzo4pXF1HX5Ua2+JF9vcCbbJ4RbGiqVrxTxlehD6zE W1rw== 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=P2/U0rVwdAbn9dFaqlnAmz6cNy9vsDq9t0NGNhksSOo=; b=XLK0RXqIsPa9yTm2RxmpN1br15COje7t+9KNtqKPIycP6GD+BdIAnyZ0ZXVZdtCs7B fPH0HI/rbnArLeXWhuwvw/898KMh3J4iWAa3DqVW9RCPNdmwuIzJk4H6MMPg3vALyQV3 9TkzMb0EKPHumDcov6/bBGgTZGvzZ+sgOZgNnF3l0s4Xi11Jkl4GZSAmW+5r0geJZ7ot Xy2b+ZOU00uwGCEfzcJatWfMIWdnLCjINnMV4jwclbUdxJDUbnkVod3z3pmfdPlSLGEH uynqJb9kvyVYj9Nk9YggJeQaJjuHmkp+GlqqiWiZAzLehgA+SNFWLgQSTot3H3qihTrE eDlg== X-Gm-Message-State: AIkVDXKSnIMYGz6n32tkoaDTEA903bj3flDoeyJvHIoM7vnLqFCoSZ4x/41gKkanHf6L7w== X-Received: by 10.98.163.216 with SMTP id q85mr33635337pfl.123.1485198078496; Mon, 23 Jan 2017 11:01:18 -0800 (PST) Received: from gmail.com ([2405:204:540c:52df:c9ba:932c:541d:cc0e]) by smtp.gmail.com with ESMTPSA id h14sm38958795pgn.41.2017.01.23.11.01.14 (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 23 Jan 2017 11:01:17 -0800 (PST) Received: by gmail.com (sSMTP sendmail emulation); Tue, 24 Jan 2017 00:31:10 +0530 From: Bhumika Goyal To: julia.lawall@lip6.fr, dmitry.torokhov@gmail.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Bhumika Goyal Subject: [PATCH] input: constify device_type structures Date: Tue, 24 Jan 2017 00:31:07 +0530 Message-Id: <1485198067-14284-1-git-send-email-bhumirks@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Declare device_type structures as const as they are only stored in the type field of a device structure. This field is of type const, so add const to declaration of device_type structures. File size before: text data bss dec hex filename 17184 1344 80 18608 48b0 drivers/input/input.o File size after: text data bss dec hex filename 17248 1280 80 18608 48b0 drivers/input/input.o File size before: text data bss dec hex filename 2355 384 8 2747 abb drivers/input/rmi4/rmi_bus.o File size after: text data bss dec hex filename 2483 264 8 2755 ac3 drivers/input/rmi4/rmi_bus.o Signed-off-by: Bhumika Goyal --- drivers/input/input.c | 2 +- drivers/input/rmi4/rmi_bus.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/input/input.c b/drivers/input/input.c index d95c34e..6a75bb0 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c @@ -1749,7 +1749,7 @@ static int input_dev_poweroff(struct device *dev) }; #endif /* CONFIG_PM */ -static struct device_type input_dev_type = { +static const struct device_type input_dev_type = { .groups = input_dev_attr_groups, .release = input_dev_release, .uevent = input_dev_uevent, diff --git a/drivers/input/rmi4/rmi_bus.c b/drivers/input/rmi4/rmi_bus.c index 1c40d94..213e318 100644 --- a/drivers/input/rmi4/rmi_bus.c +++ b/drivers/input/rmi4/rmi_bus.c @@ -55,7 +55,7 @@ static void rmi_release_device(struct device *dev) kfree(rmi_dev); } -static struct device_type rmi_device_type = { +static const struct device_type rmi_device_type = { .name = "rmi4_sensor", .release = rmi_release_device, }; @@ -134,7 +134,7 @@ static void rmi_release_function(struct device *dev) kfree(fn); } -static struct device_type rmi_function_type = { +static const struct device_type rmi_function_type = { .name = "rmi4_function", .release = rmi_release_function, };