lkml.org 
[lkml]   [2019]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V4 04/12] misc: xilinx_sdfec: Add open, close and ioctl
On Fri, Jun 07, 2019 at 10:58:34AM +0000, Dragan Cvetic wrote:
> > On Sat, May 25, 2019 at 12:37:17PM +0100, Dragan Cvetic wrote:
> > > +static int xsdfec_dev_open(struct inode *iptr, struct file *fptr)
> > > +{
> > > + return 0;
> > > +}
> > > +
> > > +static int xsdfec_dev_release(struct inode *iptr, struct file *fptr)
> > > +{
> > > + return 0;
> > > +}
> >
> > empty open/close functions are never needed, just drop them.
> >
>
> open() is needed to allocate file descriptor eg.
> fd = open(dev_name, O_RDWR);

But you do nothing in those open/release callbacks. Remove them and see
that the code works just fine :)

thanks,

greg k-h

\
 
 \ /
  Last update: 2019-06-07 17:57    [W:0.226 / U:2.800 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site