Advertisement
Guest User

Untitled

a guest
Jan 3rd, 2017
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.50 KB | None | 0 0
  1. static int pctv452e_rc_query(struct dvb_usb_device *d)
  2. {
  3.     struct pctv452e_state *state = (struct pctv452e_state *)d->priv;
  4.     int ret, i;
  5.     u8 id;
  6.  
  7.     mutex_lock(&state->ca_mutex);
  8.     id = state->c++;
  9.  
  10.     /* prepare command header  */
  11.     state->data[0] = SYNC_BYTE_OUT;
  12.     state->data[1] = id;
  13.     state->data[2] = PCTV_CMD_IR;
  14.     state->data[3] = 0;
  15.  
  16.     /* send ir request */
  17.     ret = dvb_usb_generic_rw(d, state->data, 4,
  18.                  state->data, PCTV_ANSWER_LEN, 0);
  19.     if (ret != 0)
  20.         goto ret;
  21.  
  22.     if (debug > 3) {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement