[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <F80267346F10C541946CBE8909F1C39E35932598BD@NOK-EUMSG-02.mgdnok.nokia.com>
Date: Tue, 26 Oct 2010 18:52:07 +0200
From: <ilkka.koskinen@...ia.com>
To: <alan@...rguk.ukuu.org.uk>, <grant.likely@...retlab.ca>
CC: <linux-input@...r.kernel.org>, <dmitry.torokhov@...il.com>,
<spi-devel-general@...ts.sourceforge.net>,
<linux-kernel@...r.kernel.org>, <ilkka.koskinen@...ia.com>
Subject: RE: [PATCH] input: spi: Driver for SPI data stream driven vibrator
Hi,
>From: ext Alan Cox [mailto:alan@...rguk.ukuu.org.uk]
>Sent: 26 October, 2010 14:18
>To: Grant Likely
>Cc: Koskinen Ilkka (Nokia-MS/Tampere); linux-input@...r.kernel.org;
>dmitry.torokhov@...il.com; spi-devel-general@...ts.sourceforge.net;
>linux-kernel@...r.kernel.org
>Subject: Re: [PATCH] input: spi: Driver for SPI data stream driven
>vibrator
>
>> > + 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.
Right, I'll change it to the appropriate ones.
Cheers, Ilkka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists