[PATCH] [POWERPC] Xilinx: hwicap driver
Grant Likely
grant.likely at secretlab.ca
Sat Feb 2 05:42:23 EST 2008
On 2/1/08, Stephen Neuendorffer <stephen.neuendorffer at xilinx.com> wrote:
> 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.
More information about the Linuxppc-dev
mailing list