Lines Matching refs:hx
39 struct hexline *hx; in usb_cypress_load_firmware() local
44 buf = kmalloc(sizeof(*hx), GFP_KERNEL); in usb_cypress_load_firmware()
47 hx = (struct hexline *)buf; in usb_cypress_load_firmware()
54 while ((ret = dvb_usb_get_hexline(fw, hx, &pos)) > 0) { in usb_cypress_load_firmware()
55 deb_fw("writing to address 0x%04x (buffer: 0x%02x %02x)\n", hx->addr, hx->len, hx->chk); in usb_cypress_load_firmware()
56 ret = usb_cypress_writemem(udev, hx->addr, hx->data, hx->len); in usb_cypress_load_firmware()
58 if (ret != hx->len) { in usb_cypress_load_firmware()
60 ret, hx->len); in usb_cypress_load_firmware()
124 int dvb_usb_get_hexline(const struct firmware *fw, struct hexline *hx, in dvb_usb_get_hexline() argument
132 memset(hx,0,sizeof(struct hexline)); in dvb_usb_get_hexline()
134 hx->len = b[0]; in dvb_usb_get_hexline()
136 if ((*pos + hx->len + 4) >= fw->size) in dvb_usb_get_hexline()
139 hx->addr = b[1] | (b[2] << 8); in dvb_usb_get_hexline()
140 hx->type = b[3]; in dvb_usb_get_hexline()
142 if (hx->type == 0x04) { in dvb_usb_get_hexline()
144 hx->addr |= (b[4] << 24) | (b[5] << 16); in dvb_usb_get_hexline()
148 memcpy(hx->data,&b[data_offs],hx->len); in dvb_usb_get_hexline()
149 hx->chk = b[hx->len + data_offs]; in dvb_usb_get_hexline()
151 *pos += hx->len + 5; in dvb_usb_get_hexline()