Hi, >From: ext Alan Cox [mailto:[email protected]] >Sent: 26 October, 2010 14:18 >To: Grant Likely >Cc: Koskinen Ilkka (Nokia-MS/Tampere); [email protected]; >[email protected]; [email protected]; >[email protected] >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 ------------------------------------------------------------------------------ Nokia and AT&T present the 2010 Calling All Innovators-North America contest Create new apps & games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev _______________________________________________ spi-devel-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/spi-devel-general
