Commit f80ac69d authored by Deepak R Varma's avatar Deepak R Varma Committed by Greg Kroah-Hartman
Browse files

staging: comedi: ni_mio_common: Code reformat and re-indentation



Resolve general code indentation problems as detected by checkpatch script.
Implement code reformat and re-indentation as per coding style to
improve readability.

Signed-off-by: default avatarDeepak R Varma <mh12gx2825@gmail.com>
Link: https://lore.kernel.org/r/20200314210749.GA3393@deeUbuntu


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 073e0be3
Loading
Loading
Loading
Loading
+30 −24
Original line number Diff line number Diff line
@@ -2199,7 +2199,8 @@ static int ni_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
		break;
	case TRIG_EXT:
		ai_trig |= NISTC_AI_TRIG_START1_SEL(
			ni_get_reg_value_roffs(CR_CHAN(cmd->start_arg),
				ni_get_reg_value_roffs(
					CR_CHAN(cmd->start_arg),
					NI_AI_StartTrigger,
					&devpriv->routing_tables, 1));

@@ -2311,8 +2312,10 @@ static int ni_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
		    (cmd->scan_begin_arg & ~CR_EDGE) !=
		    (cmd->convert_arg & ~CR_EDGE))
			start_stop_select |= NISTC_AI_START_SYNC;

		start_stop_select |= NISTC_AI_START_SEL(
			ni_get_reg_value_roffs(CR_CHAN(cmd->scan_begin_arg),
					ni_get_reg_value_roffs(
						CR_CHAN(cmd->scan_begin_arg),
						NI_AI_SampleClock,
						&devpriv->routing_tables, 1));
		ni_stc_writew(dev, start_stop_select, NISTC_AI_START_STOP_REG);
@@ -2343,7 +2346,8 @@ static int ni_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
		break;
	case TRIG_EXT:
		mode1 |= NISTC_AI_MODE1_CONVERT_SRC(
			ni_get_reg_value_roffs(CR_CHAN(cmd->convert_arg),
				ni_get_reg_value_roffs(
						CR_CHAN(cmd->convert_arg),
						NI_AI_ConvertClock,
						&devpriv->routing_tables, 1));
		if ((cmd->convert_arg & CR_INVERT) == 0)
@@ -2970,9 +2974,11 @@ static void ni_ao_cmd_set_trigger(struct comedi_device *dev,
			  NISTC_AO_TRIG_START1_SYNC;
	} else { /* TRIG_EXT */
		trigsel = NISTC_AO_TRIG_START1_SEL(
			ni_get_reg_value_roffs(CR_CHAN(cmd->start_arg),
				ni_get_reg_value_roffs(
						CR_CHAN(cmd->start_arg),
						NI_AO_StartTrigger,
						&devpriv->routing_tables, 1));

		/* 0=active high, 1=active low. see daq-stc 3-24 (p186) */
		if (cmd->start_arg & CR_INVERT)
			trigsel |= NISTC_AO_TRIG_START1_POLARITY;
@@ -3079,12 +3085,10 @@ static void ni_ao_cmd_set_update(struct comedi_device *dev,
	 * zero out these bit fields to be set below. Does an ao-reset do this
	 * automatically?
	 */
	devpriv->ao_mode1 &= ~(
	  NISTC_AO_MODE1_UI_SRC_MASK         |
	devpriv->ao_mode1 &=  ~(NISTC_AO_MODE1_UI_SRC_MASK	   |
				NISTC_AO_MODE1_UI_SRC_POLARITY	   |
				NISTC_AO_MODE1_UPDATE_SRC_MASK	   |
	  NISTC_AO_MODE1_UPDATE_SRC_POLARITY
	);
				NISTC_AO_MODE1_UPDATE_SRC_POLARITY);

	if (cmd->scan_begin_src == TRIG_TIMER) {
		unsigned int trigvar;
@@ -3134,7 +3138,8 @@ static void ni_ao_cmd_set_update(struct comedi_device *dev,
		/* FIXME:  assert scan_begin_arg != 0, ret failure otherwise */
		devpriv->ao_cmd2  |= NISTC_AO_CMD2_BC_GATE_ENA;
		devpriv->ao_mode1 |= NISTC_AO_MODE1_UPDATE_SRC(
			ni_get_reg_value(CR_CHAN(cmd->scan_begin_arg),
					ni_get_reg_value(
						CR_CHAN(cmd->scan_begin_arg),
						NI_AO_SampleClock,
						&devpriv->routing_tables));
		if (cmd->scan_begin_arg & CR_INVERT)
@@ -3673,7 +3678,8 @@ static int ni_cdio_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
	cdo_mode_bits = NI_M_CDO_MODE_FIFO_MODE |
			NI_M_CDO_MODE_HALT_ON_ERROR |
			NI_M_CDO_MODE_SAMPLE_SRC(
				ni_get_reg_value(CR_CHAN(cmd->scan_begin_arg),
				ni_get_reg_value(
					CR_CHAN(cmd->scan_begin_arg),
					NI_DO_SampleClock,
					&devpriv->routing_tables));
	if (cmd->scan_begin_arg & CR_INVERT)