break;
case INSN_CONFIG_ALT_SOURCE:
{
- if(data[1] >= 8)
- return -EINVAL;
- devpriv->ai_calib_source = data[1] & 0xf;
- if( boardtype.reg_611x )
- {
- unsigned int calib_source_adjust;
+ unsigned int calib_source;
+ unsigned int calib_source_adjust;
- calib_source_adjust = ( data[1] >> 4 ) & 0xff;
+ calib_source = data[1] & 0xf;
+ calib_source_adjust = ( data[1] >> 4 ) & 0xff;
+
+ if(calib_source >= 8)
+ return -EINVAL;
+ devpriv->ai_calib_source = calib_source;
+ if( boardtype.reg_611x ){
ni_writeb( calib_source_adjust, Cal_Gain_Select_611x );
}
return 2;