From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: Ilkka Koskinen <ilkka.koskinen@nokia.com>,
linux-input@vger.kernel.org, dmitry.torokhov@gmail.com,
spi-devel-general@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] input: spi: Driver for SPI data stream driven vibrator
Date: Tue, 26 Oct 2010 12:17:49 +0100 [thread overview]
Message-ID: <20101026121749.298dc60a@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <20101026111344.GB24714@angua.secretlab.ca>
> > + if (!einfo->buf) {
> > + einfo->buf = kzalloc(datalen, GFP_KERNEL | GFP_DMA);
> > + if (!einfo->buf) {
> > + ret = -ENOMEM;
> > + goto exit;
> > + }
> > + }
> > +
> > + memcpy(einfo->buf, p->custom_data, datalen);
>
> It looks like raw data from userspace is being passed on to the
> device. Is this sane? Is there already a data format used by other
> vibration/feedback devices that should be used here instead and
> translated into the form expected by the hardware?
It also seems to be using GFP_DMA not dma_alloc functions which looks a
bit odd and certainly isn't portable.
next prev parent reply other threads:[~2010-10-26 11:18 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-25 13:31 Ilkka Koskinen
2010-10-26 11:13 ` Grant Likely
2010-10-26 11:17 ` Alan Cox [this message]
2010-10-26 16:52 ` ilkka.koskinen
2010-10-26 16:50 ` ilkka.koskinen
2010-10-27 8:47 ` Grant Likely
2010-10-27 8:58 ` Dmitry Torokhov
2010-10-27 9:19 ` Alan Cox
2010-10-26 16:09 ` Dmitry Torokhov
2010-10-27 12:55 ` ilkka.koskinen
2010-11-07 23:51 ` Alan Cox
2010-11-08 11:08 ` ilkka.koskinen
2010-11-08 11:38 ` Alan Cox
2010-11-08 12:18 ` ilkka.koskinen
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=20101026121749.298dc60a@lxorguk.ukuu.org.uk \
--to=alan@lxorguk.ukuu.org.uk \
--cc=dmitry.torokhov@gmail.com \
--cc=grant.likely@secretlab.ca \
--cc=ilkka.koskinen@nokia.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=spi-devel-general@lists.sourceforge.net \
/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®