FINALLY A RESPONSE HERE....^_^
yep...it's very strange...
This should be a serious problem about pmem...
BTW, I think that private_data pointer check in pmem_open is
necessary..
I commented out that misc device patch instead...

hope more people here could share their experience of this problem

On 6月29日, 下午6時17分, Shlomi Mor <shlomi....@gmail.com> wrote:
> Hi,
>
> I also see the exact same behavior.
> I checked out the history of misc.c, and saw that initialization of
> private_data field was added at kernel version 2.6.35.
> I see that the problem still exists on android kernel 2.6.39 (http://
> android.git.kernel.org).
> For now I just commented out the test for private_data inside
> pmem_open...
>
> I agree it seems very strange...
>
> Thanks,
>         Shlomi
>
> On Jun 22, 12:35 pm, xxGrayxx <xgray...@gmail.com> wrote:
>
>
>
>
>
>
>
> > hi all experts.
> > I am trying to port a sensor driver (implemented as a misc device) to
> > our platform.
> > The IP provider told us that Linux kernel patch 96412 (https://
> > patchwork.kernel.org/patch/96412/) must to be included,
> > and what this patch does is "pass miscdevice pointer via file private
> > data" in misc_open function (drivers/char/misc.c)
>
> > After I assign this patch to our kernel code, I found a problem ofpmemin 
> > open function.
> > in pmem_open function of the file drivers/misc/pmem.c, non-null
> > pointed of file->private_data is checked
>
> > if (file->private_data != NULL)
> >     return -1;
>
> > depends on what the patch 96412 does, above code will always return
> > -1.
>
> > I found that these codes also exist on Android Open Source Project.
> > I am wondering if this is a known issue or I have some
> > misunderstanding of misc driver andpmembehavior??

-- 
unsubscribe: android-kernel+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-kernel

Reply via email to