RE: [PATCH V4 04/12] misc: xilinx_sdfec: Add open, close and ioctl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: Greg KH [mailto:gregkh@xxxxxxxxxxxxxxxxxxx]
> Sent: Friday 7 June 2019 16:58
> To: Dragan Cvetic <draganc@xxxxxxxxxx>
> Cc: arnd@xxxxxxxx; Michal Simek <michals@xxxxxxxxxx>; linux-arm-kernel@xxxxxxxxxxxxxxxxxxx; robh+dt@xxxxxxxxxx;
> mark.rutland@xxxxxxx; devicetree@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; Derek Kiernan <dkiernan@xxxxxxxxxx>
> Subject: Re: [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 :)
> 

Accepted.
I will squash this commit with the first next which needs open/close, ioctal.

> thanks,
> 
> greg k-h

Thanks
Dragan





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux