Lines Matching defs:msg
41 __be16 preamble, length, msg;
79 static int cp2615_init_iop_msg(struct cp2615_iop_msg *ret, enum cp2615_iop_msg_type msg,
90 ret->msg = htons(msg);
127 struct cp2615_iop_msg *msg = kzalloc(sizeof(*msg), GFP_KERNEL);
129 int res = cp2615_init_i2c_msg(msg, i2c_w);
133 msg, ntohs(msg->length), NULL, 0);
134 kfree(msg);
142 struct cp2615_iop_msg *msg;
146 msg = kzalloc(sizeof(*msg), GFP_KERNEL);
147 if (!msg)
150 res = usb_bulk_msg(usbdev, usb_rcvbulkpipe(usbdev, IOP_EP_IN), msg,
153 kfree(msg);
157 i2c_r = (struct cp2615_i2c_transfer_result *)&msg->data;
158 if (msg->msg != htons(iop_I2cTransferResult) || i2c_r->tag != tag) {
159 kfree(msg);
167 kfree(msg);
174 struct cp2615_iop_msg *msg = kzalloc(sizeof(*msg), GFP_KERNEL);
175 struct cp2615_iop_accessory_info *info = (struct cp2615_iop_accessory_info *)&msg->data;
177 int res = cp2615_init_iop_msg(msg, iop_GetAccessoryInfo, NULL, 0);
183 msg, ntohs(msg->length), NULL, 0);
188 msg, sizeof(struct cp2615_iop_msg), NULL, 0);
192 if (msg->msg != htons(iop_AccessoryInfo)) {
209 kfree(msg);
218 struct i2c_msg *msg;
224 msg = &msgs[i];
227 i2c_w.i2caddr = i2c_8bit_addr_from_msg(msg);
228 if (msg->flags & I2C_M_RD) {
229 i2c_w.read_len = msg->len;
233 i2c_w.write_len = msg->len;
234 memcpy(&i2c_w.data, msg->buf, i2c_w.write_len);
239 ret = cp2615_i2c_recv(usbif, i2c_w.tag, msg->buf);