Home
last modified time | relevance | path

Searched refs:buf (Results 1 – 25 of 4011) sorted by relevance

12345678910>>...161

/drivers/media/dvb-frontends/
Dnxt200x.c72 static int i2c_writebytes (struct nxt200x_state* state, u8 addr, u8 *buf, u8 len) in i2c_writebytes() argument
75 struct i2c_msg msg = { .addr = addr, .flags = 0, .buf = buf, .len = len }; in i2c_writebytes()
85 static int i2c_readbytes(struct nxt200x_state *state, u8 addr, u8 *buf, u8 len) in i2c_readbytes() argument
88 struct i2c_msg msg = { .addr = addr, .flags = I2C_M_RD, .buf = buf, .len = len }; in i2c_readbytes()
99 const u8 *buf, u8 len) in nxt200x_writebytes() argument
103 …struct i2c_msg msg = { .addr = state->config->demod_address, .flags = 0, .buf = buf2, .len = len +… in nxt200x_writebytes()
112 memcpy(&buf2[1], buf, len); in nxt200x_writebytes()
122 static int nxt200x_readbytes(struct nxt200x_state *state, u8 reg, u8 *buf, u8 len) in nxt200x_readbytes() argument
126 …struct i2c_msg msg [] = { { .addr = state->config->demod_address, .flags = 0, .buf = reg2, .len = … in nxt200x_readbytes()
127 { .addr = state->config->demod_address, .flags = I2C_M_RD, .buf = buf, .len = len } }; in nxt200x_readbytes()
[all …]
/drivers/media/v4l2-core/
Dvideobuf2-dma-sg.c57 static int vb2_dma_sg_alloc_compacted(struct vb2_dma_sg_buf *buf, in vb2_dma_sg_alloc_compacted() argument
61 int size = buf->size; in vb2_dma_sg_alloc_compacted()
82 __free_page(buf->pages[last_page]); in vb2_dma_sg_alloc_compacted()
90 buf->pages[last_page++] = &pages[i]; in vb2_dma_sg_alloc_compacted()
102 struct vb2_dma_sg_buf *buf; in vb2_dma_sg_alloc() local
110 buf = kzalloc(sizeof *buf, GFP_KERNEL); in vb2_dma_sg_alloc()
111 if (!buf) in vb2_dma_sg_alloc()
114 buf->vaddr = NULL; in vb2_dma_sg_alloc()
115 buf->dma_dir = dma_dir; in vb2_dma_sg_alloc()
116 buf->offset = 0; in vb2_dma_sg_alloc()
[all …]
Dvideobuf2-dma-contig.c70 struct vb2_dc_buf *buf = buf_priv; in vb2_dc_cookie() local
72 return &buf->dma_addr; in vb2_dc_cookie()
77 struct vb2_dc_buf *buf = buf_priv; in vb2_dc_vaddr() local
79 if (!buf->vaddr && buf->db_attach) in vb2_dc_vaddr()
80 buf->vaddr = dma_buf_vmap(buf->db_attach->dmabuf); in vb2_dc_vaddr()
82 return buf->vaddr; in vb2_dc_vaddr()
87 struct vb2_dc_buf *buf = buf_priv; in vb2_dc_num_users() local
89 return atomic_read(&buf->refcount); in vb2_dc_num_users()
94 struct vb2_dc_buf *buf = buf_priv; in vb2_dc_prepare() local
95 struct sg_table *sgt = buf->dma_sgt; in vb2_dc_prepare()
[all …]
Dvideobuf2-vmalloc.c40 struct vb2_vmalloc_buf *buf; in vb2_vmalloc_alloc() local
42 buf = kzalloc(sizeof(*buf), GFP_KERNEL | gfp_flags); in vb2_vmalloc_alloc()
43 if (!buf) in vb2_vmalloc_alloc()
46 buf->size = size; in vb2_vmalloc_alloc()
47 buf->vaddr = vmalloc_user(buf->size); in vb2_vmalloc_alloc()
48 buf->dma_dir = dma_dir; in vb2_vmalloc_alloc()
49 buf->handler.refcount = &buf->refcount; in vb2_vmalloc_alloc()
50 buf->handler.put = vb2_vmalloc_put; in vb2_vmalloc_alloc()
51 buf->handler.arg = buf; in vb2_vmalloc_alloc()
53 if (!buf->vaddr) { in vb2_vmalloc_alloc()
[all …]
/drivers/media/pci/saa7164/
Dsaa7164-buffer.c69 void saa7164_buffer_display(struct saa7164_buffer *buf) in saa7164_buffer_display() argument
71 struct saa7164_dev *dev = buf->port->dev; in saa7164_buffer_display()
75 __func__, buf, buf->idx); in saa7164_buffer_display()
77 buf->cpu, (long long)buf->dma, buf->pci_size); in saa7164_buffer_display()
79 buf->pt_cpu, (long long)buf->pt_dma, buf->pt_size); in saa7164_buffer_display()
85 i, buf->pt_cpu, (u64)*(buf->pt_cpu)); in saa7164_buffer_display()
96 struct saa7164_buffer *buf = NULL; in saa7164_buffer_alloc() local
105 buf = kzalloc(sizeof(struct saa7164_buffer), GFP_KERNEL); in saa7164_buffer_alloc()
106 if (!buf) { in saa7164_buffer_alloc()
111 buf->idx = -1; in saa7164_buffer_alloc()
[all …]
/drivers/media/usb/dvb-usb-v2/
Dmxl111sf-i2c.c260 &msg->buf[i]); in mxl111sf_i2c_sw_xfer_msg()
291 msg->buf[i]); in mxl111sf_i2c_sw_xfer_msg()
343 u8 buf[26]; in mxl111sf_i2c_check_status() local
347 buf[0] = USB_READ_I2C_CMD; in mxl111sf_i2c_check_status()
348 buf[1] = 0x00; in mxl111sf_i2c_check_status()
350 buf[2] = I2C_INT_STATUS_REG; in mxl111sf_i2c_check_status()
351 buf[3] = 0x00; in mxl111sf_i2c_check_status()
352 buf[4] = 0x00; in mxl111sf_i2c_check_status()
354 buf[5] = USB_END_I2C_CMD; in mxl111sf_i2c_check_status()
356 mxl111sf_i2c_get_data(state, 0, buf, buf); in mxl111sf_i2c_check_status()
[all …]
/drivers/net/wireless/ath/ath5k/
Ddebug.c199 char buf[500]; in read_file_beacon() local
205 len += snprintf(buf + len, sizeof(buf) - len, in read_file_beacon()
210 len += snprintf(buf + len, sizeof(buf) - len, "%-24s0x%08x\n", in read_file_beacon()
213 len += snprintf(buf + len, sizeof(buf) - len, "%-24s0x%08x\n\n", in read_file_beacon()
217 len += snprintf(buf + len, sizeof(buf) - len, "%-24s0x%08x\tTU: %08x\n", in read_file_beacon()
221 len += snprintf(buf + len, sizeof(buf) - len, "%-24s0x%08x\tTU: %08x\n", in read_file_beacon()
225 len += snprintf(buf + len, sizeof(buf) - len, "%-24s0x%08x\tTU: %08x\n", in read_file_beacon()
229 len += snprintf(buf + len, sizeof(buf) - len, "%-24s0x%08x\tTU: %08x\n", in read_file_beacon()
233 len += snprintf(buf + len, sizeof(buf) - len, in read_file_beacon()
237 if (len > sizeof(buf)) in read_file_beacon()
[all …]
/drivers/tty/
Dtty_audit.c26 struct tty_audit_buf *buf; in tty_audit_buf_ref() local
28 buf = current->signal->tty_audit_buf; in tty_audit_buf_ref()
29 WARN_ON(buf == ERR_PTR(-ESRCH)); in tty_audit_buf_ref()
30 return buf; in tty_audit_buf_ref()
35 struct tty_audit_buf *buf; in tty_audit_buf_alloc() local
37 buf = kmalloc(sizeof(*buf), GFP_KERNEL); in tty_audit_buf_alloc()
38 if (!buf) in tty_audit_buf_alloc()
40 buf->data = kmalloc(N_TTY_BUF_SIZE, GFP_KERNEL); in tty_audit_buf_alloc()
41 if (!buf->data) in tty_audit_buf_alloc()
43 mutex_init(&buf->mutex); in tty_audit_buf_alloc()
[all …]
Dtty_buffer.c57 struct tty_bufhead *buf = &port->buf; in tty_buffer_lock_exclusive() local
59 atomic_inc(&buf->priority); in tty_buffer_lock_exclusive()
60 mutex_lock(&buf->lock); in tty_buffer_lock_exclusive()
66 struct tty_bufhead *buf = &port->buf; in tty_buffer_unlock_exclusive() local
69 restart = buf->head->commit != buf->head->read; in tty_buffer_unlock_exclusive()
71 atomic_dec(&buf->priority); in tty_buffer_unlock_exclusive()
72 mutex_unlock(&buf->lock); in tty_buffer_unlock_exclusive()
74 queue_work(system_unbound_wq, &buf->work); in tty_buffer_unlock_exclusive()
92 int space = port->buf.mem_limit - atomic_read(&port->buf.mem_used); in tty_buffer_space_avail()
117 struct tty_bufhead *buf = &port->buf; in tty_buffer_free_all() local
[all …]
/drivers/target/
Dtarget_core_spc.c41 static void spc_fill_alua_data(struct se_lun *lun, unsigned char *buf) in spc_fill_alua_data() argument
48 buf[5] = 0x80; in spc_fill_alua_data()
59 buf[5] |= tg_pt_gp->tg_pt_gp_alua_access_type; in spc_fill_alua_data()
64 spc_emulate_inquiry_std(struct se_cmd *cmd, unsigned char *buf) in spc_emulate_inquiry_std() argument
72 buf[1] = 0x80; in spc_emulate_inquiry_std()
74 buf[2] = 0x05; /* SPC-3 */ in spc_emulate_inquiry_std()
86 buf[3] = 2; in spc_emulate_inquiry_std()
91 spc_fill_alua_data(lun, buf); in spc_emulate_inquiry_std()
97 buf[5] |= 0x8; in spc_emulate_inquiry_std()
106 buf[5] |= 0x1; in spc_emulate_inquiry_std()
[all …]
/drivers/media/tuners/
Dmt20xx.c104 unsigned char *buf, in mt2032_compute_freq() argument
163 buf[0]=lo1n-1; in mt2032_compute_freq()
164 buf[1]=lo1a | (sel<<4); in mt2032_compute_freq()
165 buf[2]=0x86; // LOGC in mt2032_compute_freq()
166 buf[3]=0x0f; //reserved in mt2032_compute_freq()
167 buf[4]=0x1f; in mt2032_compute_freq()
168 buf[5]=(lo2n-1) | (lo2a<<5); in mt2032_compute_freq()
170 buf[6]=0xe4; in mt2032_compute_freq()
172 buf[6]=0xf4; // set PKEN per rev 1.2 in mt2032_compute_freq()
173 buf[7]=8+xogc; in mt2032_compute_freq()
[all …]
/drivers/net/wireless/st/cw1200/
Dwsm.c30 #define WSM_SKIP(buf, size) \ argument
32 if ((buf)->data + size > (buf)->end) \
34 (buf)->data += size; \
37 #define WSM_GET(buf, ptr, size) \ argument
39 if ((buf)->data + size > (buf)->end) \
41 memcpy(ptr, (buf)->data, size); \
42 (buf)->data += size; \
45 #define __WSM_GET(buf, type, type2, cvt) \ argument
48 if ((buf)->data + sizeof(type) > (buf)->end) \
50 val = cvt(*(type2 *)(buf)->data); \
[all …]
/drivers/net/wireless/ath/ath9k/
Dhtc_drv_debug.c24 char buf[512]; in read_file_tgt_int_stats() local
40 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_tgt_int_stats()
44 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_tgt_int_stats()
48 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_tgt_int_stats()
52 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_tgt_int_stats()
56 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_tgt_int_stats()
60 len += scnprintf(buf + len, sizeof(buf) - len, in read_file_tgt_int_stats()
64 if (len > sizeof(buf)) in read_file_tgt_int_stats()
65 len = sizeof(buf); in read_file_tgt_int_stats()
67 return simple_read_from_buffer(user_buf, count, ppos, buf, len); in read_file_tgt_int_stats()
[all …]
/drivers/net/wireless/intel/iwlwifi/dvm/
Ddebugfs.c102 char *buf; in iwl_dbgfs_sram_read() local
133 buf = kmalloc(bufsz, GFP_KERNEL); in iwl_dbgfs_sram_read()
134 if (!buf) in iwl_dbgfs_sram_read()
137 pos += scnprintf(buf + pos, bufsz - pos, "sram_len: 0x%x\n", in iwl_dbgfs_sram_read()
139 pos += scnprintf(buf + pos, bufsz - pos, "sram_offset: 0x%x\n", in iwl_dbgfs_sram_read()
152 pos += scnprintf(buf + pos, bufsz - pos, in iwl_dbgfs_sram_read()
156 pos += scnprintf(buf + pos, bufsz - pos, in iwl_dbgfs_sram_read()
159 pos += scnprintf(buf + pos, bufsz - pos, in iwl_dbgfs_sram_read()
172 pos += scnprintf(buf + pos, bufsz - pos, "\n"); in iwl_dbgfs_sram_read()
174 pos += scnprintf(buf + pos, bufsz - pos, " "); in iwl_dbgfs_sram_read()
[all …]
/drivers/ata/
Dsata_promise.h46 unsigned int devno, u8 *buf) in pdc_pkt_header() argument
49 __le32 *buf32 = (__le32 *) buf; in pdc_pkt_header()
80 buf[12] = (1 << 5) | PDC_PKT_CLEAR_BSY | ATA_REG_DEVICE; in pdc_pkt_header()
81 buf[13] = dev_reg; in pdc_pkt_header()
84 buf[14] = (1 << 5) | PDC_REG_DEVCTL; in pdc_pkt_header()
85 buf[15] = tf->ctl; in pdc_pkt_header()
90 static inline unsigned int pdc_pkt_footer(struct ata_taskfile *tf, u8 *buf, in pdc_pkt_footer() argument
94 buf[i++] = (1 << 5) | ATA_REG_DEVICE; in pdc_pkt_footer()
95 buf[i++] = tf->device; in pdc_pkt_footer()
99 buf[i++] = (1 << 5) | PDC_LAST_REG | ATA_REG_CMD; in pdc_pkt_footer()
[all …]
/drivers/net/wireless/intel/iwlegacy/
Ddebug.c236 char *buf; in il_dbgfs_tx_stats_read() local
243 buf = kzalloc(bufsz, GFP_KERNEL); in il_dbgfs_tx_stats_read()
244 if (!buf) in il_dbgfs_tx_stats_read()
246 pos += scnprintf(buf + pos, bufsz - pos, "Management:\n"); in il_dbgfs_tx_stats_read()
249 scnprintf(buf + pos, bufsz - pos, "\t%25s\t\t: %u\n", in il_dbgfs_tx_stats_read()
252 pos += scnprintf(buf + pos, bufsz - pos, "Control\n"); in il_dbgfs_tx_stats_read()
255 scnprintf(buf + pos, bufsz - pos, "\t%25s\t\t: %u\n", in il_dbgfs_tx_stats_read()
258 pos += scnprintf(buf + pos, bufsz - pos, "Data:\n"); in il_dbgfs_tx_stats_read()
260 scnprintf(buf + pos, bufsz - pos, "\tcnt: %u\n", in il_dbgfs_tx_stats_read()
263 scnprintf(buf + pos, bufsz - pos, "\tbytes: %llu\n", in il_dbgfs_tx_stats_read()
[all …]
/drivers/base/
Dfirmware_class.c50 void *buf, size_t size) in fw_get_builtin_firmware() argument
59 if (buf && fw->size <= size) in fw_get_builtin_firmware()
60 memcpy(buf, fw->data, fw->size); in fw_get_builtin_firmware()
82 const char *name, void *buf, in fw_get_builtin_firmware() argument
192 struct firmware_buf *buf; in __allocate_fw_buf() local
194 buf = kzalloc(sizeof(*buf), GFP_ATOMIC); in __allocate_fw_buf()
195 if (!buf) in __allocate_fw_buf()
198 buf->fw_id = kstrdup_const(fw_name, GFP_ATOMIC); in __allocate_fw_buf()
199 if (!buf->fw_id) { in __allocate_fw_buf()
200 kfree(buf); in __allocate_fw_buf()
[all …]
/drivers/media/usb/go7007/
Dgo7007-fw.c298 static int mjpeg_frame_header(struct go7007 *go, unsigned char *buf, int q) in mjpeg_frame_header() argument
302 buf[p++] = 0xff; in mjpeg_frame_header()
303 buf[p++] = 0xd8; in mjpeg_frame_header()
304 buf[p++] = 0xff; in mjpeg_frame_header()
305 buf[p++] = 0xdb; in mjpeg_frame_header()
306 buf[p++] = 0; in mjpeg_frame_header()
307 buf[p++] = 2 + 65; in mjpeg_frame_header()
308 buf[p++] = 0; in mjpeg_frame_header()
309 buf[p++] = default_intra_quant_table[0]; in mjpeg_frame_header()
312 buf[p++] = (default_intra_quant_table[zz[i]] * q) >> 3; in mjpeg_frame_header()
[all …]
/drivers/gpu/drm/via/
Dvia_verifier.c238 eat_words(const uint32_t **buf, const uint32_t *buf_end, unsigned num_words) in eat_words() argument
240 if ((buf_end - *buf) >= num_words) { in eat_words()
241 *buf += num_words; in eat_words()
528 const uint32_t *buf = *buffer; in via_check_prim_list() local
530 while (buf < buf_end) { in via_check_prim_list()
532 if ((buf_end - buf) < 2) { in via_check_prim_list()
538 if ((*buf & HC_ACMD_MASK) != HC_ACMD_HCmdB) in via_check_prim_list()
540 bcmd = *buf++; in via_check_prim_list()
541 if ((*buf & HC_ACMD_MASK) != HC_ACMD_HCmdA) { in via_check_prim_list()
543 *buf); in via_check_prim_list()
[all …]
/drivers/infiniband/hw/hns/
Dhns_roce_alloc.c156 struct hns_roce_buf *buf) in hns_roce_buf_free() argument
162 if (buf->nbufs == 1) { in hns_roce_buf_free()
163 dma_free_coherent(dev, size, buf->direct.buf, buf->direct.map); in hns_roce_buf_free()
166 vunmap(buf->direct.buf); in hns_roce_buf_free()
168 for (i = 0; i < buf->nbufs; ++i) in hns_roce_buf_free()
169 if (buf->page_list[i].buf) in hns_roce_buf_free()
171 buf->page_list[i].buf, in hns_roce_buf_free()
172 buf->page_list[i].map); in hns_roce_buf_free()
173 kfree(buf->page_list); in hns_roce_buf_free()
178 struct hns_roce_buf *buf) in hns_roce_buf_alloc() argument
[all …]
/drivers/rtc/
Drtc-pcf8563.c91 unsigned char length, unsigned char *buf) in pcf8563_read_block_data() argument
97 .buf = &reg, in pcf8563_read_block_data()
103 .buf = buf in pcf8563_read_block_data()
117 unsigned char *buf) in pcf8563_write_block_data() argument
122 unsigned char data[2] = { reg + i, buf[i] }; in pcf8563_write_block_data()
138 unsigned char buf; in pcf8563_set_alarm_mode() local
141 err = pcf8563_read_block_data(client, PCF8563_REG_ST2, 1, &buf); in pcf8563_set_alarm_mode()
146 buf |= PCF8563_BIT_AIE; in pcf8563_set_alarm_mode()
148 buf &= ~PCF8563_BIT_AIE; in pcf8563_set_alarm_mode()
150 buf &= ~(PCF8563_BIT_AF | PCF8563_BITS_ST2_N); in pcf8563_set_alarm_mode()
[all …]
Drtc-88pm80x.c116 unsigned char buf[4]; in pm80x_rtc_read_time() local
118 regmap_raw_read(info->map, PM800_RTC_EXPIRE2_1, buf, 4); in pm80x_rtc_read_time()
119 base = (buf[3] << 24) | (buf[2] << 16) | (buf[1] << 8) | buf[0]; in pm80x_rtc_read_time()
120 dev_dbg(info->dev, "%x-%x-%x-%x\n", buf[0], buf[1], buf[2], buf[3]); in pm80x_rtc_read_time()
123 regmap_raw_read(info->map, PM800_RTC_COUNTER1, buf, 4); in pm80x_rtc_read_time()
124 data = (buf[3] << 24) | (buf[2] << 16) | (buf[1] << 8) | buf[0]; in pm80x_rtc_read_time()
135 unsigned char buf[4]; in pm80x_rtc_set_time() local
146 regmap_raw_read(info->map, PM800_RTC_COUNTER1, buf, 4); in pm80x_rtc_set_time()
147 data = (buf[3] << 24) | (buf[2] << 16) | (buf[1] << 8) | buf[0]; in pm80x_rtc_set_time()
151 buf[0] = base & 0xFF; in pm80x_rtc_set_time()
[all …]
/drivers/media/pci/ivtv/
Divtv-queue.c25 int ivtv_buf_copy_from_user(struct ivtv_stream *s, struct ivtv_buffer *buf, const char __user *src,… in ivtv_buf_copy_from_user() argument
27 if (s->buf_size - buf->bytesused < copybytes) in ivtv_buf_copy_from_user()
28 copybytes = s->buf_size - buf->bytesused; in ivtv_buf_copy_from_user()
29 if (copy_from_user(buf->buf + buf->bytesused, src, copybytes)) { in ivtv_buf_copy_from_user()
32 buf->bytesused += copybytes; in ivtv_buf_copy_from_user()
36 void ivtv_buf_swap(struct ivtv_buffer *buf) in ivtv_buf_swap() argument
40 for (i = 0; i < buf->bytesused; i += 4) in ivtv_buf_swap()
41 swab32s((u32 *)(buf->buf + i)); in ivtv_buf_swap()
52 void ivtv_enqueue(struct ivtv_stream *s, struct ivtv_buffer *buf, struct ivtv_queue *q) in ivtv_enqueue() argument
58 buf->bytesused = 0; in ivtv_enqueue()
[all …]
/drivers/media/common/siano/
Dsmsdvb-debugfs.c53 char *buf; in smsdvb_print_dvb_stats() local
61 buf = debug_data->stats_data; in smsdvb_print_dvb_stats()
63 n += snprintf(&buf[n], PAGE_SIZE - n, in smsdvb_print_dvb_stats()
65 n += snprintf(&buf[n], PAGE_SIZE - n, in smsdvb_print_dvb_stats()
67 n += snprintf(&buf[n], PAGE_SIZE - n, in smsdvb_print_dvb_stats()
69 n += snprintf(&buf[n], PAGE_SIZE - n, in smsdvb_print_dvb_stats()
71 n += snprintf(&buf[n], PAGE_SIZE - n, in smsdvb_print_dvb_stats()
73 n += snprintf(&buf[n], PAGE_SIZE - n, in smsdvb_print_dvb_stats()
75 n += snprintf(&buf[n], PAGE_SIZE - n, in smsdvb_print_dvb_stats()
77 n += snprintf(&buf[n], PAGE_SIZE - n, in smsdvb_print_dvb_stats()
[all …]
/drivers/scsi/qla2xxx/
Dqla_tmpl.c109 qla27xx_insert16(uint16_t value, void *buf, ulong *len) in qla27xx_insert16() argument
111 if (buf) { in qla27xx_insert16()
112 buf += *len; in qla27xx_insert16()
113 *(__le16 *)buf = cpu_to_le16(value); in qla27xx_insert16()
119 qla27xx_insert32(uint32_t value, void *buf, ulong *len) in qla27xx_insert32() argument
121 if (buf) { in qla27xx_insert32()
122 buf += *len; in qla27xx_insert32()
123 *(__le32 *)buf = cpu_to_le32(value); in qla27xx_insert32()
129 qla27xx_insertbuf(void *mem, ulong size, void *buf, ulong *len) in qla27xx_insertbuf() argument
132 if (buf && mem && size) { in qla27xx_insertbuf()
[all …]

12345678910>>...161