- 04 5月, 2014 40 次提交
-
-
由 H Hartley Sweeten 提交于
The analog output async command can use the pacer for the scan_begin_src. The (*do_cmdtest) calculates the divisors when validating the cmd argument. There is no reason to recalc the divisors in the (*do_cmd). Just use the values from the private data. For aesthetics, factor out the code that loads the counters to match the analog input. Refactor the code to use the i8254_set_mode() and i8254_write() helpers instead of i8254_load(). This allows us to use the I8254_* defines when setting the mode to clarify the code. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: NIan Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
The analog input async command can use the pacer for the scan_bagin_src or the convert_src. The (*do_cmdtest) validates that only one of these sources has the TRIG_TIMER selected and calculates the divisors when validating the cmd argument. There is no reason to recalc the divisors in the (*do_cmd). Just use the values from the private data. Also, refactor cb_pcidas_load_counters() to use the i8254_set_mode() and i8254_write() helpers instead of i8254_load(). This allows us to use the I8254_* defines when setting the mode to clarify the code. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: NIan Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
This member of the private data is not ued by the driver. Remove it. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: NIan Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
This member of the private data is always set to I8254_OSC_BASE_10MHZ. Remove it from the private data and just open code the value. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: NIan Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
This define enables code that checks for analog input channel dropout when reading samples. The define is enabled so we might as well always enable the code and remove the define. Factor out the common channel dropout detect code as a helper function and cleanup the code. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: NIan Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
For aesthetics, rename the helper functions that are called by the interrupt function to handle reading the analog input samples. Also, change the parameters to the helpers to the comedi_device and comedi_subdevice pointers. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: NIan Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
For aesthetics, rename this function so it has namespace associated with the driver. Change the parameters to the function. The 'mode' is really a flag to load the counters and the divisors can be found in the private data. To clarify the code and remove the magic numbers, use the 8253.h helpers to set the timer mode and load the counters. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: NIan Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
The local variable 'mode' is not necessary. We can determine the mode by checking the cmd->convert_src and cmd->start_src. Do this instead to clarify the code. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: NIan Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
When the cmd->convert_src == TRIG_TIMER the divisors needed to generate the pacer time are calculated in the (*do_cmdtest) to validate the cmd->convert_arg. The core always does the (*do_cmdtest) before the (*do_cmd) so there is no reason to recalc the divisors. Save the calculated divisors in the private data as 'next_divisor[12]'. The (*do_cmd) then transfers them to the private data 'divisor[12]' so that they can be used to set the timer for the command immediately or later when the cmd->start_src is TRIG_EXT (mode 2 in this driver). Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: NIan Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
This member of the private data is is not necessary. We can just check the cmd->flags for TRIG_WAKE_EOS when needed. Remvoe the member. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: NIan Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
This member of the private data is set to 0 but never used. Just remove it. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: NIan Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
This member of the private data is not necessary. We can determine if the analog input command is neverending by checking the cmd->stop_src: TRIG_COUNT -> !neverending_ai TRIG_NONE -> neverending_ai Do that instead and remove the unnecessary member. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: NIan Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
The chanlist is checked in Step 5 of the (*do_cmdtest) there is no reason to check it again in the (*do_cmd). The only reason its done again is to get the actual 'seglen', the non-repeating length of the chanlist. Save the 'seglen' found by pci171x_ai_check_chanlist() in the private data and use that in the (*do_cmd). Rename the private data member to clarify it. Also, remove the unused 'act_chanlist_pos' member from the private data. Refactor the error handling in pci171x_ai_check_chanlist() so it returns and errno for failure and 0 for success. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: NIan Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
Tidy up this function to clarify what the chanlist is being checked for. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: NIan Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Raghavendra Ganiga 提交于
This is a patch to fix coding style warnings found by checkpatch.pl tool Signed-off-by: NRaghavendra Chandra Ganiga <ravi23ganiga@gmail.com> Reviewed-by: NIan Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Chase Southwood 提交于
This driver no longer reads the eeprom to find the board specific data, all the necessary data is in the boardinfo. Use the boardinfo directly instead of passing through devpriv->s_EeParameters. Signed-off-by: NChase Southwood <chase.southwood@gmail.com> Cc: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Chase Southwood 提交于
The i_IorangeBase1, i_PCIEeprom, and pc_EepromChip data in the boardinfo was only needed to work out the usage of the PCI bars. Now that that is squared away, this info is no longer needed and can be removed. Signed-off-by: NChase Southwood <chase.southwood@gmail.com> Reviewed-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: NIan Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Chase Southwood 提交于
This driver only uses PCI bar 0 (devpriv->i_IobaseAmcc), and PCI bar 1 (dev->iobase), don't bother reading the unused PCI bars. Signed-off-by: NChase Southwood <chase.southwood@gmail.com> Reviewed-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: NIan Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Chase Southwood 提交于
This board always has 32 digital inputs. Remove the test when initializing the subdevice. Also, since this board is the only one supported by this driver, remove the boardinfo about the digital inputs and just use the data directly in the subdevice init. Signed-off-by: NChase Southwood <chase.southwood@gmail.com> Reviewed-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: NIan Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Chase Southwood 提交于
This include is no longer needed. Signed-off-by: NChase Southwood <chase.southwood@gmail.com> Cc: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Chase Southwood 提交于
Reading the eeprom on this board is not necessary. All information required is in the boardinfo. Remove the eeprom support code which is not really useful here. Signed-off-by: NChase Southwood <chase.southwood@gmail.com> Cc: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Christian Engelmayer 提交于
Some board pointer are assigned twice via comedi_board() in the comedi low level driver attach functions. Remove the duplicate assignment from the variable definition where the pointer is not used anyway until assigned later in the function when dev->board_ptr, that comedi_board() relies on, is setup correctly. Signed-off-by: NChristian Engelmayer <cengelma@gmx.at> Reviewed-by: NIan Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Alan Cox 提交于
This is a bug fix that has been lurking in the Google tree but not pushed upstream. From: Octavian Purdila <octavian.purdila@intel.com> The memory region is already reserved in goldfish_init() during platform init. Signed-off-by: NOctavian Purdila <octavian.purdila@intel.com> Signed-off-by: NJun Tian <jun.j.tian@intel.com> Signed-off-by: NAlan Cox <alan@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Alan 提交于
The base code imported from the Google tree is ifdef heaven. Prepare to fix this by adding a helper function. Signed-off-by: NAlan Cox <alan@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Jun Tian 提交于
Enable the 64-bit nand data support in the goldfish nand driver. Signed-off-by: NJun Tian <jun.j.tian@intel.com> Signed-off-by: NOctavian Purdila <octavian.purdila@intel.com> Signed-off-by: NAlan Cox <alan@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Jun Tian 提交于
Enable the 64-bit goldfish audio driver. Support 64-bit buffer address and data read/write. Signed-off-by: NJun Tian <jun.j.tian@intel.com> Signed-off-by: NAlan Cox <alan@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Seunghun Lee 提交于
This patch fixes "Missing a blank line after declarations" warnings. Signed-off-by: NSeunghun Lee <waydi1@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Dan Carpenter 提交于
The white space was all wrong here. The case statements were indented too far. The if else blocks weren't indented at all. There was a break statement aligned with the else block and it confused my static checker because "were curly braces intended" so that the break statement was only on the else side? Also I removed some commented out code. Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Dan Carpenter 提交于
There were a couple lines which were not indented far enough and it was confusing. Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Dan Carpenter 提交于
The for loop body wasn't indented so it upset my static checker. Also I removed an obsolete comment on the same line. Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Dan Carpenter 提交于
"*(p + 1)" and "len" are the same thing. For reviewers who don't know that, then this code is worrying because we cap "len", but pass "*(p + 1)" to memcpy(). I have changed the code to use "len" throughout. Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Sarath Lakshman 提交于
Fold a line to make it less than 80 characters Signed-off-by: NSarath Lakshman <sarathlakshman@slynux.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Fredrick John Berchmans 提交于
Change old way of ops->setsockopt or ops->getsockopt in kernel to kernel_setsockopt or kernel_getsockopt. Signed-off-by: NFredrick John Berchmans <fredrickprashanth@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Geert Uytterhoeven 提交于
If CONFIG_FS_POSIX_ACL=n: drivers/staging/lustre/lustre/llite/xattr.c: In function 'll_setxattr_common': drivers/staging/lustre/lustre/llite/xattr.c:115:27: warning: unused variable 'rce' [-Wunused-variable] Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Geert Uytterhoeven 提交于
drivers/staging/lustre/lustre/llite/rw26.c: In function 'll_direct_IO_26': drivers/staging/lustre/lustre/llite/rw26.c:383:2: warning: format '%lu' expects argument of type 'long unsigned int', but argument 6 has type 'ssize_t' [-Wformat] drivers/staging/lustre/lustre/llite/rw26.c:383:2: warning: format '%lu' expects argument of type 'long unsigned int', but argument 10 has type 'ssize_t' [-Wformat] Join the quoted string split across lines to fix a checkpatch warning while we're at it. Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Geert Uytterhoeven 提交于
When CONFIG_SMP=n: drivers/staging/lustre/include/linux/libcfs/linux/linux-mem.h:58:31: fatal error: libcfs/libcfs_cpu.h: No such file or directory drivers/staging/lustre/lustre/libcfs/libcfs_cpu.c:78:1: error: redefinition of 'cfs_cpt_table_print' drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h:109:1: note: previous definition of 'cfs_cpt_table_print' was here Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Dan Carpenter 提交于
The obd_ioctl_getdata() function caps "data->ioc_len" at OBD_MAX_IOCTL_BUFFER and then calls this obd_ioctl_is_invalid() to check that the other values inside data are valid. There are several lengths inside data but when they are added together they must not be larger than "data->ioc_len". The checks against "(data->ioc_inllen1 > (1<<30))" are supposed to ensure that the addition does not have an integer overflow. But "(1<<30) * 4" actually can overflow 32 bits, so the checks are insufficient. I have changed it to "> OBD_MAX_IOCTL_BUFFER" instead. Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Oleg Drokin 提交于
Pointer 'ni' checked for NULL at line 1569 may be passed to function and may be dereferenced there by passing argument 1 to function 'lnet_ni_notify_locked' at line 1621. found by Klocwork Insight tool Signed-off-by: NOleg Drokin <oleg.drokin@intel.com> CC: Dmitry Eremin <dmitry.eremin@intel.com> CC: Liang Zhen <liang.zhen@intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Dmitry Eremin 提交于
Null pointer 'cp' that comes from line 2544 may be dereferenced at line 2618. found by Klocwork Insight tool Signed-off-by: NDmitry Eremin <dmitry.eremin@intel.com> Reviewed-on: http://review.whamcloud.com/9386 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4629Reviewed-by: NJohn L. Hammond <john.hammond@intel.com> Reviewed-by: NIsaac Huang <he.huang@intel.com> Signed-off-by: NOleg Drokin <oleg.drokin@intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Dmitry Eremin 提交于
Local variable 'hash' is never used found by Klocwork Insight tool Signed-off-by: NDmitry Eremin <dmitry.eremin@intel.com> Reviewed-on: http://review.whamcloud.com/9386 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4629Reviewed-by: NJohn L. Hammond <john.hammond@intel.com> Reviewed-by: NIsaac Huang <he.huang@intel.com> Signed-off-by: NOleg Drokin <oleg.drokin@intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-