Home
last modified time | relevance | path

Searched refs:bytes_read (Results 1 – 25 of 38) sorted by relevance

12

/drivers/usb/misc/
Didmouse.c132 int bytes_read; in idmouse_create_image() local
137 bytes_read = sizeof(HEADER)-1; in idmouse_create_image()
166 while (bytes_read < IMGSIZE) { in idmouse_create_image()
169 dev->bulk_in_buffer + bytes_read, in idmouse_create_image()
184 bytes_read += bulk_read; in idmouse_create_image()
193 for (bytes_read = sizeof(HEADER)-1 + WIDTH-1; bytes_read < IMGSIZE; bytes_read += WIDTH) in idmouse_create_image()
194 if (dev->bulk_in_buffer[bytes_read] != 0x00) in idmouse_create_image()
198 for (bytes_read = IMGSIZE-WIDTH; bytes_read < IMGSIZE-1; bytes_read++) in idmouse_create_image()
199 if (dev->bulk_in_buffer[bytes_read] != 0xFF) in idmouse_create_image()
204 bytes_read); in idmouse_create_image()
Dadutux.c399 size_t bytes_read = 0; in adu_read() local
447 bytes_read += (amount - i); in adu_read()
450 retval = bytes_read ? bytes_read : -EFAULT; in adu_read()
494 retval = bytes_read ? bytes_read : -ENOMEM; in adu_read()
516 retval = bytes_read ? bytes_read : -ETIMEDOUT; in adu_read()
522 retval = bytes_read ? bytes_read : -EINTR; in adu_read()
529 retval = bytes_read; in adu_read()
Dyurex.c419 int bytes_read = 0; in yurex_read() local
432 bytes_read = snprintf(in_buffer, 20, "%lld\n", dev->bbu); in yurex_read()
435 if (*ppos < bytes_read) { in yurex_read()
436 if (copy_to_user(buffer, in_buffer + *ppos, bytes_read - *ppos)) in yurex_read()
439 retval = bytes_read - *ppos; in yurex_read()
440 *ppos += bytes_read; in yurex_read()
Dftdi-elan.c671 int bytes_read = 0; in ftdi_elan_read() local
683 if (bytes_read < m) { in ftdi_elan_read()
685 } else if (bytes_read > m) { in ftdi_elan_read()
691 bytes_read += 1; in ftdi_elan_read()
695 return bytes_read; in ftdi_elan_read()
710 } else if (bytes_read > 0) { in ftdi_elan_read()
711 return bytes_read; in ftdi_elan_read()
718 return bytes_read; in ftdi_elan_read()
722 return bytes_read; in ftdi_elan_read()
955 int bytes_read = 0; in ftdi_elan_respond_engine() local
[all …]
Dusblcd.c141 int bytes_read; in lcd_read() local
151 &bytes_read, 10000); in lcd_read()
155 if (copy_to_user(buffer, dev->bulk_in_buffer, bytes_read)) in lcd_read()
158 retval = bytes_read; in lcd_read()
/drivers/char/
Dmsm_smd_pkt.c114 int r, bytes_read; in smd_pkt_read() local
141 bytes_read = smd_cur_packet_size(smd_pkt_devp->ch); in smd_pkt_read()
142 if (bytes_read == 0 || in smd_pkt_read()
143 bytes_read < smd_read_avail(smd_pkt_devp->ch)) { in smd_pkt_read()
149 if (bytes_read > count) { in smd_pkt_read()
151 pr_info("packet size %d > buffer size %d", bytes_read, count); in smd_pkt_read()
155 r = smd_read(smd_pkt_devp->ch, smd_pkt_devp->rx_buf, bytes_read); in smd_pkt_read()
156 if (r != bytes_read) { in smd_pkt_read()
158 pr_err("smd_read failed to read %d bytes: %d\n", bytes_read, r); in smd_pkt_read()
162 D_DUMP_BUFFER("read: ", bytes_read, smd_pkt_devp->rx_buf); in smd_pkt_read()
[all …]
Dppdev.c113 ssize_t bytes_read = 0; in pp_read() local
139 while (bytes_read == 0) { in pp_read()
158 bytes_read = (*fn)(pport, kbuffer, need, flags); in pp_read()
160 bytes_read = parport_read (pport, kbuffer, need); in pp_read()
163 if (bytes_read != 0) in pp_read()
167 bytes_read = -EAGAIN; in pp_read()
172 bytes_read = -ERESTARTSYS; in pp_read()
181 if (bytes_read > 0 && copy_to_user (buf, kbuffer, bytes_read)) in pp_read()
182 bytes_read = -EFAULT; in pp_read()
186 return bytes_read; in pp_read()
/drivers/firmware/
Ddell_rbu.c263 int length, int bytes_read, int *list_read_count) in do_packet_read() argument
273 if (*list_read_count > bytes_read) { in do_packet_read()
275 j = newpacket->length - (*list_read_count - bytes_read); in do_packet_read()
282 if (length > (*list_read_count - bytes_read)) in do_packet_read()
287 bytes_copied = (*list_read_count - bytes_read); in do_packet_read()
301 int bytes_read = 0; in packet_read_list() local
310 bytes_read = rbu_data.packet_read_count; in packet_read_list()
315 remaining_bytes, bytes_read, &temp_count); in packet_read_list()
317 bytes_read += bytes_copied; in packet_read_list()
329 *pread_length = bytes_read - rbu_data.packet_read_count; in packet_read_list()
[all …]
/drivers/ps3/
Dps3-vuart.c399 unsigned int bytes, u64 *bytes_read) in ps3_vuart_raw_read() argument
407 ps3_mm_phys_to_lpar(__pa(buf)), bytes, bytes_read); in ps3_vuart_raw_read()
415 priv->stats.bytes_read += *bytes_read; in ps3_vuart_raw_read()
418 *bytes_read, bytes, priv->stats.bytes_read); in ps3_vuart_raw_read()
465 priv->stats.bytes_read -= bytes_waiting; in ps3_vuart_clear_rx_bytes()
622 unsigned long bytes_read; in ps3_vuart_read() local
645 bytes_read = min((unsigned int)(lb->tail - lb->head), bytes); in ps3_vuart_read()
647 memcpy(buf, lb->head, bytes_read); in ps3_vuart_read()
648 buf += bytes_read; in ps3_vuart_read()
649 bytes -= bytes_read; in ps3_vuart_read()
[all …]
Dvuart.h28 unsigned long bytes_read; member
/drivers/media/rc/
Dredrat3.c216 u16 bytes_read; member
639 rr3->bytes_read = len; in redrat3_read_packet_start()
641 rr3->bytes_read, pktlen); in redrat3_read_packet_start()
657 if (len + rr3->bytes_read > sizeof(rr3->irdata)) { in redrat3_read_packet_continue()
659 rr3->bytes_read = 0; in redrat3_read_packet_continue()
663 memcpy(irdata + rr3->bytes_read, rr3->bulk_in_buf, len); in redrat3_read_packet_continue()
665 rr3->bytes_read += len; in redrat3_read_packet_continue()
666 rr3_dbg(rr3->dev, "bytes_read %d, pktlen %d\n", rr3->bytes_read, in redrat3_read_packet_continue()
679 if (rr3->bytes_read == 0 && len >= sizeof(struct redrat3_header)) { in redrat3_get_ir_data()
681 } else if (rr3->bytes_read != 0) { in redrat3_get_ir_data()
[all …]
/drivers/net/wireless/iwlwifi/mvm/
Dnvm.c99 int ret, bytes_read, offset_read; in iwl_nvm_read_chunk() local
120 bytes_read = le16_to_cpu(nvm_resp->length); in iwl_nvm_read_chunk()
139 memcpy(data + offset, resp_data, bytes_read); in iwl_nvm_read_chunk()
140 ret = bytes_read; in iwl_nvm_read_chunk()
/drivers/pci/hotplug/
Dacpiphp_ibm.c372 int bytes_read = -EINVAL; in ibm_read_apci_table() local
378 bytes_read = ibm_get_table_from_acpi(&table); in ibm_read_apci_table()
379 if (bytes_read > 0 && bytes_read <= size) in ibm_read_apci_table()
380 memcpy(buffer, table, bytes_read); in ibm_read_apci_table()
383 return bytes_read; in ibm_read_apci_table()
/drivers/char/hw_random/
Dcore.c109 int bytes_read, len; in rng_dev_read() local
123 bytes_read = rng_get_data(current_rng, rng_buffer, in rng_dev_read()
126 if (bytes_read < 0) { in rng_dev_read()
127 err = bytes_read; in rng_dev_read()
130 data_avail = bytes_read; in rng_dev_read()
/drivers/tty/serial/
Dsunhv.c125 unsigned long bytes_read, i; in receive_chars_read() local
126 long stat = sun4v_con_read(ra, PAGE_SIZE, &bytes_read); in receive_chars_read()
129 bytes_read = 0; in receive_chars_read()
136 bytes_read = 1; in receive_chars_read()
152 for (i = 0; i < bytes_read; i++) in receive_chars_read()
158 port->icount.rx += bytes_read; in receive_chars_read()
161 bytes_read); in receive_chars_read()
/drivers/mtd/
Dbcm47xxpart.c60 size_t bytes_read; in bcm47xxpart_parse() local
90 &bytes_read, (uint8_t *)buf) < 0) { in bcm47xxpart_parse()
180 if (mtd_read(master, offset, 0x4, &bytes_read, in bcm47xxpart_parse()
/drivers/video/omap2/displays/
Dpanel-tfp410.c262 int r, l, bytes_read; in tfp410_read_edid() local
276 bytes_read = l; in tfp410_read_edid()
287 bytes_read += l; in tfp410_read_edid()
292 return bytes_read; in tfp410_read_edid()
/drivers/media/dvb-core/
Ddvb_ca_en50221.c591 int bytes_read; in dvb_ca_en50221_read_data() local
626 bytes_read = status << 8; in dvb_ca_en50221_read_data()
629 bytes_read |= status; in dvb_ca_en50221_read_data()
633 if (bytes_read > ca->slot_info[slot].link_buf_size) { in dvb_ca_en50221_read_data()
635 ca->dvbdev->adapter->num, bytes_read, ca->slot_info[slot].link_buf_size); in dvb_ca_en50221_read_data()
640 if (bytes_read < 2) { in dvb_ca_en50221_read_data()
648 if (bytes_read > ecount) { in dvb_ca_en50221_read_data()
657 for (i = 0; i < bytes_read; i++) { in dvb_ca_en50221_read_data()
681 dvb_ringbuffer_pkt_write(&ca->slot_info[slot].rx_buffer, buf, bytes_read); in dvb_ca_en50221_read_data()
683 memcpy(ebuf, buf, bytes_read); in dvb_ca_en50221_read_data()
[all …]
/drivers/usb/misc/sisusbvga/
Dsisusb.c471 void *kernbuffer, char __user *userbuffer, ssize_t *bytes_read, in sisusb_recv_bulk_msg() argument
479 (*bytes_read) = 0; in sisusb_recv_bulk_msg()
527 (*bytes_read) += thispass; in sisusb_recv_bulk_msg()
548 return ((*bytes_read) == len) ? 0 : -EIO; in sisusb_recv_bulk_msg()
1143 char __user *userbuffer, ssize_t *bytes_read) in sisusb_read_mem_bulk() argument
1150 (*bytes_read = 0); in sisusb_read_mem_bulk()
1163 (*bytes_read)++; in sisusb_read_mem_bulk()
1179 (*bytes_read) += 2; in sisusb_read_mem_bulk()
1194 (*bytes_read) += 3; in sisusb_read_mem_bulk()
1219 (*bytes_read) += 4; in sisusb_read_mem_bulk()
[all …]
/drivers/staging/wlags49_h2/
Dwl_profile.c304 int bytes_read = 0; in readline() local
310 while ((result = read(filedesc, &buffer[bytes_read], 1)) == 1) { in readline()
311 if (buffer[bytes_read] == '\n') { in readline()
312 buffer[bytes_read] = '\0'; in readline()
313 bytes_read++; in readline()
316 bytes_read++; in readline()
324 return bytes_read; in readline()
/drivers/media/platform/
Domap24xxcam-dma.c465 len = sg_state->len - sg_state->bytes_read; in omap24xxcam_sgdma_process()
482 sg_state->bytes_read += len; in omap24xxcam_sgdma_process()
524 sg_state->bytes_read = 0; in omap24xxcam_sgdma_queue()
592 sgdma->sg_state[sg].bytes_read = 0; in omap24xxcam_sgdma_init()
/drivers/media/usb/usbvision/
Dusbvision-video.c1038 frame->bytes_read = 0; in usbvision_read()
1044 frame->index, frame->bytes_read, frame->scanlength); in usbvision_read()
1047 if ((count + frame->bytes_read) > (unsigned long)frame->scanlength) in usbvision_read()
1048 count = frame->scanlength - frame->bytes_read; in usbvision_read()
1050 if (copy_to_user(buf, frame->data + frame->bytes_read, count)) in usbvision_read()
1053 frame->bytes_read += count; in usbvision_read()
1056 (unsigned long)count, frame->bytes_read); in usbvision_read()
1060 frame->bytes_read = 0; in usbvision_read()
/drivers/usb/gadget/
Ds3c2410_udc.c548 int bytes_read = 0; in s3c2410_udc_read_fifo_crq() local
552 bytes_read = s3c2410_udc_fifo_count_out(); in s3c2410_udc_read_fifo_crq()
554 dprintk(DEBUG_NORMAL, "%s: fifo_count=%d\n", __func__, bytes_read); in s3c2410_udc_read_fifo_crq()
556 if (bytes_read > sizeof(struct usb_ctrlrequest)) in s3c2410_udc_read_fifo_crq()
557 bytes_read = sizeof(struct usb_ctrlrequest); in s3c2410_udc_read_fifo_crq()
559 readsb(S3C2410_UDC_EP0_FIFO_REG + base_addr, outbuf, bytes_read); in s3c2410_udc_read_fifo_crq()
562 bytes_read, crq->bRequest, crq->bRequestType, in s3c2410_udc_read_fifo_crq()
565 return bytes_read; in s3c2410_udc_read_fifo_crq()
/drivers/staging/tidspbridge/pmgr/
Ddbll.c859 int bytes_read = 0; in dbll_read_buffer() local
863 bytes_read = in dbll_read_buffer()
867 return bytes_read; in dbll_read_buffer()
1235 int bytes_read = 0; in read_mem() local
1239 return bytes_read; in read_mem()
/drivers/staging/comedi/
Dcomedi_fops.c937 bi.bytes_read = 0; in do_bufinfo_ioctl()
942 bi.bytes_read = 0; in do_bufinfo_ioctl()
949 if (bi.bytes_read && (s->subdev_flags & SDF_CMD_READ)) { in do_bufinfo_ioctl()
950 bi.bytes_read = comedi_buf_read_alloc(async, bi.bytes_read); in do_bufinfo_ioctl()
951 comedi_buf_read_free(async, bi.bytes_read); in do_bufinfo_ioctl()

12