lkml.org 
[lkml]   [2010]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.



\
 
 \ /
  Last update: 2010-10-26 13:21    [W:0.154 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site