- 08 Feb, 2013 12 commits
-
-
Aaro Koskinen authored
Delete IF_DEF_LVDS check, this function is never called when it's true. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Aaro Koskinen authored
Delete IF_DEF_LVDS check, this function is never called when it's true. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Aaro Koskinen authored
This function is never called when pVBInfo->IF_DEF_LVDS is true, so we can remove checks and reduce complexity. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Aaro Koskinen authored
Delete IF_DEF_LVDS check, this function is never called when it's true. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Aaro Koskinen authored
Delete IF_DEF_LVDS check, this function is never called when it's true. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fengguang Wu authored
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Cc: Minchan Kim <minchan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Tommi Rantala authored
Prefix the functions in dgrp_specproc.c to avoid ambiguity in backtraces, such as the "info_proc_open" in this one: unreferenced object 0xffff88003b6696e0 (size 32): comm "cat", pid 2321, jiffies 4294705179 (age 29.434s) hex dump (first 32 bytes): 40 79 1c 81 ff ff ff ff 60 79 1c 81 ff ff ff ff @y......`y...... 50 79 1c 81 ff ff ff ff b0 62 89 81 ff ff ff ff Py.......b...... backtrace: [<ffffffff81c7e3b1>] kmemleak_alloc+0x21/0x50 [<ffffffff811955cb>] kmem_cache_alloc_trace+0x11b/0x190 [<ffffffff811c87dc>] single_open+0x3c/0xc0 [<ffffffff81896495>] info_proc_open+0x15/0x20 [<ffffffff8120c6d7>] proc_reg_open+0xb7/0x160 [<ffffffff811a1a5c>] do_dentry_open+0x1cc/0x280 [<ffffffff811a296a>] finish_open+0x4a/0x60 [<ffffffff811b14d7>] do_last+0xb07/0xdb0 [<ffffffff811b1842>] path_openat+0xc2/0x4f0 [<ffffffff811b1cac>] do_filp_open+0x3c/0xa0 [<ffffffff811a2dcc>] do_sys_open+0x11c/0x1c0 [<ffffffff811a2e8c>] sys_open+0x1c/0x20 [<ffffffff81ca3d69>] system_call_fastpath+0x16/0x1b [<ffffffffffffffff>] 0xffffffffffffffff Signed-off-by: Tommi Rantala <tt.rantala@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Tommi Rantala authored
Trinity (the syscall fuzzer) discovered that reading /proc/dgrp/info was leaking some memory. Fix by using the correct release op in info_proc_file_ops. unreferenced object 0xffff88003b6696e0 (size 32): comm "cat", pid 2321, jiffies 4294705179 (age 29.434s) hex dump (first 32 bytes): 40 79 1c 81 ff ff ff ff 60 79 1c 81 ff ff ff ff @y......`y...... 50 79 1c 81 ff ff ff ff b0 62 89 81 ff ff ff ff Py.......b...... backtrace: [<ffffffff81c7e3b1>] kmemleak_alloc+0x21/0x50 [<ffffffff811955cb>] kmem_cache_alloc_trace+0x11b/0x190 [<ffffffff811c87dc>] single_open+0x3c/0xc0 [<ffffffff81896495>] info_proc_open+0x15/0x20 [<ffffffff8120c6d7>] proc_reg_open+0xb7/0x160 [<ffffffff811a1a5c>] do_dentry_open+0x1cc/0x280 [<ffffffff811a296a>] finish_open+0x4a/0x60 [<ffffffff811b14d7>] do_last+0xb07/0xdb0 [<ffffffff811b1842>] path_openat+0xc2/0x4f0 [<ffffffff811b1cac>] do_filp_open+0x3c/0xa0 [<ffffffff811a2dcc>] do_sys_open+0x11c/0x1c0 [<ffffffff811a2e8c>] sys_open+0x1c/0x20 [<ffffffff81ca3d69>] system_call_fastpath+0x16/0x1b [<ffffffffffffffff>] 0xffffffffffffffff Signed-off-by: Tommi Rantala <tt.rantala@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ian Abbott authored
`comedi_alloc_subdevice_minors()` currently prints a message about running out of minor numbers board device files if it runs out of minor device numbers. Change it to complain about running out of minor device numbers for subdevice files as these are in a different range, not shared with those for board device files. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ian Abbott authored
`comedi_alloc_subdevice_minor()` currently returns the allocated minor device number on success. This is not really of any interest to the caller (in fact the return value is not even checked), so just return 0 on success. If the caller really needs to know the allocated minor device number it can look in `s->minor`. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Peter Huewe authored
If CONFIG_MTD is not set goldfish_nand fails to compile with the following linker warnings: drivers/built-in.o: In function `goldfish_nand_remove': goldfish_nand.c:(.text+0x6e7d0e): undefined reference to `mtd_device_unregister' drivers/built-in.o: In function `goldfish_nand_erase': goldfish_nand.c:(.text+0x6e8ba2): undefined reference to `mtd_erase_callback' drivers/built-in.o: In function `goldfish_nand_init_device': goldfish_nand.c:(.text+0x6e8eba): undefined reference to `mtd_device_parse_register' Reported-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Peter Huewe authored
When building the driver, gcc emits the following warnings: .../drivers/staging/goldfish/goldfish_nand.c: In function 'goldfish_nand_read_oob': goldfish_nand.c:159:2: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'size_t' [-Wformat] goldfish_nand.c:159:2: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'size_t' [-Wformat] In function 'goldfish_nand_write_oob': goldfish_nand.c:191:2: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'size_t' [-Wformat] goldfish_nand.c:191:2: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'size_t' [-Wformat] In function 'goldfish_nand_read': goldfish_nand.c:215:2: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'size_t' [-Wformat] In function 'goldfish_nand_write': goldfish_nand.c:239:2: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'size_t' [-Wformat] -> As defined in the printk-formats use %zx for size_t variables Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 07 Feb, 2013 2 commits
-
-
H Hartley Sweeten authored
The 'if (ret)' after calling comedi_pcmcia_enable() was accidentally removed in: Commit: 573a9648 staging: comedi: ni_daq_dio24: use comedi_pcmcia_{enable,disable} Put if back so that dio24_auto_attach() can finish attaching to the board after enabling the pcmcia device. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Aaro Koskinen authored
Commit 56810a92 (staging: xgifb: use XGIRegInit()) left 3cc uninitialized, and it may trigger a panic during probe. Fix this. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 06 Feb, 2013 26 commits
-
-
H Hartley Sweeten authored
The kbuild test robot reported a build error in this driver caused by: commit: a3ac9519 staging: comedi: comedi_pcmcia: allow drivers to use a custom conf_check() This commit changed the comedi_pcmcia_enable() function so that it now takes two arguments. The new argument is an optional (*conf_check) function that is passed to pcmcia_loop_config(). This driver uses the default (*conf_check) in comedi_pcmcia.c so just pass a NULL as the second arg. Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
Use pcmcia_request_irq() instead of request_irq() to request the shared irq for the PCMCIA device. This allows the PCMCIA core to clean up the registration in pcmcia_disable_device(). Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
Use the comedi_pcmcia_{enable,disable} helpers to enable/disable the PCMCIA device. This driver uses a local (*conf_check) to check the pcmcia_device configuration. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
Allow comedi pcmcia drivers to use a custom conf_check() when calling comedi_pcmcia_enable() to enable the pcmcia device. If a conf_check() is not passed the internal comedi_pcmcia_conf_check() will be used. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
Use the comedi_pcmcia_{enable,disable} helpers to enable/disable the PCMCIA device. This driver is not an audio device, remove CONF_AUTO_AUDIO from the link->config_flags. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
Use the comedi_pcmcia_{enable,disable} helpers to enable/disable the PCMCIA device. This driver does not use interrupts and is not an audio device, remove CONF_ENABLE_IRQ and CONF_AUTO_AUDIO from the link->config_flags. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
In comedi drivers typically *_attach_common() is used as the 'common' part of the comedi_driver attach code for drivers that support various bus types (ISA, PCI, etc.). This driver is specific to a USB device. To avoid confusion when grepping, rename this function to something more appropriate. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
git history provides a better Changelog for the driver. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
The vmk8055_range table is a duplicate of the comedi core provided range_unipolar5 table. Use that instead. For aesthetic reasons, clean up the formating of the vmk8061_range table. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
If CONFIG_COMEDI_DEBUG is defined a macro is enabled to output some printk(KERN_REBUG ...) messages. These are just added noise. Remove it. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
This define is no longer used by the driver. Remove it. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
The comedi core can use the (*insn_bits) function to emulate the (*insn_read) function. Remove the unnecessary (*insn_read) function. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
The comedi core can use the (*insn_bits) function to emulate the (*insn_write) function. Remove the unnecessary (*insn_read) function. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
The comedi core can use the (*insn_bits) function to emulate the (*insn_read) function. The digital output (*insn_bits) function properly handles the VMK8061_MODEL to read the digital output states before returning. Remove the unnecessary (*insn_read) function. It's also not necessary to set the SDF_READABLE flag so remove the entire conditional in the attach. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
Change the 'pwm_bits' in the boardinfo to 'pwm_maxdata' so that the calculation of s->maxdata can be removed. Also, change the type to match the comedi_subdevice type. For aesthetic reasons, rename the 'pwm_chans' boardinfo and change its type also. Remove the '0' values in the boardinfo. Rename the (*insn_read) and (*insn_write) functions for the pwm subdevice to make grepping easier. For aesthetic reasons, add some whitespace to the subdevice init. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
Change the 'cnt_bits' in the boardinfo to 'cnt_maxdata' so that the calculation of s->maxdata can be removed. Also, change the type to match the comedi_subdevice type. Add a comment about the '0' value for DEVICE_VMK8061. The s->maxdata should always be set for the subdevice. Move it out of the conditional. Rename the (*insn_read), (*insn_config_, and (*insn_write) functions for the counter subdevice to make grepping easier. For aesthetic reasons, add some whitespace to the subdevice init. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
Remove the SDF_GROUND flag from s->subdev_flags. This flag only has meaning for analog subdevices. Add the missing s->range_table for the subdevice. Rename the (*insn_write), (*insn_bits), and (*insn_read) functions for the digital input subdevice to make grepping easier. For aesthetic reasons, add some whitespace to the subdevice init. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
Change the type for the digital input 'di_chans' boardinfo to match the comedi_subdevice type it is set to. For aesthetic reasons, rename the variable also. Remove the SDF_GROUND flag from s->subdev_flags. This flag only has meaning for analog subdevices. Add the missing s->range_table for the subdevice. Rename the (*insn_read) and (*insn_bits) functions for the digital input subdevice to make grepping easier. For aesthetic reasons, add some whitespace to the subdevice init. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
Change the type for the analog output 'ao_chans' boardinfo to match the comedi_subdevice type it is set to. For aesthetic reasons, rename the variable also. Rename the (*insn_write) and (*insn_read) functions for the analog output subdevice to make grepping easier. For aesthetic reasons, add some whitespace to the subdevice init. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
Change the 'ai_bits' in the boardinfo to 'ai_maxdata' so that the calculation of s->maxdata can be removed. Change the types for the analog input boardinfo to match the comedi_subdevice types they are set to. Rename the (*insn_read) function for the analog input subdevice from vmk80xx_ai_rinsn to vmk80xx_ai_insn_read to make grepping easier. For aesthetic reasons, add some whitespace to the subdevice init. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
The only information in the boardinfo that is used outside of the attach of the driver is the 'model' of the device. Remove the 'board' pointer from the private data and replace it with the 'model' enum and just copy that information over during the attach. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
Make the usb_driver (*probe) simply call comedi_usb_auto_config() and move all the (*probe) code into the (*auto_attach) function. This allows getting rid of the static private data array since we no longer do part of the initialization in the (*probe) and then finish it in the (*auto_attach). We can simply kzalloc the private data instead. The comedi core will then handle the kfree of the data when the driver is detached. We can also get rid of the static 'glb_mutex' since this mutex was only used to protect the static private data array. Change the parameters for a couple of the helper functions used during the auto attach. Now that the comedi_device is available we can simply pass that pointer and get the specific pointers needed by the helper functions from it. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
Allow the comedi usb drivers to pass a 'context' from their (*probe) functions to the comedi core's comedi_usb_auto_config(). This 'context' is then passed to comedi_auto_config() and then to the comedi_driver's (*auto_attach). Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
The 'attached' flag in the private data is set after the comedi_driver (*auto_attach) function has completed successfully. The only places it's checked are in rudimentary_check(), which does some basic sanity checks before doing any of the subdevice operations, and vmk80xx_auto_attach(), which is the comedi_driver (*auto_attach) function. The (*auto_attach) function can only be called as the result of a successfull usb_driver (*probe). Part of the probe is to locate a free slot in the static private data array. All free slots are initialized to '0' so the 'attached' flag will always be cleared. Remove the unneccessary 'attached' flag in the private data. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
The 'probed' variable is used in the usb driver (*probe) to detect an unused element in the static private data arry. This variable is then set after the usb driver has completed its (*probe) before calling comedi_usb_auto_config(). When the comedi core does the auto config it will call the (*auto_attach) function, vmk80xx_auto_attach(), which then locates the correct private data in the static array by checking to see if it has been 'probed' and that the 'intf' variable matches the usb_interface pointer for the usb device. Now that the private data is clean after failed usb probes and disconnects we don't have to worry about have a garbage 'intf' value in the private data that might match. Remove the 'probed' flag from the private data and just use the 'intf' pointer to detect the match. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
Currently the private data used in this driver is stored in a static array. During the usb (*probe) and empty location is found in this array for use by the usb device. Some initialization of the private data is then done before comedi_usb_auto_config() is called to allow the comedi core to attach its comedi_device to the usb device. The (*probe) can fail for various reasons. If it does, make sure that the private data is clean before returning an error. The usb (*disconnect) simply calls comedi_usb_auto_unconfig() to allow the comedi core to disconnect its comedi_device from the usb device. Since the private data points to the static array it cannot be kfree'ed during the detach. Instead make sure it clean before leaving the detach. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-