From 333e40aee3f2d0457e2cbadc742619a6f449b2e7 Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Thu, 23 Jul 2015 16:47:00 +0100 Subject: [PATCH] staging: comedi: usbduxsigma: round down AI scan_begin_arg at step 4. The return value of the `cmdtest` handler for a subdevice checks the prospective new command in various steps and returns the step number at which any problem was detected, or 0 if no problem was detected. It is allowed to modify the command in various ways at each step. Corrections for out-of-range values are generally made at step 3, and minor adjustments such as rounding are generally made at step 4. The `cmdtest` handler for the AI subdevice (`usbduxsigma_ai_cmdtest()`) currently modifies `cmd->scan_begin_arg` to bring it into range and round it down at step 3. Move the rounding down part to step 4 to follow the usual Comedi convention. Signed-off-by: Ian Abbott Reviewed-by: Bernd Porr Reviewed-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman --- Reading git-format-patch failed