From: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>
To: "Dmitry Torokhov" <dtor@insightbb.com>
Cc: "Arjan van de Ven" <arjan@infradead.org>,
"Paul Mundt" <lethal@linux-sh.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] Maple bus support for the Sega Dreamcast - keyboard support
Date: Mon, 10 Sep 2007 11:11:14 -0400 [thread overview]
Message-ID: <d120d5000709100811r520a7eeew7977739e08da85f9@mail.gmail.com> (raw)
In-Reply-To: <8b67d60709100728o699a7fefkc1cb610939fa12d4@mail.gmail.com>
On 9/10/07, Adrian McMenamin <dmitry.torokhov@gmail.com> wrote:
> On 10/09/2007, Dmitry Torokhov <dtor@insightbb.com> wrote:
> > Hi Adrian,
> >
>
> Thanks for the comments - will get on with this but....
>
>
> > > + for (i = 0; i < NR_SCANCODES; i++)
> > > + kbd->keycode[i] = dc_kbd_keycode[i];
> >
> > memcpy?
> >
>
> I see that other drivers use memcpy - and will happily convert over -
> but, out of interest, is there a reasopn why it is superior?
>
First and foremost it conveys the intent clearly - you are copying a
chunk of memory (namely a keymap) from one place to another - thus
memcpy. Plus it may produce smaller/faster code (but since it is not a
hot path this does not matter much).
> >
> > maple_device appears to be fully integrated in sysfs, please add:
> > kbd->dev->dev.parent = &dev->dev;
> >
>
> The bus code already correctly ids the parent device (the above code
> would appear to assign the device as the device's parent
> incidentally). Is it wrong to make that assignment in the central bus
> code as opposed to the driver?
>
Here I want to set up sysfs relation for the newly created struct
input_dev which is a child of struct maple_dev. The central bus
(maple) code has no idea of input device existence, hasn't it? IOW we
need:
input_dev->dev.parent = &maple_dev->dev;
--
Dmitry
prev parent reply other threads:[~2007-09-10 15:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-09 17:01 Adrian McMenamin
2007-09-09 18:30 ` Arjan van de Ven
2007-09-09 20:35 ` Adrian McMenamin
2007-09-09 20:44 ` Arjan van de Ven
2007-09-09 20:57 ` Adrian McMenamin
2007-09-09 21:03 ` Arjan van de Ven
2007-09-10 3:50 ` Dmitry Torokhov
2007-09-10 14:28 ` Adrian McMenamin
2007-09-10 15:11 ` Dmitry Torokhov [this message]
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=d120d5000709100811r520a7eeew7977739e08da85f9@mail.gmail.com \
--to=dmitry.torokhov@gmail.com \
--cc=arjan@infradead.org \
--cc=dtor@insightbb.com \
--cc=lethal@linux-sh.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®