Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752071AbdHXLR3 (ORCPT ); Thu, 24 Aug 2017 07:17:29 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:33973 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751249AbdHXLR2 (ORCPT ); Thu, 24 Aug 2017 07:17:28 -0400 From: Arvind Yadav To: gregkh@linuxfoundation.org, mateuszb@fastmail.fm, viro@zeniv.linux.org.uk Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Subject: [PATCH] USB: core: constify vm_operations_struct Date: Thu, 24 Aug 2017 16:47:09 +0530 Message-Id: <1d90f914014995b0388d8c4be0cfc2bb84d7cf8c.1503573064.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: 772 Lines: 24 vm_operations_struct are not supposed to change at runtime. All functions working with const vm_operations_struct. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- drivers/usb/core/devio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index ebe2759..ddb3440 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb/core/devio.c @@ -210,7 +210,7 @@ static void usbdev_vm_close(struct vm_area_struct *vma) dec_usb_memory_use_count(usbm, &usbm->vma_use_count); } -static struct vm_operations_struct usbdev_vm_ops = { +static const struct vm_operations_struct usbdev_vm_ops = { .open = usbdev_vm_open, .close = usbdev_vm_close }; -- 1.9.1