mirror of
https://github.com/DigitalDevices/dddvb.git
synced 2025-12-27 07:31:08 +01:00
fix kernel 4.15 compile problems
This commit is contained in:
@@ -80,7 +80,11 @@ ssize_t dvb_ringbuffer_free(struct dvb_ringbuffer *rbuf)
|
||||
* dvb_ringbuffer_read_user(), dvb_ringbuffer_flush(),
|
||||
* or dvb_ringbuffer_reset()
|
||||
*/
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0))
|
||||
free = READ_ONCE(rbuf->pread) - rbuf->pwrite;
|
||||
#else
|
||||
free = ACCESS_ONCE(rbuf->pread) - rbuf->pwrite;
|
||||
#endif
|
||||
if (free <= 0)
|
||||
free += rbuf->size;
|
||||
return free-1;
|
||||
|
||||
Reference in New Issue
Block a user