summaryrefslogtreecommitdiff
path: root/drivers/staging/comedi/drivers/ni_tio.c
AgeCommit message (Collapse)Author
2016-11-07staging: comedi: ni_tio: fix buggy ni_tio_clock_period_ps() return valueIan Abbott
`ni_tio_clock_period_ps()` used to return the clock period in picoseconds, and had a `BUG()` call for invalid cases. It was changed to pass the clock period back via a pointer parameter and return an error for the invalid cases. Unfortunately the code to handle user-specified clock sources with user-specified clock period is still returning the clock period the old way, which can lead to the caller not getting the clock period, or seeing an unexpected error. Fix it by passing the clock period via the pointer parameter and returning `0`. Fixes: b42ca86ad605 ("staging: comedi: ni_tio: remove BUG() checks for ni_tio_get_clock_src()") Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Cc: <stable@vger.kernel.org> # 4.7+ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28staging: comedi: ni_tio: remove BUG() checks for ni_tio_get_clock_src()H Hartley Sweeten
This function calls some helper functions to convert the counter variant specific clock select bits into the generic enum ni_gpct_clock_source_bits equivelent. These helper functions currently BUG() if the clock select bits are invalid. It then calls ni_tio_clock_period_ps() to figure out the clock period based on the generic clock source. This function could also BUG() if the prescale bits are invalid. In reality this should never happen but refactor the code to return -EINVAL instead and remove the BUG() checks. These functions are also called by ni_tio_set_sync_mode(). When this function is called by ni_tio_set_clock_src() the counter select bits have already been validated. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28staging: comedi: ni_tio: remove BUG() in ni_tio_set_gate_src()H Hartley Sweeten
This BUG() can never happen. The previous ni_tio_has_gate2_registers() check will have already caused the function to return -EINVAL. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28staging: comedi: ni_tio: fix ni_tio_insn_config()H Hartley Sweeten
The (*insn_config) functions are supposed to return an errno or the number of 'data' values used for the instruction (insn->n). Currently this function returns an errno or 0. Fix the function to work like the core expects. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28staging: comedi: ni_tio: remove BUG() checks for ni_tio_get_gate_src()H Hartley Sweeten
This function calls some helper functions to convert the counter variant specific gate select bits into the generic enum ni_gpct_clock_source_bits equivelent. These helper functions currently BUG() if the gate select bits are invalid. This should never happen but refactor the code to return -EINVAL instead and remove the BUG() checks. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28staging: comedi: ni_tio: validate clock sourceH Hartley Sweeten
Refactor the functions that determine the clock source bits so that they return -EINVAL if the clock source is invalid. Pass the errno back to ni_tio_insn_config(). Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28staging: comedi: ni_tio: tidy up ni_tio_arm()H Hartley Sweeten
Make this function a bit more consise by absorbing the GI_HW_ARM_SEL_MASK() inline helper and combine the two switch (start_trigger) code paths. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28staging: comedi: ni_tio: tidy up ni_tio_set_sync_mode()H Hartley Sweeten
The 'force_alt_sync' paramater is always 0. Remove it. Absorb the GI_ALT_SYNC() inline helper and use some local variables to clarify this function. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28staging: comedi: ni_tio: tidy up ni_tio_get_gate_src()H Hartley Sweeten
Clarify the code a bit by handling the NI_GPCT_DISABLED_GATE_SELECT source in the common code path. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28staging: comedi: ni_tio: fix block commentsH Hartley Sweeten
Fix the checkpatch.pl issues: WARNING: Block comments use * on subsequent lines Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28staging: comedi: ni_tio: Prefer kernel type 'u64' over 'uint64_t'H Hartley Sweeten
Fix the checkpatch.pl issues. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28staging: comedi: ni_tio: Prefer 'unsigned int' to bare use of 'unsigned'H Hartley Sweeten
Fix the checkpatch.pl issues. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28staging: comedi: ni_tio: tidy up struct ni_gpct_device (*{write, read}_register)H Hartley Sweeten
For aesthetics, rename these callbacks to simply read/write. Change the 'unsigned' parameters to 'unsigned int'. This fixes a number of checkpatch.pl issues: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28staging: comedi: ni_tio_internal: export {read, write)_register()H Hartley Sweeten
Move these inline functions out of the header and export them instead. These functions have pretty generic names, rename them. Fix the checkpatch.pl issues: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' CHECK: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON() Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28staging: comedi: ni_tio_internal: simplify ↵H Hartley Sweeten
ni_tio_counting_mode_registers_present() Only the e series gpct variant does not have counting mode registers. Simplfy this function. For aesthetics, return bool instead of int. This fixes the checkpatch.pl issues: CHECK: spaces preferred around that '*' (ctx:ExV) CHECK: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON() Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28staging: comedi: ni_tio: export and fix ni_tio_set_bits()H Hartley Sweeten
Move the inline function from the header and export it instead. Fix the checkpatch.pl issue: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' The 'unsigned' vars can safely be changed to 'unsigned int'. This allows moving ni_tio_set_bits_transient() into the driver and making it static. Fix the checkpatch.pl issue: CHECK: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON() The BUG_ON() is overkill. All the drivers that call this function pass 'register_index' values that are valid. Just check the 'register_index' before updating the software copy and writing the register. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28staging: comedi: ni_tio: export and fix ni_tio_get_soft_copy()H Hartley Sweeten
Move the inline function from the header and export it instead. For the checkpatch.pl issues: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' CHECK: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON() The 'unsigned' vars can safely be changed to 'unsigned int'. The BUG_ON() is overkill. All the drivers that call this function pass 'register_index' values that are valid. Just check the 'register_index' and return 0 if it's not valid. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28staging: comedi: ni_tio: fix ni_tio_arm() params/varsH Hartley Sweeten
As suggested by checkpatch.pl: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' The 'arm' parameter is really a true/false flag. For aesthetics, change it to a bool. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28staging: comedi: ni_tio: fix ni_tio_set_gate_src() params/varsH Hartley Sweeten
As suggested by checkpatch.pl: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28staging: comedi: ni_tio: make ni_gpct_device_destroy() NULL pointer safeH Hartley Sweeten
Modify the pointer check to make this function NULL pointer safe. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24staging: comedi: make ni_tio_has_gate2_registers return booleanGeliang Tang
This patch makes ni_tio_has_gate2_registers return boolean, since this function only uses either one or zero as its return value. Signed-off-by: Geliang Tang <geliangtang@163.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-09staging: comedi: ni_tio: change comedi "driver" comment to "module"Ian Abbott
This module contains support code for some other comedi drivers, but isn't a comedi driver itself, so doesn't need a comedi "driver" comment. To preserve the details in the original comment, change it into a comedi "module" comment (which I've just invented) by changing the "Driver:" line into a "Module:" line and removing the "Devices:" line. Also reformat it to use the usual block comment style. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-01staging: comedi: ni_tio: remove some dead codeDan Carpenter
These conditions can never be true because "i" is always one more than NI_660X_MAX_RTSI_CHAN after the loop. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30staging: comedi: ni_tio: tidy up Gi_Reset_BitH Hartley Sweeten
Convert this inline CamelCase function into a define. For aesthetics, move the new define so it is associated with the register define. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30staging: comedi: ni_tio: tidy up Gxx_Status_BitsH Hartley Sweeten
Convert this enum into defines and rename the CamelCase symbols. For aesthetics, move the new defines so they are associated with the register define. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30staging: comedi: ni_tio: tidy up Gi_Second_Gate_BitsH Hartley Sweeten
Convert this enum into defines and rename the CamelCase symbols. For aesthetics, move the new defines so they are associated with the register define. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30staging: comedi: ni_tio: tidy up Gi_Mode_BitsH Hartley Sweeten
Convert this enum into defines and rename the CamelCase symbols. For aesthetics, move the new defines so they are associated with the register define. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30staging: comedi: ni_tio: tidy up Gi_Input_Select_BitsH Hartley Sweeten
Convert this enum into defines and rename the CamelCase symbols. For aesthetics, move the new defines so they are associated with the register define. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30staging: comedi: ni_tio: tidy up Gi_Command_Reg_BitsH Hartley Sweeten
Convert this enum into defines and rename all the CamelCase symbols. For aesthetics, move the new defines so they are associated with the register define. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30staging: comedi: ni_tio: tidy up Gi_Counting_Mode_Reg_BitsH Hartley Sweeten
Convert this enum into defines and rename all the CamelCase symbols. For aesthetics, move the new defines so they are associated with the register define. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30staging: comedi: ni_tio: tidy up ni_tio_read_sw_save_reg()H Hartley Sweeten
Remove the need for some of the local variables. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27staging: comedi: ni_tio: convert printk to pr_errH Hartley Sweeten
Convert the printk(KERN_ERR ...) in ni_m_clk_src() to a pr_err(). Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27staging: comedi: ni_tio: remove forward declarationsH Hartley Sweeten
Move some of the functions to remove the need for the forward declarations. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27staging: comedi: ni_tio: tidy up ni_tio_set_clock_src() and helpersH Hartley Sweeten
Do some renaming of local vars, etc. to tidy up the ugly line breaks to improve the readability of the code. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27staging: comedi: ni_tio: tidy up ni_tio_get_clock_src()H Hartley Sweeten
Remove the static const local variable and add a blank line after the declarations. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27staging: comedi: ni_tio: absorb ni_tio_set_first_gate_modifiers()H Hartley Sweeten
This function is only called by ni_tio_set_gate_src(). For aesthetics, absorb the code into that function.. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27staging: comedi: ni_tio: tidy up ni_tio_set_gate_src() and helpersH Hartley Sweeten
Do some renaming of local vars, parameters, etc. to tidy up the ugly line breaks to improve the readability of the code. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27staging: comedi: ni_tio: tidy up ni_tio_set_other_src()H Hartley Sweeten
Invert the counter_dev->variant test to reduce the indent level of this function. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27staging: comedi: ni_tio: tidy up ni_tio_get_gate_src() and helpersH Hartley Sweeten
Do some renaming of local vars, parameters, etc. to tidy up the ugly line breaks to improve the readability of the code. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27staging: comedi: ni_tio: absorb ni_tio_counter_status()H Hartley Sweeten
This function is only called to handle the INSN_CONFIG_GET_COUNTER_STATUS instruction. For aesthetics, absorb the code into ni_tio_insn_config(). Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27staging: comedi: ni_tio: tidy up ni_tio_set_sync_mode()H Hartley Sweeten
Fix the > 80 char line issues in this function. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27staging: comedi: ni_tio: tidy up ni_660x_source_select_bits()H Hartley Sweeten
Rename a local variable to fix the > 80 char line issues. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27staging: comedi: ni_tio: tidy up ni_m_series_source_select_bits()H Hartley Sweeten
Rename a local variable to fix the > 80 char line issues. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27staging: comedi: ni_tio: rename ni_tio_second_gate_registers_present()H Hartley Sweeten
For aesthetics, rename this function to shorten some of the long lines. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27staging: comedi: ni_tio: tidy up ni_tio_init_counter()H Hartley Sweeten
This function is called to initialize/reset a gpct counter during a comedi drivers (*attach). For aesthetics, move this exported function toward the end of the file. Tidy up the functions a bit by just open coding the '0x0' values used to initialize some of the registers. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27staging: comedi: ni_tio: tidy up ni_gpct_device_{construct,destroy)()H Hartley Sweeten
For aesthetics, move these exported functions to the end of the file. Tidy up the functions a bit and remove the BUG_ON when (num_counters == 0). Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27staging: comedi: ni_tio: move defines to head of fileH Hartley Sweeten
For aesthetics, move all the defines to the head of the file. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27staging: comedi: ni_tio: tidy up enum ni_660x_clock_sourceH Hartley Sweeten
These values are not used as an enum. For aesthetics, rename the CamelCase values and convert them into defines. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27staging: comedi: ni_tio: tidy up enum ni_m_series_clock_sourceH Hartley Sweeten
These values are not used as an enum. For aesthetics, rename the CamelCase values and convert them into defines. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27staging: comedi: ni_tio: tidy up enum ni_660x_gate_selectH Hartley Sweeten
These values are not used as an enum. For aesthetics, rename the CamelCase values and convert them into defines. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>