func: static int airspy_s_ctrl(struct v4l2_ctrl *ctrl) struct airspy * s = container_of ( ctrl -> handler , struct airspy , hdl ) int ret ; switch ( ctrl -> id )  ret = airspy_set_lna_gain ( s ); static int airspy_set_lna_gain(struct airspy *s) int ret ; ret = airspy_ctrl_msg ( s , CMD_SET_LNA_AGC , 0 , s -> lna_gain_auto -> val , & u8tmp , 1 ); if ( ret )  if ( s -> lna_gain_auto -> val == false )  ret = airspy_ctrl_msg ( s , CMD_SET_LNA_GAIN , 0 , s -> lna_gain -> val , & u8tmp , 1 ); static int airspy_ctrl_msg(struct airspy *s, u8 request, u16 value, u16 u8 *data, u16 size) int ret ; unsigned int pipe ; u8 requesttype ; switch ( request )  pipe = usb_sndctrlpipe ( s -> udev , 0 ); requesttype = ( USB_TYPE_VENDOR | USB_DIR_OUT ); pipe = usb_rcvctrlpipe ( s -> udev , 0 ); requesttype = ( USB_TYPE_VENDOR | USB_DIR_IN ); ret = - EINVAL; if ( ! ( requesttype & USB_DIR_IN ) )  memcpy ( s -> buf , data , size ); ret = usb_control_msg ( s -> udev , pipe , request , requesttype , value , index , s -> buf , size , 1000 ); if ( ret < 0 )  if ( requesttype & USB_DIR_IN )  memcpy ( data , s -> buf , size ); 