Thread (2 messages) flat view 2 messages, 2 authors, 2008-02-01

Re: [PATCH] [POWERPC] Xilinx: hwicap driver

From: Grant Likely <hidden>
Date: 2008-02-01 18:42:25

Possibly related (same subject, not in this thread)

On 2/1/08, Stephen Neuendorffer [off-list ref] wrote:
quoted hunk ↗ jump to hunk
diff --git a/drivers/char/xilinx_hwicap/xilinx_hwicap.c b/drivers/char/xilinx_hwicap/xilinx_hwicap.c
new file mode 100644
index 0000000..83f2d0b
--- /dev/null
+++ b/drivers/char/xilinx_hwicap/xilinx_hwicap.c
+static int hwicap_open(struct inode *inode, struct file *file)
+{
+       struct hwicap_drvdata *drvdata;
+       int status;
+
+       drvdata = container_of(inode->i_cdev, struct hwicap_drvdata, cdev);
+
+       if (down_interruptible(&drvdata->sem))
+               return -ERESTARTSYS;
+
+       drvdata->is_open = 1;
It doesn't look like this flag is used anywhere anymore.
+
+       status = hwicap_initialize_hwicap(drvdata);
+       if (status) {
+               dev_err(drvdata->dev, "Failed to open file");
+               return status;
returning without up()
+       }
+
+       file->private_data = drvdata;
+       drvdata->write_buffer_in_use = 0;
+       drvdata->read_buffer_in_use = 0;
+
+       up(&drvdata->sem);
+
+       return 0;
+}
+
-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help