Greg Kroah-Hartman [Thu, 12 Jul 2012 19:26:33 +0000 (12:26 -0700)]
Merge tag 'fixes-togreg-3.6a' of git://git./linux/kernel/git/jic23/iio into work-next
Various minor IIO fixes for staging-next.
Dan Carpenter [Wed, 11 Jul 2012 06:34:00 +0000 (07:34 +0100)]
iio: double unlock on error path
We should be holding the mutex when we goto error_free_chans.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Gerard Snitselaar [Wed, 11 Jul 2012 04:05:00 +0000 (05:05 +0100)]
iio: dac: ad5064: fix section mismatch in ad5064_init() in linux-next
ad5064_init() calls ad5064_spi_unregister_driver() which is annotated
__exit.
Signed-off-by: Gerard Snitselaar <dev@snitselaar.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Wed, 11 Jul 2012 08:01:00 +0000 (09:01 +0100)]
iio: ad5064: Move bus write callbacks to #if protected sections
Move the SPI and I2C specific write callbacks to the respective
"#if IS_ENABLED(CONFIG_SPI_MASTER)" and "#if IS_ENABLED(CONFIG_I2C)"
protected sections of the code.
This fixes the following warning which occurs if CONFIG_I2C is not set:
drivers/iio/dac/ad5064.c: In function ‘ad5064_i2c_write’:
drivers/iio/dac/ad5064.c:132: error: implicit declaration of function ‘i2c_master_send’
And the follwing warning which occurs when CONFIG_SPI_MASTER is not set:
drivers/iio/dac/ad5064.c:137: warning: ‘ad5064_spi_write’ defined but not used
Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Wed, 11 Jul 2012 09:28:00 +0000 (10:28 +0100)]
staging:iio:max1363: Don't free uninitialized variable
It is possible that on one of the error paths we are going to try to free
'rxbuf', even though it has not been allocated yet, which cause the following
warning:
drivers/staging/iio/adc/max1363_ring.c: In function 'max1363_trigger_handler':
drivers/staging/iio/adc/max1363_ring.c:87:7: warning: 'rxbuf' may be used
uninitialized in this function
Reported-by: Fengguang Wu <wfg@linux.intel.com>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Devendra Naga [Wed, 11 Jul 2012 06:09:15 +0000 (11:54 +0545)]
staging/slicoss: disable pci device at remove
at probe we enabled the device, and we should disable it at remove.
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Devendra Naga [Tue, 10 Jul 2012 06:46:30 +0000 (12:16 +0530)]
staging/phison: use module_pci_driver macro
remove the duplication of module_pci_driver and use this macro instead
module_pci_driver macro does the same things as the code below does
static int __init pci_test_dev_init(void)
{
return pci_register_driver(&pci_test_driver_ops);
}
static void __exit pci_test_dev_exit(void)
{
pci_unregister_driver(&pci_test_driver_ops);
}
module_init(pci_test_dev_init);
module_exit(pci_test_dev_exit);
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Devendra Naga [Tue, 10 Jul 2012 06:40:04 +0000 (12:10 +0530)]
staging/sbe-2t3e3: use module_pci_driver macro
the _init and _exit functions do nothing but pci_register_driver,
and pci_unregister_driver,
so replace these and also the module _init and _exit
macros with the module_pci_driver macro.
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Devendra Naga [Tue, 10 Jul 2012 06:41:03 +0000 (12:11 +0530)]
staging/et131x: use module_pci_driver macro
remove code duplicating module_pci_driver
and also the obvious comments about the _init and _exit points.
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Devendra Naga [Tue, 10 Jul 2012 06:41:48 +0000 (12:11 +0530)]
staging/sep: use module_pci_driver macro
this driver duplicates the module_pci_driver code, so remove the
duplicated code and use module_pci_driver and also remove the
obvious comments about _init and _exit.
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Devendra Naga [Tue, 10 Jul 2012 05:49:15 +0000 (11:19 +0530)]
staging/sm7xxfb: return a proper err for smtc_alloc_fb_info failure
as smtc_alloc_fb_info can fail, but we are returning the 0,
how? because the pci_enable_device succeeded, which makes the probe
return 0, and may cause panics or some strange problems at remove
when driver unloaded by modprobe -r.
so return err properly as smtc_alloc_fb_info is doing kzallocs its
good to do -ENOMEM
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Devendra Naga [Tue, 10 Jul 2012 05:49:14 +0000 (11:19 +0530)]
staging/sm7xxfb: use module_pci_driver macro
as the manual of module_pci_driver says that
it can be used when the init and exit functions of
the module does nothing but the pci_register_driver
and pci_unregister_driver.
use it for the sm7xxfb driver, as the driver does nothing in
its _init and _exit functions but the register and unregister.
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Masanari Iida [Wed, 11 Jul 2012 15:41:44 +0000 (00:41 +0900)]
staging: ft1000: Fix typo in ft1000_usb.c
Correct spelling typo within debug message of ft1000_usb.c
Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Devendra Naga [Tue, 10 Jul 2012 05:06:05 +0000 (10:36 +0530)]
staging/ft1000: remove all spaces, tabs issue in while loop of ft1000_interrupt
all spaces in the main while loop of ft1000_interrupt are converted
to tabs.
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Marcos Paulo de Souza [Tue, 10 Jul 2012 02:43:13 +0000 (23:43 -0300)]
staging: csr: Remove unused macros
These macros are not used, so remove it.
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Marcos Paulo de Souza [Tue, 10 Jul 2012 02:43:12 +0000 (23:43 -0300)]
staging: csr: unifi_sme.c: Remove unused macros
These macros are not used, so remove it.
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Marcos Paulo de Souza [Tue, 10 Jul 2012 02:43:11 +0000 (23:43 -0300)]
staging: csr: netdev.c: Remove unused macros
These macros are not used, so we can remove it.
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Marcos Paulo de Souza [Tue, 10 Jul 2012 02:43:10 +0000 (23:43 -0300)]
staging: csr: csr_util.h: Remove commented macros
All these macros are commented, so we can removed it.
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Marcos Paulo de Souza [Tue, 10 Jul 2012 02:43:09 +0000 (23:43 -0300)]
staging: csr: Remove dead code
All this code is dead, so remove it.
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Marcos Paulo de Souza [Tue, 10 Jul 2012 01:32:40 +0000 (22:32 -0300)]
staging: bcm: Misc.c: Remove unused macros
These macros were reported by forgotten-macros tool
(https://github.com/marcosps/forgotten_macros).
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Marcos Paulo de Souza [Tue, 10 Jul 2012 01:32:39 +0000 (22:32 -0300)]
staging: bcm: Remove all commented macros
All these macros are commented, and can be removed.
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Marcos Paulo de Souza [Tue, 10 Jul 2012 01:32:38 +0000 (22:32 -0300)]
staging: bcm: Remove code that will never execute
This patch removes all references of "if 0" blocks in the bcm drivers.
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Miguel Gómez [Fri, 6 Jul 2012 10:40:54 +0000 (12:40 +0200)]
Staging: xgifb: Remove useless condition.
Remove last if branch in XGIfb_do_set_var(), as it has no action assigned.
Signed-off-by: Miguel Gómez <magomez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Miguel Gómez [Fri, 6 Jul 2012 10:40:53 +0000 (12:40 +0200)]
Staging: xgifb: Fix coding style.
Fix small coding style warnings in several files.
Signed-off-by: Miguel Gómez <magomez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Miguel Gómez [Fri, 6 Jul 2012 10:40:52 +0000 (12:40 +0200)]
Staging: xgifb: Rework some conditions in XGI_SetCRT2ModeRegs().
Rework some conditions to reduce indentation and fix style warnings.
Signed-off-by: Miguel Gómez <magomez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Miguel Gómez [Fri, 6 Jul 2012 10:40:51 +0000 (12:40 +0200)]
Staging: xgifb: Rework conditions in XGI_EnableBridge().
Rework some conditions to reduce indentation and fix style warnings.
Signed-off-by: Miguel Gómez <magomez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Miguel Gómez [Fri, 6 Jul 2012 10:40:50 +0000 (12:40 +0200)]
Staging: xgifb: Rework conditions in XGI_SetLockRegs().
Rework some conditions to reduce indentation and fix style warnings.
Signed-off-by: Miguel Gómez <magomez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Miguel Gómez [Fri, 6 Jul 2012 10:40:49 +0000 (12:40 +0200)]
Staging: xgifb: Refactor XGI_GetCRT2ResInfo().
Use a goto to remove one level of indentation, fixing style warnings.
Signed-off-by: Miguel Gómez <magomez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Miguel Gómez [Fri, 6 Jul 2012 10:40:48 +0000 (12:40 +0200)]
Staging: xgifb: Rework conditions in XGI_GetVBInfo().
Rework some conditions to reduce indentation and fix style warnings.
Signed-off-by: Miguel Gómez <magomez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Miguel Gómez [Fri, 6 Jul 2012 10:40:47 +0000 (12:40 +0200)]
Staging: xgifb: Refactor XGI_GetVBType().
Refactor XGI_GetVBType() to reduce indentation and fix style warnings.
Signed-off-by: Miguel Gómez <magomez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Miguel Gómez [Fri, 6 Jul 2012 10:40:46 +0000 (12:40 +0200)]
Staging: xgifb: Refactor XGI_AjustCRT2Rate().
Refactor some conditions to reduce indentation and fix style warnings.
Signed-off-by: Miguel Gómez <magomez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Miguel Gómez [Fri, 6 Jul 2012 10:40:45 +0000 (12:40 +0200)]
Staging: xgifb: Rework conditions in XGI_SetATTRegs().
Rework some conditions to reduce indentation and fix style warnings.
Signed-off-by: Miguel Gómez <magomez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Miguel Gómez [Fri, 6 Jul 2012 10:40:44 +0000 (12:40 +0200)]
Staging: xgifb: Remove useless always true condition.
Signed-off-by: Miguel Gómez <magomez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Miguel Gómez [Fri, 6 Jul 2012 10:40:43 +0000 (12:40 +0200)]
Staging: xgifb: Remove unneeded var and condition in XGIfb_search_vesamode().
Signed-off-by: Miguel Gómez <magomez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Miguel Gómez [Fri, 6 Jul 2012 10:40:42 +0000 (12:40 +0200)]
Staging: xgifb: Simplify XGIfb_GetXG21DefaultLVDSModeIdx().
Simplify the code and make it more readable.
Signed-off-by: Miguel Gómez <magomez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Miguel Gómez [Fri, 6 Jul 2012 10:40:41 +0000 (12:40 +0200)]
Staging: xgifb: Remove useless switch in XGIfb_detect_VB().
The switch performs no action so it can be removed.
Signed-off-by: Miguel Gómez <magomez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Miguel Gómez [Fri, 6 Jul 2012 10:40:40 +0000 (12:40 +0200)]
Staging: xgifb: Improve debug strings.
Signed-off-by: Miguel Gómez <magomez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Miguel Gómez [Fri, 6 Jul 2012 10:40:39 +0000 (12:40 +0200)]
Staging: xgifb: Remove unused struct _chswtable.
Struct _chswtable and the variable mychswtable are not used anywhere, so remove
them.
Signed-off-by: Miguel Gómez <magomez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Miguel Gómez [Fri, 6 Jul 2012 10:40:38 +0000 (12:40 +0200)]
Staging: xgifb: Remove LCDA detection in xgifb_probe().
The piece of code that checks for LCDA in xgifb_probe() just checks for some
register values but doesn't really do anything in response to them (the actions
that should be executed are commented).
As nothing is really being done, the code can be safely removed.
Signed-off-by: Miguel Gómez <magomez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Miguel Gómez [Fri, 6 Jul 2012 10:40:37 +0000 (12:40 +0200)]
Staging: xgifb: Remove unneeded XGI_LCD_TYPE enumeration.
LCD_TYPEs are taken from drivers/video/sis/sis.h, so this enumeration is not
needed.
Signed-off-by: Miguel Gómez <magomez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Miguel Gómez [Fri, 6 Jul 2012 10:40:36 +0000 (12:40 +0200)]
Staging: xgifb: Comment cleaning.
Remove commented code and useless comments. Leave only those with relevant
hints to the code.
Signed-off-by: Miguel Gómez <magomez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Mon, 9 Jul 2012 20:39:08 +0000 (13:39 -0700)]
Merge tag 'togreg_8_7_2012' of git://git./linux/kernel/git/jic23/iio into staging-next
Mixed back of updates and trivial examples fixes.
Nothing terribly interesting in this one.
8 July 2012
Greg Kroah-Hartman [Mon, 9 Jul 2012 20:35:32 +0000 (13:35 -0700)]
Merge tag 'fixes-togreg_8_7_2012' of git://git./linux/kernel/git/jic23/iio into staging-next
Mixed bag of IIO fixes.
Quite a few cases of interrupt handlers returning
errors and a few more specific bits and bobs.
Most of these only effect fairly obscure error
paths. The IRQF_ONESHOT one may cause trouble
given the requests will now be rejected.
Jonathan
8_7_2012
Devendra Naga [Mon, 9 Jul 2012 17:34:20 +0000 (23:04 +0530)]
staging/slicoss: return -ENODEV if no devid matches
if no case matches we are simply asserting and doing break.
and i think we may need to return that -ENODEV , no device is
present, rather assert'ing.
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Devendra Naga [Mon, 9 Jul 2012 17:34:18 +0000 (23:04 +0530)]
staging/slicoss: remove not-needed ASSERT
As the private pointer is valid at the remove of driver, and remove wont' be called if probe fails, so no point for checking of ASSERT
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Justin P. Mattock [Mon, 9 Jul 2012 14:30:27 +0000 (07:30 -0700)]
staging "speakup" Fix typos.
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Marcos Paulo de Souza [Mon, 9 Jul 2012 02:51:26 +0000 (23:51 -0300)]
staging: vt6655: hostap.c: Remove all unused macros
All these macros were reported by forgotten-macros tool
(https://github.com/marcosps/forgotten_macros).
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Marcos Paulo de Souza [Mon, 9 Jul 2012 02:51:25 +0000 (23:51 -0300)]
staging: vt6655: Remove all commented macros
These macros were reported by forgotten-macros tool
(https://github.com/marcosps/forgotten_macros).
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Marcos Paulo de Souza [Mon, 9 Jul 2012 02:51:24 +0000 (23:51 -0300)]
staging: vt6655: baseband.h: Remove all unused macros
These macros were reported by forgotten-macros tool
(https://github.com/marcosps/forgotten_macros).
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Marcos Paulo de Souza [Mon, 9 Jul 2012 02:51:23 +0000 (23:51 -0300)]
staging: vt6655: rf.c: Remove all unused macros
These macros were reported by forgotte-macros tool
(https://github.com/marcosps/forgotten_macros).
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Marcos Paulo de Souza [Mon, 9 Jul 2012 02:51:22 +0000 (23:51 -0300)]
staging: vt6655: mac.h: Remove all commented macros
These macros were reported by forgotten-macros tool
(https://github.com/marcosps/forgotten_macros).
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Marcos Paulo de Souza [Mon, 9 Jul 2012 02:51:21 +0000 (23:51 -0300)]
staging: vt6655: Remove all "if 0" blocks from driver
This commit removes code that will never be executed by vt6655 driver.
Was the forgotten-macros tool(https://github.com/marcosps/forgotten_macros)
who reported these blocks for us.
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Marcos Paulo de Souza [Mon, 9 Jul 2012 01:55:50 +0000 (22:55 -0300)]
staging: vt6656: Remove unsed macros
These macros were reported by forgotten-macros tool
(https://github.com/marcosps/forgotten_macros).
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Marcos Paulo de Souza [Mon, 9 Jul 2012 01:55:49 +0000 (22:55 -0300)]
staging: vt6656: Remove all commented macros
These macros were reported by forgotten-macros tool
(https://github.com/marcosps/forgotten_macros).
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Marcos Paulo de Souza [Mon, 9 Jul 2012 01:55:48 +0000 (22:55 -0300)]
staging: vt6656: hostap.c: Remove commented code
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Marcos Paulo de Souza [Mon, 9 Jul 2012 01:55:47 +0000 (22:55 -0300)]
staging: vt6656: hostap.c: Remove unused macros and some useless comments
The unused macros were reporteds by forgotten-macros
tool(https://github.com/marcosps/forgotten_macros).
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Marcos Paulo de Souza [Mon, 9 Jul 2012 01:55:46 +0000 (22:55 -0300)]
staging: vt6656: desc.h: Remove commented macros and useless comments
The commented macros are reported by forgotten-macros
tool(https://github.com/marcosps/forgotten_macros).
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cruz Julian Bishop [Sun, 8 Jul 2012 07:00:56 +0000 (17:00 +1000)]
staging: Fixes some checkpatch warnings in asus_oled/asus_oled.c
This fixes the following warnings:
1: Changes a printk(KERN_ERR) call to a pr_err call in line 785
2: Changes a printk(KERN_ERR) call to a pr_err call in line 791
3: Changes a printk(KERN_ERR) call to a pr_err call in line 798
4: Reduces line length below 80 at line 785 (Not intended)
5: Reduces line length below 80 at line 798 (Not intended)
Signed-off-by: Cruz Julian Bishop <cruz@massive-dynamics.biz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Devendra Naga [Sat, 7 Jul 2012 12:05:19 +0000 (17:35 +0530)]
staging/ft1000: remove unnecessary assignment of ret with STATUS_SUCCESS
as ret is assigned to the return of ft1000_poll, we dont need to
initialise ret with STATUS_SUCCESS.
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Devendra Naga [Sat, 7 Jul 2012 12:05:18 +0000 (17:35 +0530)]
staging/ft1000-pcmcia: fix checkpatch warnings
The below checkpatch warns fixed,
drivers/staging/ft1000/ft1000-pcmcia/ft1000_proc.c:38: ERROR: that open brace { should be on the previous line
drivers/staging/ft1000/ft1000-pcmcia/ft1000_proc.c:45: ERROR: that open brace { should be on the previous line
drivers/staging/ft1000/ft1000-pcmcia/ft1000_proc.c:57: ERROR: that open brace { should be on the previous line
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Devendra Naga [Sat, 7 Jul 2012 12:05:17 +0000 (17:35 +0530)]
staging/ft1000: fix the foo * bar warning
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Devendra Naga [Sat, 7 Jul 2012 12:05:16 +0000 (17:35 +0530)]
staging/ft1000: fix the no brace needed warning in ft1000_read_fifo_len
as the if else statements enclose only one line, so braces around them are not
needed.
The following warning is fixed
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c:100: WARNING: braces {} are not necessary for any arm of this statement
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Devendra Naga [Sat, 7 Jul 2012 12:05:15 +0000 (17:35 +0530)]
staging/ft1000: fix sparse warning about the kernel thread handler function
sparse throws warning about the ft1000_poll_thread as
drivers/staging/ft1000/ft1000-usb/ft1000_usb.c:40:5: warning: symbol 'ft1000_poll_thread' was not declared. Should it be static?
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Devendra Naga [Sat, 7 Jul 2012 12:05:14 +0000 (17:35 +0530)]
staging/ft1000: fix sparse warning
sparse warns about having 0 assigned to a pointer,
fix it up by using NULL.
The following sparse warning is fixed
drivers/staging/ft1000/ft1000-usb/ft1000_debug.c:170:52: warning: Using plain integer as NULL pointer
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Devendra Naga [Sat, 7 Jul 2012 12:05:12 +0000 (17:35 +0530)]
staging/ft1000: fix the no brace needed warning in ft1000_interrupt
as the if statement encloses only one line braces around it are not
needed.
The following warn fixed,
WARNING: braces {} are not necessary for single statement blocks
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Devendra Naga [Sat, 7 Jul 2012 06:03:04 +0000 (11:33 +0530)]
staging/rts_pstor: fix single statements block warning
The following warning is fixed up.
drivers/staging/rts_pstor/sd.c:190: WARNING: braces {} are not necessary for single statement blocks
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Devendra Naga [Sat, 7 Jul 2012 06:02:15 +0000 (11:32 +0530)]
staging/rts_pstor: fix the no brace needed warning
for if else statements having single block no braces are needed
fixed the following checkpatch warning
drivers/staging/rts_pstor/sd.c:140: WARNING: braces {} are not necessary for any arm of this statement
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jesper Juhl [Sun, 8 Jul 2012 22:59:30 +0000 (00:59 +0200)]
staging: vt6656: iwctl: remove a few remaining redundant newlines
I missed a few redundant newlines the first time.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jesper Juhl [Sun, 8 Jul 2012 22:58:52 +0000 (00:58 +0200)]
staging: vt6656: iwctl: Fix up a few remaining brace issues
My previous cleanup patches missed a few cases of
redundant/missing/replaced curly braces. This should fix up the last
ones.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by : Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jesper Juhl [Sun, 8 Jul 2012 22:58:36 +0000 (00:58 +0200)]
staging: vt6656: iwctl: fix up spacing around operators
A few cases were missed in my previous cleanup, this takes care of the
last cases of missing space (or too much space (as in a newline))
around operators ('=', '==', ',', '<').
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Seth Jennings [Mon, 2 Jul 2012 21:15:52 +0000 (16:15 -0500)]
staging: zsmalloc: add mapping modes
This patch improves mapping performance in zsmalloc by getting
usage information from the user in the form of a "mapping mode"
and using it to avoid unnecessary copying for objects that span
pages.
Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Seth Jennings [Mon, 2 Jul 2012 21:15:51 +0000 (16:15 -0500)]
staging: zsmalloc: add details to zs_map_object boiler plate
Add information on the usage limits of zs_map_object()
Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Seth Jennings [Mon, 2 Jul 2012 21:15:50 +0000 (16:15 -0500)]
staging: zsmalloc: add single-page object fastpath in unmap
Improve zs_unmap_object() performance by adding a fast path for
objects that don't span pages.
Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Seth Jennings [Mon, 2 Jul 2012 21:15:49 +0000 (16:15 -0500)]
staging: zsmalloc: remove x86 dependency
This patch replaces the page table assisted object mapping
method, which has x86 dependencies, with a arch-independent
method that does a simple copy into a temporary per-cpu
buffer.
While a copy seems like it would be worse than mapping the pages,
tests demonstrate the copying is always faster and, in the case of
running inside a KVM guest, roughly 4x faster.
Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xiao Guangrong [Tue, 26 Jun 2012 08:52:50 +0000 (16:52 +0800)]
staging: zcache: cleanup the code between tmem_obj_init and tmem_obj_find
tmem_obj_find and insertion tmem-obj have the some logic, we can integrate
the code
Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xiao Guangrong [Tue, 26 Jun 2012 08:52:17 +0000 (16:52 +0800)]
staging: zcache: introduce get_zcache_client
Introduce get_zcache_client to remove the common code
Acked-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xiao Guangrong [Tue, 26 Jun 2012 08:51:55 +0000 (16:51 +0800)]
staging: zcache: cleanup zcache_do_preload and zcache_put_page
Cleanup the code for zcache_do_preload and zcache_put_page
Acked-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xiao Guangrong [Tue, 26 Jun 2012 08:51:34 +0000 (16:51 +0800)]
staging: zcache: optimize zcache_do_preload
zcache_do_preload is called in zcache_put_page where IRQ is disabled, so, need
not care preempt
Acked-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xiao Guangrong [Tue, 26 Jun 2012 08:51:10 +0000 (16:51 +0800)]
staging: zcache: cleanup zbud_init
Need not set global parameters to 0
Acked-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xiao Guangrong [Tue, 26 Jun 2012 08:50:50 +0000 (16:50 +0800)]
staging: zcache: mark zbud_init/zcache_comp_init as __init
These functions are called only when system is initializing, so mark __init
for them to free memory
Acked-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xiao Guangrong [Tue, 26 Jun 2012 08:50:31 +0000 (16:50 +0800)]
staging: zcache: remove unnecessary config option dependence
zcache is enabled only if one of CONFIG_CLEANCACHE and CONFIG_FRONTSWAP is
enabled, see the Kconfig:
depends on (CLEANCACHE || FRONTSWAP) && CRYPTO=y && X86
So, we can remove the check in the source code
Acked-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xiao Guangrong [Tue, 26 Jun 2012 08:50:10 +0000 (16:50 +0800)]
staging: zcache: fix a compile warning
Fix:
drivers/staging/zcache/zcache-main.c: In function ‘zcache_comp_op’:
drivers/staging/zcache/zcache-main.c:112:2: warning: ‘ret’ may be used uninitial
Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xiao Guangrong [Tue, 26 Jun 2012 08:49:46 +0000 (16:49 +0800)]
staging: zcache: fix refcount leak
In zcache_get_pool_by_id, the refcount of zcache_host is not increased, but
it is always decreased in zcache_put_pool
Acked-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Emil Goode [Sat, 7 Jul 2012 18:44:49 +0000 (20:44 +0200)]
staging: CSR: fix function declaration warnings
Sparse is warning about non-ANSI function declaration.
Add void to the parameterless function.
drivers/staging/csr/csr_wifi_hip_chiphelper.c:633:31: warning:
non-ANSI function declaration of function 'ChipHelper_Null'
I also fixed this checkpatch error:
ERROR: "foo* bar" should be "foo *bar"
Signed-off-by: Emil Goode <emilgoode@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jonathan Cameron [Sat, 30 Jun 2012 12:55:23 +0000 (13:55 +0100)]
iio: Fix inkern remove incorrect put of device
The device_get is after this point so on error we should not be
removing it.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Wed, 4 Jul 2012 16:09:00 +0000 (17:09 +0100)]
staging:iio:adis16400: Do not return error code in the interrupt handler
The interrupt handler should only ever return one of the three irqreturn_t
constants and not an error code. Also make sure to always call
iio_trigger_notify_done before leaving the trigger handler.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Wed, 4 Jul 2012 16:09:00 +0000 (17:09 +0100)]
staging:iio:adis16260: Do not return error code in the interrupt handler
The interrupt handler should only ever return one of the three irqreturn_t
constants and not an error code. Also make sure to always call
iio_trigger_notify_done before leaving the trigger handler.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Wed, 4 Jul 2012 16:09:00 +0000 (17:09 +0100)]
staging:iio:accel:adis16xxx: Do not return error code in the interrupt handler
The interrupt handler should only ever return one of the three irqreturn_t
constants and not an error code. Also make sure to always call
iio_trigger_notify_done before leaving the trigger handler.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Wed, 4 Jul 2012 16:09:00 +0000 (17:09 +0100)]
staging:iio:lis3l02dq: Do not return error code in interrupt handler
The interrupt handler should only ever return one of the three irqreturn_t
constants and not an error code. Also make sure to always call
iio_trigger_notify_done before leaving the trigger handler.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Wed, 4 Jul 2012 16:09:00 +0000 (17:09 +0100)]
staging:iio:max1363: Do not return error code in interrupt handler
The interrupt handler should only ever return one of the three irqreturn_t
constants and not an error code. Also make sure to always call
iio_trigger_notify_done before leaving the trigger handler.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Wed, 4 Jul 2012 16:09:00 +0000 (17:09 +0100)]
staging:iio:ad7887: Do not return error code in interrupt handler
The interrupt handler should only ever return one of the three irqreturn_t
constants and not an error code. Also make sure to always call
iio_trigger_notify_done before leaving the trigger handler.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Wed, 4 Jul 2012 16:09:00 +0000 (17:09 +0100)]
staging:iio:ad7476: Do not return error code in interrupt handler
The interrupt handler should only ever return one of the three irqreturn_t
constants and not an error code. Also make sure to always call
iio_trigger_notify_done before leaving the trigger handler.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Wed, 4 Jul 2012 16:09:00 +0000 (17:09 +0100)]
staging:iio:ad799x: Do not return error code in interrupt handler
The interrupt handler should only ever return one of the three irqreturn_t
constants and not an error code. Also make sure to always call
iio_trigger_notify_done before leaving the trigger handler.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Wed, 4 Jul 2012 16:09:00 +0000 (17:09 +0100)]
staging:iio:dummy driver: Do not return error code in interrupt handler
The interrupt handler should only ever return one of the three irqreturn_t
constants and not an error code. Also make sure to always call
iio_trigger_notify_done before leaving the trigger handler.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Wed, 4 Jul 2012 16:09:00 +0000 (17:09 +0100)]
staging:iio:adt7310: Do not return error code in interrupt handler
The interrupt handler should only ever return one of the three irqreturn_t
constants and not an error code. Also make sure to always call
iio_trigger_notify_done before leaving the trigger handler.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Wed, 4 Jul 2012 16:09:00 +0000 (17:09 +0100)]
staging:iio:ad7298: Do not return error code in interrupt handler
The interrupt handler should only ever return one of the three irqreturn_t
constants and not an error code. Also make sure to always call
iio_trigger_notify_done before leaving the trigger handler.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Sascha Hauer [Tue, 3 Jul 2012 09:21:27 +0000 (11:21 +0200)]
staging iio adt7410: fix 13bit mode
The driver assumes that in 13bit mode the 16bit value has
to be shifted to the right by 3 bits. This is not true, in
both 16bit and 13bit mode the MSB is at the same position.
Currently the driver returns a temperature of 194 degrees
Celsius in 13bit mode and 24 degrees Celsius in 16bit mode.
Fix this by using the same algorithm for 16bit and 13bit
mode and by just masking out the lower three bits in 13bit
mode.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Sascha Hauer [Tue, 3 Jul 2012 09:21:26 +0000 (11:21 +0200)]
staging iio adt7410: sysfs store function must return length
Otherwise a write to the resolution entry never returns.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Sascha Hauer [Tue, 3 Jul 2012 08:55:40 +0000 (10:55 +0200)]
iio: Fix unitialized use of list
The dev_attr list is initialized in __iio_add_event_config_attrs which
is called only when indio_dev->channels is true. Nevertheless the list
is used unconditionally later in iio_device_register_eventset which
results in a NULL pointer exception. To fix this unconditionally
initialize the list in iio_device_register_eventset.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Mon, 2 Jul 2012 08:54:45 +0000 (10:54 +0200)]
staging:iio: Request threaded-only IRQs with IRQF_ONESHOT
Since commit
1c6c69525b ("genirq: Reject bogus threaded irq requests") threaded
IRQs without a primary handler need to be requested with IRQF_ONESHOT, otherwise
the request will fail. This patch adds the IRQF_ONESHOT to IIO drivers where it
is missing.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>