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