Re: [PATCH v4 1/3] iio: add watermark logic to iio read and poll

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/04/2015 02:55 PM, Octavian Purdila wrote:
[...]
   int iio_buffer_alloc_sysfs_and_mask(struct iio_dev *indio_dev)
@@ -944,8 +1022,18 @@ static const void *iio_demux(struct iio_buffer
*buffer,
   static int iio_push_to_buffer(struct iio_buffer *buffer, const void
*data)
   {
         const void *dataout = iio_demux(buffer, data);
+       int ret;
+
+       ret = buffer->access->store_to(buffer, dataout);
+       if (ret)
+               return ret;

-       return buffer->access->store_to(buffer, dataout);
+       /*
+        * We can't just test for watermark to decide if we wake the poll
queue
+        * because read may request less samples than the watermark.
+        */
+       wake_up_interruptible(&buffer->pollq);


What happened to poll parameters?


I don't understand you question, can you please elaborate?

Previously we were calling wake_up_interruptible_poll(&r->pollq, POLLIN | POLLRDNORM);

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux