lkml.org 
[lkml]   [2014]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 4/4] Staging: lustre: linux-module: add const modifier to file_operations
Date
Add the const modifier to the file_operations struct, since it is
normally const.

Signed-off-by: Jessica Yu <jyu@cowsay.org>
---
drivers/staging/lustre/lustre/libcfs/linux/linux-module.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-module.c b/drivers/staging/lustre/lustre/libcfs/linux/linux-module.c
index 745fe4c..de3c199 100644
--- a/drivers/staging/lustre/lustre/libcfs/linux/linux-module.c
+++ b/drivers/staging/lustre/lustre/libcfs/linux/linux-module.c
@@ -170,7 +170,7 @@ static long libcfs_ioctl(struct file *file,
return rc;
}

-static struct file_operations libcfs_fops = {
+static const struct file_operations libcfs_fops = {
.unlocked_ioctl = libcfs_ioctl,
.open = libcfs_psdev_open,
.release = libcfs_psdev_release,
--
2.0.1


\
 
 \ /
  Last update: 2014-07-28 08:21    [W:0.259 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site