From: "Miguel Ojeda" <maxextreme@gmail.com>
To: "Andrew Morton" <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2.6.19-rc1 update4] drivers: add LCD support
Date: Fri, 27 Oct 2006 14:42:39 +0200 [thread overview]
Message-ID: <653402b90610270542i6d07885ct4beae131b3d09809@mail.gmail.com> (raw)
In-Reply-To: <20061026220703.37182521.akpm@osdl.org>
On 10/27/06, Andrew Morton <akpm@osdl.org> wrote:
> On Thu, 26 Oct 2006 17:48:58 +0000
> Miguel Ojeda Sandonis <maxextreme@gmail.com> wrote:
>
> >
> > +DECLARE_MUTEX(cfag12864bfb_sem);
>
> Mutexes are preferred - please only use semaphores if their counting
> feature is required.
>
> This lock can have static scope.
>
> > +struct page *cfag12864bfb_vma_nopage(struct vm_area_struct *vma,
> > + unsigned long address, int *type)
>
> This function can have static scope.
>
> > +{
> > + struct page *page;
> > + down(&cfag12864bfb_sem);
> > +
> > + page = virt_to_page(cfag12864b_buffer);
> > + get_page(page);
> > +
> > + if(type)
> > + *type = VM_FAULT_MINOR;
> > +
> > + up(&cfag12864bfb_sem);
> > + return page;
> > +}
>
> What's the semaphore actually needed for?
>
Hum, the code is based on LDD3, I just adapted it removing a few
lines. I thought this code also needed lock protection as the LDD3
example. I'm sending a new patch in a few moments with this 3 things
fixed.
Thanks you,
Miguel Ojeda
next prev parent reply other threads:[~2006-10-27 12:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-26 17:48 Miguel Ojeda Sandonis
2006-10-27 5:07 ` Andrew Morton
2006-10-27 12:42 ` Miguel Ojeda [this message]
2006-10-30 9:35 ` Franck Bui-Huu
2006-10-30 13:53 ` Miguel Ojeda
2006-10-31 8:47 ` Franck Bui-Huu
2006-10-31 13:58 ` Miguel Ojeda
2006-10-30 14:24 ` Hugh Dickins
2006-10-27 15:34 Miguel Ojeda Sandonis
2006-10-31 8:13 ` Franck Bui-Huu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=653402b90610270542i6d07885ct4beae131b3d09809@mail.gmail.com \
--to=maxextreme@gmail.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®