- 11 Feb, 2013 3 commits
-
-
Dan Magenheimer authored
It was observed by Andrea Arcangeli in 2011 that zcache can get "full" and there must be some way for compressed swap pages to be (uncompressed and then) sent through to the backing swap disk. A prototype of this functionality, called "unuse", was added in 2012 as part of a major update to zcache (aka "zcache2"), but was left unfinished due to the unfortunate temporary fork of zcache. This earlier version of the code had an unresolved memory leak and was anyway dependent on not-yet-upstream frontswap and mm changes. The code was meanwhile adapted by Seth Jennings for similar functionality in zswap (which he calls "flush"). Seth also made some clever simplifications which are herein ported back to zcache. As a result of those simplifications, the frontswap changes are no longer necessary, but a slightly different (and simpler) set of mm changes are still required [1]. The memory leak is also fixed. Due to feedback from akpm in a zswap thread, this functionality in zcache has now been renamed from "unuse" to "writeback". Although this zcache writeback code now works, there are open questions as how best to handle the policy that drives it. As a result, this patch also ties writeback to a new config option. And, since the code still depends on not-yet-upstreamed mm patches, to avoid build problems, the config option added by this patch temporarily depends on "BROKEN"; this config dependency can be removed in trees that contain the necessary mm patches. [1] https://lkml.org/lkml/2013/1/29/540/ https://lkml.org/lkml/2013/1/29/539/Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Joe Perches authored
alloc failures already get standardized OOM messages and a dump_stack. For the affected mallocs around these OOM messages: Converted kzallocs with multiplies to kcalloc. Converted kmallocs with multiplies to kmalloc_array. Converted a kmalloc/strlen/strncpy to kstrdup. Moved a spin_lock below a removed OOM message and removed a now unnecessary spin_unlock. Neatened alignment and whitespace. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Greg Kroah-Hartman authored
Merge tag 'iio-for-3.9d' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: "4th set of IIO new drivers cleanups and fixes for the 3.9 cycle + a new spi helper function. 1) Introduce spi_sync_transfer and use it within IIO. Originally it was envisioned that this nice little boilerplate replacement would go through the spi tree, but Grant Likely stated he'd prefer we take it through IIO as the example usecases were all in IIO (and are also in this pull request). Note that given their may have been some unresolved elements related to the coccinelle element of the patch, that has been stripped out and will doubtlessly follow at a later date (along with lots of other patches for drivers elsewhere in the tree). 2) New Invensense MPU6050 driver. This is stripped down to pretty much the basics from the original submission with the intent to build up all the fancy bits in an incremental (and hence reviewable fashion). It's been through a good few revisions so nice to finally merge this. 3) Change to iio_channel_get api to simplify device tree based mappings. The actual mappings are currently under review. 4) Build fixes for !CONFIG_IIO_TRIGGER in the st_sensors driver. This one snuck past during review and testing but got picked up by Randy Dunlap in a randconfig build. 5) Some max1363 cleanups and enhancements. 6) Some comment fixes to make them coherent and comprehensible. 7) Trivial build warning fix in mxs-lradc"
-
- 10 Feb, 2013 1 commit
-
-
Ge Gao authored
This the basic functional Invensense MPU6050 Device driver. Signed-off-by: Ge Gao <ggao@invensense.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-
- 09 Feb, 2013 7 commits
-
-
Jonathan Cameron authored
Partly a case of removing unused headers and partly a case of ifdefing out the iio_trigger_ops structures. This has come about because of an 'unusual' separation of code in this driver. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Reported-by: Randy Dunlap <rdunlap@infradead.org> Acked-by: Denis Ciocca <denis.ciocca@st.com>
-
Jonathan Cameron authored
Also include a couple of forward defs of struct iio_trigger and struct iio_trigger_ops to avoid doing this in each driver. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Reported-by: Randy Dunlap <rdunlap@infradead.org> Acked-by: Denis Ciocca <denis.ciocca@st.com>
-
Lars-Peter Clausen authored
Use the new spi_sync_transfer() helper function instead of open-coding it. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-
Lars-Peter Clausen authored
Use the new spi_sync_transfer() helper function instead of open-coding it. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-
Lars-Peter Clausen authored
Quite often the pattern used for setting up and transferring a synchronous SPI transaction looks very much like the following: struct spi_message msg; struct spi_transfer xfers[] = { ... }; spi_message_init(&msg); spi_message_add_tail(&xfers[0], &msg); ... spi_message_add_tail(&xfers[ARRAY_SIZE(xfers) - 1], &msg); ret = spi_sync(&msg); This patch adds two new helper functions for handling this case. The first helper function spi_message_init_with_transfers() takes a spi_message and an array of spi_transfers. It will initialize the message and then call spi_message_add_tail() for each transfer in the array. E.g. the following spi_message_init(&msg); spi_message_add_tail(&xfers[0], &msg); ... spi_message_add_tail(&xfers[ARRAY_SIZE(xfers) - 1], &msg); can be rewritten as spi_message_init_with_transfers(&msg, xfers, ARRAY_SIZE(xfers)); The second function spi_sync_transfer() takes a SPI device and an array of spi_transfers. It will allocate a new spi_message (on the stack) and add all transfers in the array to the message. Finally it will call spi_sync() on the message. E.g. the follwing struct spi_message msg; struct spi_transfer xfers[] = { ... }; spi_message_init(&msg); spi_message_add_tail(&xfers[0], &msg); ... spi_message_add_tail(&xfers[ARRAY_SIZE(xfers) - 1], &msg); ret = spi_sync(spi, &msg); can be rewritten as struct spi_transfer xfers[] = { ... }; ret = spi_sync_transfer(spi, xfers, ARRAY_SIZE(xfers)); A coccinelle script to find such instances will follow. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-
Fabio Estevam authored
The following warning is generated by sparse: drivers/staging/iio/adc/mxs-lradc.c:118:47: warning: duplicate const Remove the duplicate const. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-
Denis CIOCCA authored
This patch resolve a bugfix when driver is compiled without trigger. Signed-off-by: Denis Ciocca <denis.ciocca@st.com> Reported-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-
- 08 Feb, 2013 13 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
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 14 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>
-
Guenter Roeck authored
For iio_channel_get to work with OF based configurations, it needs the consumer device pointer instead of the consumer device name as argument. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Anton Vorontsov <anton@enomsg.org> Acked-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-
Peter Meerwald authored
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-
Guenter Roeck authored
Implement external reference voltage as regulator named "vref". Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-
Guenter Roeck authored
Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jonathan Cameron <jic23@kernel.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>
-