Ravishankar karkala Mallikarjunayya [Sat, 19 Nov 2011 04:36:40 +0000 (10:06 +0530)]
Staging: comedi: fix printk issue in adv_pci1710.c
This is a patch to the adv_pci1710.c file that fixes up a printk
warning found by the checkpatch.pl tool.
Converted printks to dev_version and Removed an unnecessary printk
statements.
Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Ravishankar karkala Mallikarjunayya [Sat, 19 Nov 2011 04:36:39 +0000 (10:06 +0530)]
Staging: comedi: fix brace coding style issue in das16m1.c
This is a patch to the das16m1.c file that fixes up a brace coding
warning found by the checkpatch.pl tool.
Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Ravishankar karkala Mallikarjunayya [Sat, 19 Nov 2011 04:36:38 +0000 (10:06 +0530)]
Staging: comedi: fix NULL initilization issue in pcl818.c
This is a patch to the pcl818.c file that fixes up a NULL initilization
warning found by the checkpatch.pl tool.
Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Ravishankar karkala Mallikarjunayya [Sat, 19 Nov 2011 04:36:37 +0000 (10:06 +0530)]
Staging: comedi: fix brace coding style issue in pcl818.c
This is a patch to the pcl818.c file that fixes up a brace
coding style warning found by the checkpatch.pl tool.
Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Ravishankar karkala Mallikarjunayya [Sat, 19 Nov 2011 04:36:36 +0000 (10:06 +0530)]
Staging: comedi: fix printk issue in cb_das16_cs.c
This is a patch to the cb_das16_cs.c file that fixes up a printk
warning found by the checkpatch.pl tool.
Converted printks to dev_printk.
Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Ravishankar karkala Mallikarjunayya [Sat, 19 Nov 2011 04:36:34 +0000 (10:06 +0530)]
Staging: comedi: fix printk issue in serial2002.c
This is a patch to the serial2002.c file that fixes up a printk
warning found by the checkpatch.pl tool.
converted printks to dev_version.
Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Ravishankar karkala Mallikarjunayya [Sat, 19 Nov 2011 04:36:33 +0000 (10:06 +0530)]
Staging: comedi: fix printk issue in das6402.c
This is a patch to the das6402.c file that fixes up a printk
warning found by the checkpatch.pl tool.
Converted printks to dev_version.
Removed unnecessary printk statements.
Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Peter Huewe [Sun, 6 Nov 2011 23:54:00 +0000 (00:54 +0100)]
staging/comedi/daqboard: Convert pci_table entries to PCI_DEVICE (if PCI_ANY_ID is used)
This patch converts pci_table entries to use the PCI_DEVICE macro,
if .subvendor and .subdevice are set to PCI_ANY_ID,
and thus improves readablity.
Since the driver_data field isn't used anywhere we can also drop the
assignments for class, class_mask and driver_data.
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Peter Huewe [Sun, 6 Nov 2011 23:54:02 +0000 (00:54 +0100)]
staging/comedi/amplc: Convert pci_table entries to PCI_DEVICE (if PCI_ANY_ID is used)
This patch converts pci_table entries to use the PCI_DEVICE macro,
if .subvendor and .subdevice are set to PCI_ANY_ID,
and thus improves readablity.
Since the driver_data field isn't used anywhere we can also drop the
assignments for class, class_mask and driver_data.
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Peter Huewe [Sun, 6 Nov 2011 23:54:01 +0000 (00:54 +0100)]
staging/comedi/adl: Convert pci_table entries to PCI_DEVICE (if PCI_ANY_ID is used)
This patch converts pci_table entries to use the PCI_DEVICE macro,
if .subvendor and .subdevice are set to PCI_ANY_ID,
and thus improves readablity.
Since the driver_data field isn't used anywhere we can also drop the
assignments for class, class_mask and driver_data.
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Peter Huewe [Sun, 6 Nov 2011 23:54:03 +0000 (00:54 +0100)]
staging/comedi/cb_pcimdda: Convert pci_table entries to PCI_DEVICE (if PCI_ANY_ID is used)
This patch converts pci_table entries to use the PCI_DEVICE macro,
if .subvendor and .subdevice are set to PCI_ANY_ID,
and thus improves readablity.
Since the driver_data field isn't used anywhere we can also drop the
assignments for class, class_mask and driver_data.
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Peter Huewe [Sun, 6 Nov 2011 23:54:04 +0000 (00:54 +0100)]
staging/comedi/das08: Convert pci_table entries to PCI_DEVICE (if PCI_ANY_ID is used)
This patch converts pci_table entries to use the PCI_DEVICE macro,
if .subvendor and .subdevice are set to PCI_ANY_ID,
and thus improves readablity.
Since the driver_data field isn't used anywhere we can also drop the
assignments for class, class_mask and driver_data.
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Peter Huewe [Sun, 6 Nov 2011 23:54:06 +0000 (00:54 +0100)]
staging/comedi/me_daq: Convert pci_table entries to PCI_DEVICE (if PCI_ANY_ID is used)
This patch converts pci_table entries to use the PCI_DEVICE macro,
if .subvendor and .subdevice are set to PCI_ANY_ID,
and thus improves readablity.
Since the driver_data field isn't used anywhere we can also drop the
assignments for class, class_mask and driver_data.
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Peter Huewe [Sun, 6 Nov 2011 23:54:07 +0000 (00:54 +0100)]
staging/comedi/contec: Convert pci_table entries to PCI_DEVICE (if PCI_ANY_ID is used)
This patch converts pci_table entries to use the PCI_DEVICE macro,
if .subvendor and .subdevice are set to PCI_ANY_ID,
and thus improves readablity.
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Peter Huewe [Sun, 6 Nov 2011 23:54:05 +0000 (00:54 +0100)]
staging/comedi/ke_counter: Convert pci_table entries to PCI_DEVICE (if PCI_ANY_ID is used)
This patch converts pci_table entries to use the PCI_DEVICE macro,
if .subvendor and .subdevice are set to PCI_ANY_ID,
and thus improves readablity.
Since the driver_data field isn't used anywhere we can also drop the
assignments for class, class_mask and driver_data.
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Peter Huewe [Sun, 6 Nov 2011 23:53:59 +0000 (00:53 +0100)]
staging/comedi/jr3: Convert pci_table entries to PCI_DEVICE (if PCI_ANY_ID is used)
This patch converts pci_table entries to use the PCI_DEVICE macro,
if .subvendor and .subdevice are set to PCI_ANY_ID,
and thus improves readablity.
Since the driver_data field isn't used anywhere we can also drop the
assignments for class, class_mask and driver_data.
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Peter Huewe [Sun, 6 Nov 2011 22:48:17 +0000 (23:48 +0100)]
staging/comedi/addi: Convert pci_table entries to PCI_DEVICE (if PCI_ANY_ID is used)
This patch converts pci_table entries to use the PCI_DEVICE macro,
if .subvendor and .subdevice are set to PCI_ANY_ID,
and thus improves readablity.
Since the driver_data field isn't used anywhere we can also drop the
assignments for class, class_mask and driver_data.
Moreover the hardcoded 0x15B8 was replaced by the more readable
PCI_VENDOR_ID_ADDIDATA
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Johannes Thumshirn [Mon, 24 Oct 2011 17:52:31 +0000 (19:52 +0200)]
staging: comedi: Unbreak output of printk()s in pcmmio
Unbreak the output of some printk()s I broke.
Signed-off-by: Johannes Thumshirn <morbidrsa@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Christopher Brannon [Tue, 22 Nov 2011 19:46:23 +0000 (13:46 -0600)]
Staging: speakup: Don't try to access an unallocated struct.
In speakup_init, we have the following:
if (quiet_boot)
spk_shut_up |= 0x01;
And in spk_types.h:
This patch moves the statement in speakup_init so that
speakup_console[vc->vc_num] is guaranteed to be allocated when it
executes.
Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Bernhard Heinloth [Wed, 23 Nov 2011 15:39:53 +0000 (16:39 +0100)]
Staging: zcache: Fix calls to obsolete function
Function "strict_strtol" replaced by "kstrtol" as suggested by the checkpatch script
Signed-off-by: Bernhard Heinloth <bernhard@heinloth.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Ken O'Brien [Sun, 20 Nov 2011 00:36:11 +0000 (00:36 +0000)]
Staging: frontier: Removed use of obsolete function
Replaced one reference to strict_strtoul() to kstrtoul().
Signed-off-by: Ken O'Brien <kernel@kenobrien.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Ken O'Brien [Sat, 19 Nov 2011 01:18:12 +0000 (01:18 +0000)]
Staging: asus_oled: Fixed use of obsolete function.
Removed use of obsolete function "strict_strtoul". Replaced with "kstrtoul"
as suggested by checkpatch.pl
Signed-off-by: Ken O'Brien <kernel@kenobrien.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Omar Ramirez Luna [Fri, 18 Nov 2011 22:18:54 +0000 (16:18 -0600)]
staging: tidspbridge: request dmtimer clocks on init
Given that dm timer framework doesn't support request of clocks
by soft | hard irqs because some recent changes, tidspbridge needs
to request its clocks on init and enable/disable them on demand.
This was first seen on 3.2-rc1.
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Omar Ramirez Luna [Tue, 15 Nov 2011 02:16:57 +0000 (20:16 -0600)]
staging: tidspbridge: include module.h by default
Fixes compilation break when compiled as part of the kernel:
drivers/staging/tidspbridge/rmgr/drv_interface.c:134: error: expected declaration specifiers or '...' before string constant
drivers/staging/tidspbridge/rmgr/drv_interface.c:134: warning: data definition has no type or storage class
drivers/staging/tidspbridge/rmgr/drv_interface.c:134: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
drivers/staging/tidspbridge/rmgr/drv_interface.c:134: warning: function declaration isn't a prototype
drivers/staging/tidspbridge/rmgr/drv_interface.c:135: error: expected declaration specifiers or '...' before string constant
drivers/staging/tidspbridge/rmgr/drv_interface.c:135: warning: data definition has no type or storage class
drivers/staging/tidspbridge/rmgr/drv_interface.c:135: warning: type defaults to 'int' in declaration of 'MODULE_LICENSE'
drivers/staging/tidspbridge/rmgr/drv_interface.c:135: warning: function declaration isn't a prototype
drivers/staging/tidspbridge/rmgr/drv_interface.c:136: error: expected declaration specifiers or '...' before string constant
drivers/staging/tidspbridge/rmgr/drv_interface.c:136: warning: data definition has no type or storage class
drivers/staging/tidspbridge/rmgr/drv_interface.c:136: warning: type defaults to 'int' in declaration of 'MODULE_VERSION'
drivers/staging/tidspbridge/rmgr/drv_interface.c:136: warning: function declaration isn't a prototype
drivers/staging/tidspbridge/rmgr/drv_interface.c: In function 'omap34_xx_bridge_probe':
drivers/staging/tidspbridge/rmgr/drv_interface.c:359: error: 'THIS_MODULE' undeclared (first use in this function)
drivers/staging/tidspbridge/rmgr/drv_interface.c:359: error: (Each undeclared identifier is reported only once
drivers/staging/tidspbridge/rmgr/drv_interface.c:359: error: for each function it appears in.)
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Thomas Meyer [Sat, 12 Nov 2011 12:11:18 +0000 (13:11 +0100)]
Staging: speakup: Use kmemdup rather than duplicating its implementation
Use kmemdup rather than duplicating its implementation
The semantic patch that makes this change is available
in scripts/coccinelle/api/memdup.cocci.
Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alexander Beregalov [Sun, 20 Nov 2011 18:05:18 +0000 (22:05 +0400)]
Staging: cxt1e1: remove rcs keywords and log
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alexander Beregalov [Sun, 20 Nov 2011 18:05:17 +0000 (22:05 +0400)]
Staging: cxt1e1: remove ifdef __cplusplus
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alexander Beregalov [Sun, 20 Nov 2011 18:05:16 +0000 (22:05 +0400)]
Staging: cxt1e1: remove unnecessary includes
Remove *BSD, SunOS and userspace includes.
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Sat, 12 Nov 2011 22:09:26 +0000 (00:09 +0200)]
staging: xgifb: delete vb_ext.{c,h}
Delete empty files.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Sat, 12 Nov 2011 22:09:25 +0000 (00:09 +0200)]
staging: xgifb: move XGINew_SenseLCD() to vb_init.c
The function is used only in vb_init.c, so move it there and make
it static.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Sat, 12 Nov 2011 22:09:24 +0000 (00:09 +0200)]
staging: xgifb: rename XGINew_GetLCDDDCInfo() to XGINew_SenseLCD()
Eliminate an unnecessary wrapper function.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Sat, 12 Nov 2011 22:09:23 +0000 (00:09 +0200)]
staging: xgifb: delete XGI_GetSenseStatus()
Delete unused function XGI_GetSenseStatus().
Static functions XGINew_Is301B(), XGINew_Sense(), XGINew_GetPanelID(),
XGINew_BridgeIsEnable() and XGINew_SenseHiTV() can be deleted as well,
since they are not used anymore.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Peter Huewe [Sun, 6 Nov 2011 22:45:33 +0000 (23:45 +0100)]
staging/xgifb: Convert pci_table entries to PCI_DEVICE (if PCI_ANY_ID is used)
This patch converts pci_table entries to use the PCI_DEVICE macro,
if .subvendor and .subdevice are set to PCI_ANY_ID,
and thus improves readability.
v2:
Since the driver_data field isn't used anywhere we can also drop the
assignments for class, class_mask and driver_data.
(found by Aaro Koskinen)
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Rob Clark [Sat, 12 Nov 2011 18:09:40 +0000 (12:09 -0600)]
staging: add omapdrm DRM/KMS driver for TI OMAP platforms
A DRM display driver for TI OMAP platform. Similar to omapfb (fbdev)
and omap_vout (v4l2 display) drivers in the past, this driver uses the
DSS2 driver to access the display hardware, including support for
HDMI, DVI, and various types of LCD panels. And it implements GEM
support for buffer allocation (for KMS as well as offscreen buffers
used by the xf86-video-omap userspace xorg driver).
The driver maps CRTCs to overlays, encoders to overlay-managers, and
connectors to dssdev's. Note that this arrangement might change slightly
when support for drm_plane overlays is added.
For GEM support, non-scanout buffers are using the shmem backed pages
provided by GEM core (In drm_gem_object_init()). In the case of scanout
buffers, which need to be physically contiguous, those are allocated
with CMA and use drm_gem_private_object_init().
See userspace xorg driver:
git://github.com/robclark/xf86-video-omap.git
Refer to this link for CMA (Continuous Memory Allocator):
http://lkml.org/lkml/2011/8/19/302
Links to previous versions of the patch:
v1: http://lwn.net/Articles/458137/
v2: http://patches.linaro.org/4156/
v3: http://patches.linaro.org/4688/
v4: http://patches.linaro.org/4791/
History:
v5: move headers from include/drm at Greg KH's request, minor rebasing
on 3.2-rc1, pull in private copies of drm_gem_{get,put}_pages()
because "drm/gem: add functions to get/put pages" patch is not
merged yet
v4: bit of rework of encoder/connector _dpms() code, modeset_init()
rework to not use nested functions, update TODO.txt
v3: minor cleanups, improved error handling for dev_load(), some minor
API changes that will be needed later for tiled buffer support
v2: replace omap_vram with CMA for scanout buffer allocation, remove
unneeded functions, use dma_addr_t for physical addresses, error
handling cleanup, refactor attach/detach pages into common drm
functions, split non-userspace-facing API into omap_priv.h, remove
plugin API
v1: original
Signed-off-by: Rob Clark <rob@ti.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Sun, 27 Nov 2011 01:28:56 +0000 (17:28 -0800)]
Staging: delete spectra driver
To quote Alan:
Moorestown/Oaktrail has appeared only in the PC like form so the
following bits of staging can be binned:
drivers/staging/spectra
so let's delete it.
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Martyn Welch [Tue, 8 Nov 2011 09:54:25 +0000 (09:54 +0000)]
Driver for GE PIO2 VME Card
This patch implements a driver for the GE PIO2 VME Parallel I/O Card. This
card is a 6U VME Card, implementing 32 solid-state relay switched IO lines,
in 4 groups of 8. Each bank of IO lines is built to function as input,
output or both depending on the variant of the card.
Signed-off-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Manohar Vanga [Fri, 4 Nov 2011 10:12:31 +0000 (11:12 +0100)]
staging: vme: fix comment for struct vme_dev
Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch>
Acked-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Manohar Vanga [Fri, 4 Nov 2011 10:12:30 +0000 (11:12 +0100)]
staging: vme: remove vme_add_bus() and vme_remove_bus()
The functions vme_add_bus() and vme_remove_bus() were only being used
in the vme_register_bridge() and vme_unregister_bridge() functions
respectively. This patch gets rid of them and moves their code to
vme_register_bridge() and vme_unregister_bridge().
Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch>
Acked-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Manohar Vanga [Fri, 4 Nov 2011 10:12:29 +0000 (11:12 +0100)]
staging: vme: fix comment in __vme_register_driver()
Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch>
Acked-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Martyn Welch [Thu, 3 Nov 2011 10:57:26 +0000 (10:57 +0000)]
Staging: VME: Update TODO file
Contents of TODO file has become more of a feature wish-list rather than issues
which should stop the VME driver being merged into the mainline kernel.
Update the TODO list with issues that need to be resolved before it can be
migrated to mainline.
Signed-off-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Manohar Vanga [Wed, 2 Nov 2011 15:50:39 +0000 (16:50 +0100)]
staging: vme: fix address cast warnings for 64 bit architectures
Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Dan Carpenter [Sat, 29 Oct 2011 07:20:20 +0000 (10:20 +0300)]
Staging: sep: potential buffer overflow in ioctl
tail_size is determined by several variables that come from the user
so we should verify that it's not too large.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Thomas Meyer [Tue, 8 Nov 2011 19:30:20 +0000 (20:30 +0100)]
staging: rtl8192e: Use kmemdup rather than duplicating its implementation
Use kmemdup rather than duplicating its implementation
The semantic patch that makes this change is available
in scripts/coccinelle/api/memdup.cocci.
More information about semantic patching is available at
http://coccinelle.lip6.fr/
Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Thomas Meyer [Tue, 8 Nov 2011 19:37:03 +0000 (20:37 +0100)]
staging: rtl8192e: Use kmemdup rather than duplicating its implementation
Use kmemdup rather than duplicating its implementation
The semantic patch that makes this change is available
in scripts/coccinelle/api/memdup.cocci.
More information about semantic patching is available at
http://coccinelle.lip6.fr/
Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Thomas Meyer [Thu, 10 Nov 2011 18:04:19 +0000 (19:04 +0100)]
staging: rtl8192e: Use kzalloc rather than kmalloc v2
Use kzalloc rather than kmalloc followed by memset with 0
This considers some simple cases that are common and easy to validate
Note in particular that there are no ...s in the rule, so all of the
matched code has to be contiguous
The semantic patch that makes this change is available
in scripts/coccinelle/api/alloc/kzalloc-simple.cocci.
Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Stefan Lippers-Hollmann [Tue, 15 Nov 2011 10:27:30 +0000 (11:27 +0100)]
rtl8192e: drop alternate code paths for CONFIG_PM_RTL
It has always been enabled unconditionally by ccflags-y.
Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Stefan Lippers-Hollmann [Tue, 15 Nov 2011 10:26:10 +0000 (11:26 +0100)]
rtl8192e: use HAVE_NET_DEVICE_OPS unconditionally
Mainline provides NET_DEVICE_OPS, remove alternate code paths and now
obsolete defines from ccflags-y.
Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Stefan Lippers-Hollmann [Tue, 15 Nov 2011 10:24:49 +0000 (11:24 +0100)]
rtl8192e: remove stale defines from ccflags-y
Code paths using these defines have been removed long time ago,
now remove stale references from injected ccflags-y.
Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jesper Juhl [Sun, 6 Nov 2011 23:21:26 +0000 (00:21 +0100)]
rtl8192e: Don't copy huge struct by value (and make it const).
rtllib_is_shortslot() takes one argument - a struct that's more than a
kilobyte large. It should take a pointer instead of copying such a
huge struct - and the argument might as well be declared 'const' now
that we are at it, since it is not modified. This patch makes these
changes.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Julia Lawall [Fri, 28 Oct 2011 23:58:13 +0000 (01:58 +0200)]
drivers/staging/rtl8712/rtl871x_mlme.c: eliminate a null pointer dereference
If ibss_wlan is NULL, it is not correct to memcpy into its field.
The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@r@
expression E, E1;
identifier f;
statement S1,S2,S3;
@@
if (E == NULL)
{
... when != if (E == NULL || ...) S1 else S2
when != E = E1
*E->f
... when any
return ...;
}
else S3
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Marc Dietrich [Tue, 1 Nov 2011 20:37:04 +0000 (21:37 +0100)]
staging: nvec: add device tree support
This adds device tree support to the nvec driver. By using this method
it is no longer necessary to specify platform data through a board
file.
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Acked-by: Stephen Warren <swarren@nvidia.com>
Cc: Julian Andres Klode <jak@jak-linux.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Kevin McKinney [Wed, 23 Nov 2011 01:25:57 +0000 (20:25 -0500)]
Staging: bcm: Fix semaphore locking error when downloading firmware.
This patch releases semaphore locks when
an error occurrs while attempting to
download firmware for the bcm driver.
When downloading firmware for this driver,
a process is expected to call
the following ioctl's in this order:
(1)IOCTL_BCM_BUFFER_DOWNLOAD_START,
(2)IOCTL_BCM_BUFFER_DOWNLOAD, and (3)
IOCTL_BCM_BUFFER_DOWNLOAD_STOP.
Semaphore, “Adapter->fw_download_sema” is
expected to be acquired in the first ioctl,
IOCTL_BCM_BUFFER_DOWNLOAD_START, and it should
block until IOCTL_BCM_BUFFER_DOWNLOAD_STOP
is called. In this case, if an error
occurred before STOP finished, the semaphore
"Adapter->fw_download_sema" was not being released.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Kevin McKinney [Wed, 23 Nov 2011 01:25:56 +0000 (20:25 -0500)]
Staging: bcm: Fix semaphore locking bug in, IOCTL_BCM_BUFFER_DOWNLOAD
In this ioctl, we are testing to see if the lock is held.
If it is not held, that means this ioctl used incorrectly.
Therefore, we do not want to take the lock ourselves here.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Kevin McKinney [Wed, 23 Nov 2011 01:25:55 +0000 (20:25 -0500)]
Staging: bcm: Remove unnecessary "do while" statement in, IOCTL_BCM_BUFFER_DOWNLOAD
This patch removes a superfluous "do while"
statement in IOCTL_BCM_BUFFER_DOWNLOAD.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Kevin McKinney [Wed, 9 Nov 2011 03:33:35 +0000 (22:33 -0500)]
Staging: bcm: Clean up code in ioctl: IOCTL_BCM_EEPROM_REGISTER_READ
This patch verifies two conditions before executing
a kmalloc call. First, it checks to see that
IoBuffer.OutputLength is not greater than an
unsigned short. If so, an invalid value may be
returned. The second change is a check to make
sure IoBuffer.OutputLength is not equal to
zero. Which simply keeps this code inline with
the other ioctl, IOCTL_BCM_REGISTER_READ_PRIVATE.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Kevin McKinney [Sun, 6 Nov 2011 14:40:11 +0000 (09:40 -0500)]
Staging: bcm: Fix information leak in ioctl: IOCTL_BCM_REGISTER_READ_PRIVATE, IOCTL_BCM_EEPROM_REGISTER_READ
This patch fixes an information leak in ioctl
IOCTL_BCM_REGISTER_READ_PRIVATE and
IOCTL_BCM_EEPROM_REGISTER_READ when determining
the number of bytes to copy to user space. Function,
usb_control_msg, returns the correct number of
bytes from the hardware. Instead of using
this value, we were using a value derived from
user space. In this case, this value could be more
than the hardware allocated. Therefore, this
patch copies the proper number of bytes from
the hardware, and uses this value as the maximum
number of bytes for user space.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diego F. Marfil [Thu, 3 Nov 2011 15:25:37 +0000 (12:25 -0300)]
Staging: bcm: hostmibs: Added temporary variable to shorten lines
Signed-off-by: Diego F. Marfil <diegomarfil@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diego F. Marfil [Thu, 3 Nov 2011 15:25:36 +0000 (12:25 -0300)]
Staging: bcm: hostmibs: White spaces and indentation fixes.
Signed-off-by: Diego F. Marfil <diegomarfil@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diego F. Marfil [Thu, 3 Nov 2011 15:25:35 +0000 (12:25 -0300)]
Staging: bcm: hostmibs: C99 comments replaced
Signed-off-by: Diego F. Marfil <diegomarfil@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Thomas Meyer [Sat, 12 Nov 2011 12:21:49 +0000 (13:21 +0100)]
staging: hv: Use kmemdup rather than duplicating its implementation
Use kmemdup rather than duplicating its implementation
The semantic patch that makes this change is available
in scripts/coccinelle/api/memdup.cocci.
Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Tue, 8 Nov 2011 17:01:50 +0000 (09:01 -0800)]
Staging: hv: storvsc: Support hot-removing of scsi devices
Support hot-removing of scsi devices.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Tue, 8 Nov 2011 17:01:49 +0000 (09:01 -0800)]
Staging: hv: storvsc: Support hot add of scsi disks
Support hot add of scsi disks.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Tue, 8 Nov 2011 17:01:48 +0000 (09:01 -0800)]
Staging: hv: storvsc: Upgrade the vmstor protocol version
In preparation for supporting hot add/remove of scsi devices,
upgrade the vmstor protocol version.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Tue, 8 Nov 2011 17:01:47 +0000 (09:01 -0800)]
Staging: hv: storvsc: Get rid of an unnecessary forward declaration
Get rid of an unnecessary forward declaration.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Tue, 8 Nov 2011 17:01:46 +0000 (09:01 -0800)]
Staging: hv: storvsc: use the macro KBUILD_MODNAME
Use the macro KBUILD_MODNAME.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Tue, 8 Nov 2011 17:01:45 +0000 (09:01 -0800)]
Staging: hv: storvsc: Use the unlocked version queuecommand
Use the unlocked version queuecommand.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Tue, 8 Nov 2011 17:01:44 +0000 (09:01 -0800)]
Staging: hv: storvsc: Use the accessor function shost_priv()
Use the accessor function shost_priv().
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Tue, 8 Nov 2011 17:01:43 +0000 (09:01 -0800)]
Staging: hv: storvsc: Fix error handling storvsc_host_reset()
Fix error handling storvsc_host_reset(). I would like to thank
Long Li <longli@microsoft.com> for reporting this.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Reported-by: Long Li <longli@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Tue, 8 Nov 2011 17:01:42 +0000 (09:01 -0800)]
Staging: hv: storvsc: Fixup the error when processing SET_WINDOW command
Fixup the error when processing SET_WINDOW command.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Tue, 8 Nov 2011 17:01:41 +0000 (09:01 -0800)]
Staging: hv: storvsc: Cleanup error handling in the probe function
Cleanup error handling in the probe function.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Tue, 8 Nov 2011 17:01:40 +0000 (09:01 -0800)]
Staging: hv: storvsc: Use mempools to allocate struct storvsc_cmd_request
We intend to use the storage driver to manage the root device.
To avoid deadlocks, use mempools to allocate struct storvsc_cmd_request.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Fri, 28 Oct 2011 22:11:28 +0000 (15:11 -0700)]
Staging: hv: mousevsc: Use the KBUILD_MODNAME macro
Use the KBUILD_MODNAME macro.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Fri, 28 Oct 2011 22:11:27 +0000 (15:11 -0700)]
Staging: hv: mousevsc: Add a check to prevent memory corruption
Add a check to prevent memory corruption.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Fri, 28 Oct 2011 22:11:26 +0000 (15:11 -0700)]
Staging: hv: mousevsc: Address some style issues
Deal with some style related issues. Also get rid of an unused macro.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Wed, 26 Oct 2011 00:19:52 +0000 (17:19 -0700)]
Staging: hv: mousevsc: Get rid of unnecessary include files
Get rid of unnecessary include files.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Wed, 26 Oct 2011 00:19:51 +0000 (17:19 -0700)]
Staging: hv: mousevsc: Add a new line to a debug string
Add a new line to a debug string.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Wed, 26 Oct 2011 00:19:50 +0000 (17:19 -0700)]
Staging: hv: mousevsc: Cleanup mousevsc_on_channel_callback()
Cleanup mousevsc_on_channel_callback(). This is based on the code provided
by Joe Perches <joe@perches.com>.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Wed, 26 Oct 2011 00:19:49 +0000 (17:19 -0700)]
Staging: hv: mousevsc: Inline the code for reportdesc_callback()
Inline the code for reportdesc_callback() as this function is called from
mousevsc_probe(). As part of this, cleanup the code in reportdesc_callback().
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Wed, 26 Oct 2011 00:19:48 +0000 (17:19 -0700)]
Staging: hv: mousevsc: Inline the code for mousevsc_on_device_add()
Inline the code for mousevsc_on_device_add() as this only used from
the function mousevsc_probe().
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Wed, 26 Oct 2011 00:19:47 +0000 (17:19 -0700)]
Staging: hv: mousevsc: Make boolean states boolean
Make some state that is boolean in nature, a boolean variable.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Dan Carpenter [Tue, 22 Nov 2011 07:39:15 +0000 (10:39 +0300)]
Staging: iio: fix endian conversion in ad7298_scan_direct()
"tmp" is used to store the output from cpu_to_be16() so it should be
a __be16 bit type.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sasha Levin [Tue, 22 Nov 2011 06:02:21 +0000 (08:02 +0200)]
iio: Don't OOPS if dummy evgen failed init
If the dummy evgen failed init, the irq allocation functions which assume
init succeeded may still be called - causing an OOPS due to wrong assumption.
Here's the oops:
[ 3.914332] BUG: unable to handle kernel NULL pointer dereference at
0000000000000148
[ 3.915310] IP: [<
ffffffff810b3008>] __lock_acquire+0xac/0xe50
[ 3.915310] PGD 0
[ 3.915310] Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
[ 3.915310] CPU 1
[ 3.915310] Pid: 1, comm: swapper Not tainted 3.2.0-rc2-sasha-00279-gd7bfb12-dirty #20
[ 3.915310] RIP: 0010:[<
ffffffff810b3008>] [<
ffffffff810b3008>] __lock_acquire+0xac/0xe50
[ 3.915310] RSP: 0018:
ffff880012499bc0 EFLAGS:
00010046
[ 3.915310] RAX:
0000000000000086 RBX:
ffff880012490000 RCX:
0000000000000000
[ 3.915310] RDX:
0000000000000000 RSI:
0000000000000000 RDI:
0000000000000148
[ 3.915310] RBP:
ffff880012499c90 R08:
0000000000000002 R09:
0000000000000000
[ 3.915310] R10:
0000000000000148 R11:
0000000000000000 R12:
0000000000000148
[ 3.915310] R13:
0000000000000002 R14:
0000000000000000 R15:
0000000000000000
[ 3.915310] FS:
0000000000000000(0000) GS:
ffff880013c00000(0000) knlGS:
0000000000000000
[ 3.915310] CS: 0010 DS: 0000 ES: 0000 CR0:
000000008005003b
[ 3.915310] CR2:
0000000000000148 CR3:
0000000002605000 CR4:
00000000000406e0
[ 3.915310] DR0:
0000000000000000 DR1:
0000000000000000 DR2:
0000000000000000
[ 3.915310] DR3:
0000000000000000 DR6:
00000000ffff0ff0 DR7:
0000000000000400
[ 3.915310] Process swapper (pid: 1, threadinfo
ffff880012498000, task
ffff880012490000)
[ 3.915310] Stack:
[ 3.915310]
ffff880012490000 ffffffff81e6fd38 ffffffff00000000 0000000000000000
[ 3.915310]
0000000000000148 0000000012499c08 ffffffff00000000 000000000000002e
[ 3.915310]
0000000000000001 ffff880012499ce0 ffffffff8161620e 0000000000000000
[ 3.915310] Call Trace:
[ 3.915310] [<
ffffffff81e6fd38>] ? retint_restore_args+0x13/0x13
[ 3.915310] [<
ffffffff8161620e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
[ 3.915310] [<
ffffffff81e6fd38>] ? retint_restore_args+0x13/0x13
[ 3.915310] [<
ffffffff81af8883>] ? iio_dummy_evgen_get_irq+0x33/0x8a
[ 3.915310] [<
ffffffff810b4255>] lock_acquire+0x8a/0xa7
[ 3.915310] [<
ffffffff81af8883>] ? iio_dummy_evgen_get_irq+0x33/0x8a
[ 3.915310] [<
ffffffff81e6db81>] __mutex_lock_common+0x63/0x491
[ 3.915310] [<
ffffffff81af8883>] ? iio_dummy_evgen_get_irq+0x33/0x8a
[ 3.915310] [<
ffffffff810b474d>] ? debug_check_no_locks_freed+0x135/0x14a
[ 3.915310] [<
ffffffff810b2c3a>] ? lock_is_held+0x92/0x9d
[ 3.915310] [<
ffffffff81e6dfe5>] mutex_lock_nested+0x36/0x3b
[ 3.915310] [<
ffffffff81af8883>] iio_dummy_evgen_get_irq+0x33/0x8a
[ 3.915310] [<
ffffffff81af8594>] iio_simple_dummy_events_register+0x1b/0x69
[ 3.915310] [<
ffffffff82ad4a91>] iio_dummy_init+0x105/0x18d
[ 3.915310] [<
ffffffff82ad498c>] ? iio_init+0x7d/0x7d
[ 3.915310] [<
ffffffff82a8dc02>] do_one_initcall+0x7a/0x135
[ 3.915310] [<
ffffffff82a8dda7>] kernel_init+0xea/0x16f
[ 3.915310] [<
ffffffff81e727c4>] kernel_thread_helper+0x4/0x10
[ 3.915310] [<
ffffffff81e6fd38>] ? retint_restore_args+0x13/0x13
[ 3.915310] [<
ffffffff82a8dcbd>] ? do_one_initcall+0x135/0x135
[ 3.915310] [<
ffffffff81e727c0>] ? gs_change+0x13/0x13
[ 3.915310] Code: 95 50 ff ff ff 74 24 e8 1f 3f 56 00 85 c0 0f 84 4e 0d 00 00 be cf 0b 00 00 83 3d 63 7c 58 02 00 0f 85 3c 0d 00 00 e9 c1 0c 00 00
[ 3.915310] 81 3a a0 17 ca 82 b8 01 00 00 00 44 0f 44 e8 83 fe 01 77 0c
[ 3.915310] RIP [<
ffffffff810b3008>] __lock_acquire+0xac/0xe50
[ 3.915310] RSP <
ffff880012499bc0>
[ 3.915310] CR2:
0000000000000148
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Lars-Peter Clausen [Wed, 16 Nov 2011 07:53:31 +0000 (08:53 +0100)]
staging:iio: Add missing MODULE_DEVICE_TABLE and MODULE_ALIAS
Quite a few iio drivers provide no MODULE_DEVICE_TABLE or MODULE_ALIAS or only
provide a MODULE_ALIAS while they have support for multiple device ids. This
prevents auto module loading from working correctly.
This patch fixes it by adding the missing MODULE_DEVICE_TABLEs and
MODULE_ALIAS'.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Lars-Peter Clausen [Tue, 15 Nov 2011 15:31:24 +0000 (16:31 +0100)]
staging:iio:dac:ad5624r: Convert to channel spec
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Lars-Peter Clausen [Tue, 15 Nov 2011 15:31:23 +0000 (16:31 +0100)]
staging:iio:dac:ad5504: Convert to channel spec
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Lars-Peter Clausen [Tue, 15 Nov 2011 15:31:22 +0000 (16:31 +0100)]
staging:iio:dac:ad5446: Convert to channel spec
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Paul Bolle [Sun, 13 Nov 2011 13:05:45 +0000 (14:05 +0100)]
staging: iio: drop "select IIO_SIMPLE_DUMMY_EVGEN"
Commit
e6477000fc ("staging:iio:dummy Add event support + fake event
generator") added "select IIO_SIMPLE_DUMMY_EVGEN if [...]". But there
is no Kconfig symbol named IIO_SIMPLE_DUMMY_EVGEN. The select statement
for that symbol is a nop. Drop it.
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Acked-by: Jonathan Cameron <jic23@camd.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Lars-Peter Clausen [Tue, 15 Nov 2011 15:34:50 +0000 (16:34 +0100)]
staging:iio:dac:ad5446: Add support for the AD5662
The AD5662 is compatible to the AD5660, but uses an external reference instead
of an internal.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Lars-Peter Clausen [Wed, 2 Nov 2011 08:40:02 +0000 (09:40 +0100)]
staging:iio:dac: Add AD5421 driver
This patch adds support for the Analog Devices AD5421 Loop-Powered, 4mA to 20mA
DAC.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Lars-Peter Clausen [Wed, 2 Nov 2011 08:40:01 +0000 (09:40 +0100)]
staging:iio: IIO_EVENT_CODE: Clamp channel numbers
Make sure we only use the allotted space for channel numbers in the event mask
and do not let them override other fields.
Since negative values are valid channel number, cast the channel number to
signed when extracting it from an event mask.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Lars-Peter Clausen [Wed, 2 Nov 2011 08:40:00 +0000 (09:40 +0100)]
staging:iio: Make write_event_value callback optional
Some devices have fixed thresholds which can not be modified so make the
write_event_value callback optional, so the drivers for these devices do not
have to implement a boilerplate no-op callback.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Dan Carpenter [Sat, 29 Oct 2011 07:21:06 +0000 (10:21 +0300)]
Staging: iio/dac/ad5360.c: signedness bug in ad5360_read_raw()
ad5360_get_channel_vref() returns an int and scale_uv should be the
same. Making it unsigned here breaks the error handling.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Dan Carpenter [Sat, 29 Oct 2011 07:20:42 +0000 (10:20 +0300)]
Staging: iio/dac/ad5064.c: signedness bug in ad5064_read_raw()
regulator_get_voltage() returns an int so "scale_uv" should be an
int. Making it unsigned here breaks the error handling.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Wed, 26 Oct 2011 16:41:36 +0000 (17:41 +0100)]
staging:iio:treewide only use shared to decide on interfaces
Internally the fact that say scale is shared across channels is
actually of remarkably little interest. Hence lets not store it.
Numerous devices have weird combinations of channels sharing
scale anyway so it is not as though this was really telling
us much. Note however that we do still use the shared sysfs
attrs thus massively reducing the number of attrs in complex
drivers.
Side effect is that certain drivers that were abusing this
(mostly my work) needed to do a few more checks on what the
channel they are being queried on actually is.
This is also helpful for in kernel interfaces where we
just want to query the scale and don't care whether it
is shared with other channels or not.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Lars-Peter Clausen [Wed, 26 Oct 2011 16:41:35 +0000 (17:41 +0100)]
staging:iio: Do not use bitmasks for channel info addresses
Currently the iio framework uses bitmasks for the address field of channel info
attributes. This is for historical reasons and no longer required since it will
only ever query a single info attribute at once. This patch changes the code to
use the non-shifted iio_chan_info_enum values for the info attribute address.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Lars-Peter Clausen [Wed, 26 Oct 2011 16:41:34 +0000 (17:41 +0100)]
staging:iio: Add documentation for IIO_EVENT_CODE
Document the different parameters of the IIO_EVENT_CODE macro and friends.
While we are at it standardise the name of channel type parameter.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Lars-Peter Clausen [Wed, 26 Oct 2011 16:41:33 +0000 (17:41 +0100)]
staging:iio: Use userspace types for iio_event_data
Since we want to export struct iio_event_data to userspace use the userspace
integer types. Also add a include to linux/types.h.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Wed, 26 Oct 2011 16:41:32 +0000 (17:41 +0100)]
staging:iio: header reorganization
Issue brought up by Lars-Peter Clausen. This is a varient of what
he suggested.
io/iio.h for driver stuff (has to include types.h)
Sub files for the bits drivers may or may not use
iio/sysfs.h
iio/buffer.h (contents of current buffer_generic.h)
(obviously anything offering events will need events.h as well)
iio/types.h for the enums that matter to both
iio_chan_type, iio_modifier
iio/events.h for the event code stuff
IIO_EVENT_CODE and friends. + everything in chrdev.h So this
is the stuff that userspace cares about.
Also include iio_event_type, iio_event_direction
Thus iio drivers include iio.h + as required
events.h
sysfs.h
buffer.h
in kernel users (once that interface is merged) will need inkern.h
which will pull in types.h
Userspace will need just events.h (which pulls in types.h) to get
everything they need to know about. Buffer userspace access doesn't
currently need any core defines. All information about the data
format is passed through sysfs.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Sun, 27 Nov 2011 00:31:16 +0000 (16:31 -0800)]
Subject: fix build breakage in drivers/staging/iio/industrialio-core.c
This was introduced in commit
b46413367961c2e8bd827e067a231be982aaeee2
(iio: fix a leak due to improper use of anon_inode_getfd())
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Wed, 26 Oct 2011 16:27:45 +0000 (17:27 +0100)]
staging:iio: core. Allow for event chrdev obtaining ioctl if no buffer present.
Logic bug meant the chrdev would fail to open if there was no buffer support
in a driver or in the core. This meant the ioctl to get the event chrdev
would fail and hence events were not available.
V2: change error to -EINVAL to mark as unsuitable for reading rather than
not there. Both are true depending on how you look at it.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>