Home
last modified time | relevance | path

Searched refs:rbuf (Results 1 – 25 of 75) sorted by relevance

123

/drivers/media/dvb-core/
Ddvb_ringbuffer.c42 void dvb_ringbuffer_init(struct dvb_ringbuffer *rbuf, void *data, size_t len) in dvb_ringbuffer_init() argument
44 rbuf->pread=rbuf->pwrite=0; in dvb_ringbuffer_init()
45 rbuf->data=data; in dvb_ringbuffer_init()
46 rbuf->size=len; in dvb_ringbuffer_init()
47 rbuf->error=0; in dvb_ringbuffer_init()
49 init_waitqueue_head(&rbuf->queue); in dvb_ringbuffer_init()
51 spin_lock_init(&(rbuf->lock)); in dvb_ringbuffer_init()
56 int dvb_ringbuffer_empty(struct dvb_ringbuffer *rbuf) in dvb_ringbuffer_empty() argument
64 return (rbuf->pread == smp_load_acquire(&rbuf->pwrite)); in dvb_ringbuffer_empty()
69 ssize_t dvb_ringbuffer_free(struct dvb_ringbuffer *rbuf) in dvb_ringbuffer_free() argument
[all …]
Ddvb_ringbuffer.h77 extern void dvb_ringbuffer_init(struct dvb_ringbuffer *rbuf, void *data, size_t len);
80 extern int dvb_ringbuffer_empty(struct dvb_ringbuffer *rbuf);
83 extern ssize_t dvb_ringbuffer_free(struct dvb_ringbuffer *rbuf);
86 extern ssize_t dvb_ringbuffer_avail(struct dvb_ringbuffer *rbuf);
93 extern void dvb_ringbuffer_reset(struct dvb_ringbuffer *rbuf);
99 extern void dvb_ringbuffer_flush(struct dvb_ringbuffer *rbuf);
102 extern void dvb_ringbuffer_flush_spinlock_wakeup(struct dvb_ringbuffer *rbuf);
105 #define DVB_RINGBUFFER_PEEK(rbuf,offs) \ argument
106 (rbuf)->data[((rbuf)->pread+(offs))%(rbuf)->size]
109 #define DVB_RINGBUFFER_SKIP(rbuf,num) \ argument
[all …]
/drivers/staging/android/fiq_debugger/
Dfiq_debugger_ringbuf.h31 struct fiq_debugger_ringbuf *rbuf; in fiq_debugger_ringbuf_alloc() local
33 rbuf = kzalloc(sizeof(*rbuf) + len, GFP_KERNEL); in fiq_debugger_ringbuf_alloc()
34 if (rbuf == NULL) in fiq_debugger_ringbuf_alloc()
37 rbuf->len = len; in fiq_debugger_ringbuf_alloc()
38 rbuf->head = 0; in fiq_debugger_ringbuf_alloc()
39 rbuf->tail = 0; in fiq_debugger_ringbuf_alloc()
42 return rbuf; in fiq_debugger_ringbuf_alloc()
45 static inline void fiq_debugger_ringbuf_free(struct fiq_debugger_ringbuf *rbuf) in fiq_debugger_ringbuf_free() argument
47 kfree(rbuf); in fiq_debugger_ringbuf_free()
50 static inline int fiq_debugger_ringbuf_level(struct fiq_debugger_ringbuf *rbuf) in fiq_debugger_ringbuf_level() argument
[all …]
/drivers/media/usb/dvb-usb-v2/
Dlmedm04.c171 u8 *wbuf, int wlen, u8 *rbuf, int rlen) in lme2510_usb_talk() argument
200 memcpy(rbuf, buff, rlen); in lme2510_usb_talk()
227 static u8 rbuf[1]; in lme2510_enable_pid() local
246 sizeof(pid_buff) , rbuf, sizeof(rbuf)); in lme2510_enable_pid()
258 static u8 *ibuf, *rbuf; in lme2510_int_response() local
275 rbuf = (u8 *) lme_urb->transfer_buffer; in lme2510_int_response()
281 ibuf = (u8 *)&rbuf[i*8]; in lme2510_int_response()
398 static u8 rbuf[1]; in lme2510_pid_filter_ctrl() local
407 sizeof(clear_pid_reg), rbuf, sizeof(rbuf)); in lme2510_pid_filter_ctrl()
458 u8 *wbuf, int wlen, u8 *rbuf, int rlen) in lme2510_msg() argument
[all …]
Ddvb_usb_urb.c25 u8 *wbuf, u16 wlen, u8 *rbuf, u16 rlen) in dvb_usb_v2_generic_io() argument
47 if (!ret && rbuf && rlen) { in dvb_usb_v2_generic_io()
55 rbuf, rlen, &actual_length, 2000); in dvb_usb_v2_generic_io()
62 actual_length, rbuf); in dvb_usb_v2_generic_io()
69 u8 *wbuf, u16 wlen, u8 *rbuf, u16 rlen) in dvb_usbv2_generic_rw() argument
74 ret = dvb_usb_v2_generic_io(d, wbuf, wlen, rbuf, rlen); in dvb_usbv2_generic_rw()
94 u8 *wbuf, u16 wlen, u8 *rbuf, u16 rlen) in dvb_usbv2_generic_rw_locked() argument
96 return dvb_usb_v2_generic_io(d, wbuf, wlen, rbuf, rlen); in dvb_usbv2_generic_rw_locked()
Dau6610.c28 u8 *wbuf, u16 wlen, u8 *rbuf, u16 rlen) in au6610_usb_msg() argument
72 rbuf[0] = usb_buf[4]; in au6610_usb_msg()
80 u8 *wbuf, u16 wlen, u8 *rbuf, u16 rlen) in au6610_i2c_msg() argument
83 u8 wo = (rbuf == NULL || rlen == 0); /* write-only */ in au6610_i2c_msg()
91 return au6610_usb_msg(d, request, addr, wbuf, wlen, rbuf, rlen); in au6610_i2c_msg()
Daf9035.c121 memcpy(req->rbuf, &state->buf[ACK_HDR_LEN], req->rlen); in af9035_ctrl_msg()
480 u8 rbuf[4]; in af9035_identify_state() local
482 sizeof(rbuf), rbuf }; in af9035_identify_state()
484 ret = af9035_rd_regs(d, 0x1222, rbuf, 3); in af9035_identify_state()
488 state->chip_version = rbuf[0]; in af9035_identify_state()
489 state->chip_type = rbuf[2] << 8 | rbuf[1] << 0; in af9035_identify_state()
518 dev_dbg(&d->udev->dev, "%s: reply=%*ph\n", __func__, 4, rbuf); in af9035_identify_state()
519 if (rbuf[0] || rbuf[1] || rbuf[2] || rbuf[3]) in af9035_identify_state()
670 u8 rbuf[4]; in af9035_download_firmware() local
673 struct usb_req req_fw_ver = { CMD_FW_QUERYINFO, 0, 1, wbuf, 4, rbuf }; in af9035_download_firmware()
[all …]
/drivers/ata/
Dlibata-scsi.c1940 unsigned int (*actor)(struct ata_scsi_args *args, u8 *rbuf)) in ata_scsi_rbuf_fill() argument
1942 u8 *rbuf; in ata_scsi_rbuf_fill() local
1947 rbuf = ata_scsi_rbuf_get(cmd, false, &flags); in ata_scsi_rbuf_fill()
1948 rc = actor(args, rbuf); in ata_scsi_rbuf_fill()
1967 static unsigned int ata_scsiop_inq_std(struct ata_scsi_args *args, u8 *rbuf) in ata_scsiop_inq_std() argument
1992 memcpy(rbuf, hdr, sizeof(hdr)); in ata_scsiop_inq_std()
1993 memcpy(&rbuf[8], "ATA ", 8); in ata_scsiop_inq_std()
1994 ata_id_string(args->id, &rbuf[16], ATA_ID_PROD, 16); in ata_scsiop_inq_std()
1997 ata_id_string(args->id, &rbuf[32], ATA_ID_FW_REV + 2, 4); in ata_scsiop_inq_std()
1998 if (strncmp(&rbuf[32], " ", 4) == 0) in ata_scsiop_inq_std()
[all …]
/drivers/media/usb/dvb-usb/
Dfriio.c34 u8 *wbuf, u16 wlen, u8 *rbuf, u16 rlen) in gl861_i2c_ctrlmsg_data() argument
38 int wo = (rbuf == NULL || rlen == 0); /* write only */ in gl861_i2c_ctrlmsg_data()
63 u8 *wbuf, u16 wlen, u8 *rbuf, u16 rlen) in gl861_i2c_msg() argument
67 int wo = (rbuf == NULL || rlen == 0); /* write-only */ in gl861_i2c_msg()
74 return gl861_i2c_ctrlmsg_data(d, addr, wbuf, wlen, rbuf, rlen); in gl861_i2c_msg()
105 value, index, rbuf, rlen, 2000); in gl861_i2c_msg()
226 u8 *rbuf, *wbuf; in friio_initialize() local
234 rbuf = kmalloc(2, GFP_KERNEL); in friio_initialize()
235 if (!rbuf) { in friio_initialize()
271 ret = gl861_i2c_msg(d, 0x12 >> 1, wbuf, 3, rbuf, 2); in friio_initialize()
[all …]
Ddvb-usb-urb.c11 int dvb_usb_generic_rw(struct dvb_usb_device *d, u8 *wbuf, u16 wlen, u8 *rbuf, in dvb_usb_generic_rw() argument
40 if (!ret && rbuf && rlen) { in dvb_usb_generic_rw()
47 d->props.generic_bulk_ctrl_endpoint),rbuf,rlen,&actlen, in dvb_usb_generic_rw()
54 debug_dump(rbuf,actlen,deb_xfer); in dvb_usb_generic_rw()
Dfriio-fe.c241 u8 rbuf[37]; in jdvbt90502_read_signal_strength() local
248 rbuf, sizeof(rbuf)); in jdvbt90502_read_signal_strength()
256 *strength = (rbuf[3] << 8) + rbuf[4]; in jdvbt90502_read_signal_strength()
257 if (rbuf[2]) in jdvbt90502_read_signal_strength()
/drivers/infiniband/hw/qib/
Dqib_common.h766 static inline __u32 qib_hdrget_err_flags(const __le32 *rbuf) in qib_hdrget_err_flags() argument
768 return __le32_to_cpu(rbuf[1]) & QLOGIC_IB_RHF_H_ERR_MASK; in qib_hdrget_err_flags()
771 static inline __u32 qib_hdrget_rcv_type(const __le32 *rbuf) in qib_hdrget_rcv_type() argument
773 return (__le32_to_cpu(rbuf[0]) >> QLOGIC_IB_RHF_RCVTYPE_SHIFT) & in qib_hdrget_rcv_type()
777 static inline __u32 qib_hdrget_length_in_bytes(const __le32 *rbuf) in qib_hdrget_length_in_bytes() argument
779 return ((__le32_to_cpu(rbuf[0]) >> QLOGIC_IB_RHF_LENGTH_SHIFT) & in qib_hdrget_length_in_bytes()
783 static inline __u32 qib_hdrget_index(const __le32 *rbuf) in qib_hdrget_index() argument
785 return (__le32_to_cpu(rbuf[0]) >> QLOGIC_IB_RHF_EGRINDEX_SHIFT) & in qib_hdrget_index()
789 static inline __u32 qib_hdrget_seq(const __le32 *rbuf) in qib_hdrget_seq() argument
791 return (__le32_to_cpu(rbuf[1]) >> QLOGIC_IB_RHF_SEQ_SHIFT) & in qib_hdrget_seq()
[all …]
/drivers/infiniband/hw/ipath/
Dipath_common.h805 static inline __u32 ipath_hdrget_err_flags(const __le32 * rbuf) in ipath_hdrget_err_flags() argument
807 return __le32_to_cpu(rbuf[1]) & INFINIPATH_RHF_H_ERR_MASK; in ipath_hdrget_err_flags()
810 static inline __u32 ipath_hdrget_rcv_type(const __le32 * rbuf) in ipath_hdrget_rcv_type() argument
812 return (__le32_to_cpu(rbuf[0]) >> INFINIPATH_RHF_RCVTYPE_SHIFT) in ipath_hdrget_rcv_type()
816 static inline __u32 ipath_hdrget_length_in_bytes(const __le32 * rbuf) in ipath_hdrget_length_in_bytes() argument
818 return ((__le32_to_cpu(rbuf[0]) >> INFINIPATH_RHF_LENGTH_SHIFT) in ipath_hdrget_length_in_bytes()
822 static inline __u32 ipath_hdrget_index(const __le32 * rbuf) in ipath_hdrget_index() argument
824 return (__le32_to_cpu(rbuf[0]) >> INFINIPATH_RHF_EGRINDEX_SHIFT) in ipath_hdrget_index()
828 static inline __u32 ipath_hdrget_seq(const __le32 *rbuf) in ipath_hdrget_seq() argument
830 return (__le32_to_cpu(rbuf[1]) >> INFINIPATH_RHF_SEQ_SHIFT) in ipath_hdrget_seq()
[all …]
/drivers/gpu/drm/udl/
Dudl_connector.c25 char *rbuf; in udl_get_edid() local
32 rbuf = kmalloc(2, GFP_KERNEL); in udl_get_edid()
33 if (rbuf == NULL) in udl_get_edid()
39 (0x80 | (0x02 << 5)), i << 8, 0xA1, rbuf, 2, in udl_get_edid()
45 block[i] = rbuf[1]; in udl_get_edid()
48 kfree(rbuf); in udl_get_edid()
53 kfree(rbuf); in udl_get_edid()
/drivers/media/rc/
Dir-lirc-codec.c41 if (!dev->raw->lirc.drv || !dev->raw->lirc.drv->rbuf) in ir_lirc_decode()
90 lirc_buffer_write(dev->raw->lirc.drv->rbuf, in ir_lirc_decode()
101 lirc_buffer_write(dev->raw->lirc.drv->rbuf, in ir_lirc_decode()
103 wake_up(&dev->raw->lirc.drv->rbuf->wait_poll); in ir_lirc_decode()
345 struct lirc_buffer *rbuf; in ir_lirc_register() local
353 rbuf = kzalloc(sizeof(struct lirc_buffer), GFP_KERNEL); in ir_lirc_register()
354 if (!rbuf) in ir_lirc_register()
357 rc = lirc_buffer_init(rbuf, sizeof(int), LIRCBUF_SIZE); in ir_lirc_register()
390 drv->rbuf = rbuf; in ir_lirc_register()
411 kfree(rbuf); in ir_lirc_register()
[all …]
/drivers/staging/media/lirc/
Dlirc_zilog.c104 struct lirc_buffer rbuf; member
202 if (ir->rbuf.fifo_initialized) in release_ir_device()
203 lirc_buffer_free(&ir->rbuf); in release_ir_device()
276 wake_up_interruptible(&ir->rbuf.wait_poll); in put_ir_rx()
331 struct lirc_buffer *rbuf = ir->l.rbuf; in add_to_buf() local
335 if (lirc_buffer_full(rbuf)) { in add_to_buf()
448 lirc_buffer_write(rbuf, codes); in add_to_buf()
451 } while (!lirc_buffer_full(rbuf)); in add_to_buf()
473 struct lirc_buffer *rbuf = ir->l.rbuf; in lirc_thread() local
500 wake_up_interruptible(&rbuf->wait_poll); in lirc_thread()
[all …]
Dlirc_sasem.c169 lirc_buffer_free(context->driver->rbuf); in delete_context()
170 kfree(context->driver->rbuf); in delete_context()
631 lirc_buffer_write(context->driver->rbuf, buf); in incoming_packet()
632 wake_up(&context->driver->rbuf->wait_poll); in incoming_packet()
682 struct lirc_buffer *rbuf = NULL; in sasem_probe() local
767 rbuf = kmalloc(sizeof(struct lirc_buffer), GFP_KERNEL); in sasem_probe()
768 if (!rbuf) { in sasem_probe()
772 if (lirc_buffer_init(rbuf, BUF_CHUNK_SIZE, BUF_SIZE)) { in sasem_probe()
804 driver->rbuf = rbuf; in sasem_probe()
868 lirc_buffer_free(rbuf); in sasem_probe()
[all …]
Dlirc_imon.c195 lirc_buffer_free(context->driver->rbuf); in free_imon_context()
196 kfree(context->driver->rbuf); in free_imon_context()
571 lirc_buffer_write(context->driver->rbuf, buf); in submit_data()
572 wake_up(&context->driver->rbuf->wait_poll); in submit_data()
723 struct lirc_buffer *rbuf = NULL; in imon_probe() local
828 rbuf = kmalloc(sizeof(struct lirc_buffer), GFP_KERNEL); in imon_probe()
829 if (!rbuf) { in imon_probe()
833 if (lirc_buffer_init(rbuf, BUF_CHUNK_SIZE, BUF_SIZE)) { in imon_probe()
861 driver->rbuf = rbuf; in imon_probe()
944 if (rbuf) in imon_probe()
[all …]
Dlirc_serial.c217 static struct lirc_buffer rbuf; variable
556 if (lirc_buffer_full(&rbuf)) { in rbwrite()
561 lirc_buffer_write(&rbuf, (void *)&l); in rbwrite()
702 wake_up_interruptible(&rbuf.wait_poll); in lirc_irq_handler()
1003 .rbuf = &rbuf,
1050 lirc_buffer_clear(&rbuf); in lirc_serial_resume()
1072 result = lirc_buffer_init(&rbuf, sizeof(int), RBUF_LEN); in lirc_serial_init()
1099 lirc_buffer_free(&rbuf); in lirc_serial_init()
1107 lirc_buffer_free(&rbuf); in lirc_serial_exit()
/drivers/w1/slaves/
Dw1_ds2423.c48 u8 rbuf[COUNTER_COUNT * READ_BYTE_COUNT]; in w1_slave_show() local
76 rbuf + (p * READ_BYTE_COUNT), READ_BYTE_COUNT); in w1_slave_show()
80 rbuf[(p * READ_BYTE_COUNT) + ii]); in w1_slave_show()
92 crc = crc16(crc, rbuf, 11); in w1_slave_show()
99 (rbuf + 11) + in w1_slave_show()
107 result |= rbuf[(p * in w1_slave_show()
/drivers/video/backlight/
Dili922x.c156 unsigned char rbuf[CMD_BUFSIZE]; in ili922x_read_status() local
162 xfer.rx_buf = rbuf; in ili922x_read_status()
184 *rs = (rbuf[2] << 8) + rbuf[3]; in ili922x_read_status()
199 unsigned char rbuf[CMD_BUFSIZE]; in ili922x_read() local
206 xfer_regindex.rx_buf = rbuf; in ili922x_read()
228 xfer_regvalue.rx_buf = &rbuf[send_bytes]; in ili922x_read()
238 *rx = (rbuf[1 + send_bytes] << 8) + rbuf[2 + send_bytes]; in ili922x_read()
253 unsigned char rbuf[CMD_BUFSIZE]; in ili922x_write() local
261 xfer_regindex.rx_buf = rbuf; in ili922x_write()
285 xfer_regvalue.rx_buf = rbuf; in ili922x_write()
/drivers/isdn/i4l/
Disdn_v110.c166 unsigned char *rbuf = v->decodebuf; in SyncHeader() local
171 for (rbuf++, len--; len > 0; len--, rbuf++) /* such den SyncHeader in buf ! */ in SyncHeader()
172 if ((*rbuf & v->key) == 0) /* erstes byte gefunden ? */ in SyncHeader()
175 memcpy(v->decodebuf, rbuf, len); in SyncHeader()
261 unsigned char *rbuf; in isdn_v110_decode() local
267 rbuf = skb->data; in isdn_v110_decode()
276 for (; len > 0; len--, rbuf++) /* scan for SyncHeader in buf */ in isdn_v110_decode()
277 if ((*rbuf & v->key) == 0) in isdn_v110_decode()
284 memcpy(&(v->decodebuf[v->decodelen]), rbuf, len); in isdn_v110_decode()
462 unsigned char *rbuf; in isdn_v110_encode() local
[all …]
/drivers/media/common/b2c2/
Dflexcop-eeprom.c16 u32 len, u8 *wbuf, u8 *rbuf, int retries)
22 if (eeprom_lrc_read(adapter, addr, len, rbuf, retries) == 1)
33 u8 rbuf[20];
44 return eeprom_lrc_write(adapter, 0x3e4, 20, wbuf, rbuf, 4);
/drivers/tty/
Dn_hdlc.c566 struct n_hdlc_buf *rbuf; in n_hdlc_tty_read() local
595 rbuf = n_hdlc_buf_get(&n_hdlc->rx_buf_list); in n_hdlc_tty_read()
596 if (rbuf) { in n_hdlc_tty_read()
597 if (rbuf->count > nr) { in n_hdlc_tty_read()
601 if (copy_to_user(buf, rbuf->buf, rbuf->count)) in n_hdlc_tty_read()
604 ret = rbuf->count; in n_hdlc_tty_read()
609 kfree(rbuf); in n_hdlc_tty_read()
611 n_hdlc_buf_put(&n_hdlc->rx_free_buf_list, rbuf); in n_hdlc_tty_read()
/drivers/target/
Dtarget_core_spc.c711 unsigned char *rbuf; in spc_emulate_inquiry() local
755 rbuf = transport_kmap_data_sg(cmd); in spc_emulate_inquiry()
756 if (rbuf) { in spc_emulate_inquiry()
757 memcpy(rbuf, buf, min_t(u32, SE_INQUIRY_BUF, cmd->data_length)); in spc_emulate_inquiry()
986 unsigned char buf[SE_MODE_PAGE_BUF], *rbuf; in spc_emulate_modesense() local
1095 rbuf = transport_kmap_data_sg(cmd); in spc_emulate_modesense()
1096 if (rbuf) { in spc_emulate_modesense()
1097 memcpy(rbuf, buf, min_t(u32, SE_MODE_PAGE_BUF, cmd->data_length)); in spc_emulate_modesense()
1169 unsigned char *rbuf; in spc_emulate_request_sense() local
1181 rbuf = transport_kmap_data_sg(cmd); in spc_emulate_request_sense()
[all …]

123