Thread (25 messages) 25 messages, 3 authors, 2019-06-08

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

From: Greg KH <gregkh@linuxfoundation.org>
Date: 2019-06-07 15:57:37
Also in: linux-devicetree, lkml

On Fri, Jun 07, 2019 at 10:58:34AM +0000, Dragan Cvetic wrote:
quoted
On Sat, May 25, 2019 at 12:37:17PM +0100, Dragan Cvetic wrote:
quoted
+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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help