Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[firefly-linux-kernel-4.4.55.git] / drivers / uwb / uwb-debug.c
index 4a42993700c1aaadc3dbe55dd75c8d3738f04aff..6ec45beb7af5e5bf55756e6d622447dc989dfc48 100644 (file)
@@ -159,13 +159,6 @@ static int cmd_ie_rm(struct uwb_rc *rc, struct uwb_dbg_cmd_ie *ie_to_rm)
        return uwb_rc_ie_rm(rc, ie_to_rm->data[0]);
 }
 
-static int command_open(struct inode *inode, struct file *file)
-{
-       file->private_data = inode->i_private;
-
-       return 0;
-}
-
 static ssize_t command_write(struct file *file, const char __user *buf,
                         size_t len, loff_t *off)
 {
@@ -205,8 +198,8 @@ static ssize_t command_write(struct file *file, const char __user *buf,
        return ret < 0 ? ret : len;
 }
 
-static struct file_operations command_fops = {
-       .open   = command_open,
+static const struct file_operations command_fops = {
+       .open   = simple_open,
        .write  = command_write,
        .read   = NULL,
        .llseek = no_llseek,
@@ -255,7 +248,7 @@ static int reservations_open(struct inode *inode, struct file *file)
        return single_open(file, reservations_print, inode->i_private);
 }
 
-static struct file_operations reservations_fops = {
+static const struct file_operations reservations_fops = {
        .open    = reservations_open,
        .read    = seq_read,
        .llseek  = seq_lseek,
@@ -283,7 +276,7 @@ static int drp_avail_open(struct inode *inode, struct file *file)
        return single_open(file, drp_avail_print, inode->i_private);
 }
 
-static struct file_operations drp_avail_fops = {
+static const struct file_operations drp_avail_fops = {
        .open    = drp_avail_open,
        .read    = seq_read,
        .llseek  = seq_lseek,