File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -63,13 +63,6 @@ DEFINE_SIMPLE_ATTRIBUTE(
6363 "%llx\n" );
6464
6565
66- static int mdp4_debugfs_open (struct inode * inode , struct file * file )
67- {
68- /* non-seekable */
69- file -> f_mode &= ~(FMODE_LSEEK | FMODE_PREAD | FMODE_PWRITE );
70- return 0 ;
71- }
72-
7366static int mdp4_debugfs_release (struct inode * inode , struct file * file )
7467{
7568 return 0 ;
@@ -144,10 +137,11 @@ static ssize_t mdp4_debugfs_read(
144137}
145138
146139static const struct file_operations mdp4_debugfs_fops = {
147- .open = mdp4_debugfs_open ,
140+ .open = nonseekable_open ,
148141 .release = mdp4_debugfs_release ,
149142 .read = mdp4_debugfs_read ,
150143 .write = mdp4_debugfs_write ,
144+ .llseek = no_llseek ,
151145};
152146
153147int mdp4_debugfs_init (void )
Original file line number Diff line number Diff line change @@ -1356,7 +1356,7 @@ static int lcd_open(struct inode *inode, struct file *file)
13561356 lcd_must_clear = 0 ;
13571357 }
13581358 lcd_open_cnt ++ ;
1359- return 0 ;
1359+ return nonseekable_open ( inode , file ) ;
13601360}
13611361
13621362static int lcd_release (struct inode * inode , struct file * file )
@@ -1369,6 +1369,7 @@ static const struct file_operations lcd_fops = {
13691369 .write = lcd_write ,
13701370 .open = lcd_open ,
13711371 .release = lcd_release ,
1372+ .llseek = no_llseek ,
13721373};
13731374
13741375static struct miscdevice lcd_dev = {
You can’t perform that action at this time.
0 commit comments