lkml.org 
[lkml]   [2010]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] drivers/misc/akm8975: Add compass sensor driver
On Fri, 27 Aug 2010 09:16:07 +0200 Jean Delvare <khali@linux-fr.org> 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;
> > +}


\
 
 \ /
  Last update: 2010-08-27 09:23    [W:0.051 / U:1.560 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site