Re: [PATCH 1/1] drivers/misc/akm8975: Add compass sensor driver

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

 



On Fri, 27 Aug 2010 09:16:07 +0200 Jean Delvare <khali@xxxxxxxxxxxx> wrote:

> > +static int akm_aot_open(struct inode *inode, struct file *file)
> > +{
> > +	int ret = -1;
> 
> Useless and dangerous initialization.
> 
> > +
> > +	FUNCDBG("called");
> > +	if (atomic_cmpxchg(&open_flag, 0, 1) == 0) {
> > +		wake_up(&open_wq);
> > +		ret = 0;

this doesn't do anything either.

> > +	}
> > +
> > +	ret = nonseekable_open(inode, file);
> > +	if (ret)
> > +		return ret;
> > +
> > +	file->private_data = akmd_data;
> > +
> > +	return ret;
> > +}
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux