Nitin Gupta [Thu, 28 Jan 2010 15:43:40 +0000 (21:13 +0530)]
Staging: ramzswap: Return proper error code on device create failure
Currently, we return 0 if create_device() fails and 1 otherwise.
Now, proper error code is returned from create_device() and the
same is propagated as module error code from ramzswap_init().
Also added some cleanups for ramzswap_init(), improving function
structure.
Nitin Gupta [Thu, 28 Jan 2010 15:43:39 +0000 (21:13 +0530)]
Staging: ramzswap: Set block size to PAGE_SIZE
ramzswap block size needs to be set equal to PAGE_SIZE to
avoid receiving any unaligned block I/O requests (happens
due to readahead logic during swapon). These unaligned
accesses produce unnecessary I/O errors, scaring users.
Nitin Gupta [Thu, 28 Jan 2010 15:43:37 +0000 (21:13 +0530)]
Staging: ramzswap: Use lock for 64-bit stats
64-bit stats corruption was observed when ramzswap was
used on SMP systems. To prevent this, use separate spinlock
to protect these stats.
Also, replace stat_*() with rzs_stat*() to avoid possible
conflict with core kernel code.
Eventually, these will be converted to per-cpu counters
if this driver finds use on large scale systems and this
locking is found to affect scalability.
Dan Carpenter [Mon, 18 Jan 2010 11:23:20 +0000 (14:23 +0300)]
Staging: rtl8187se: fix if statement
I removed a misplace semicolon. It is clear from the indentation that
TxPwrTracking87SE() was only supposed to be called if CheckTxPwrTracking()
returned true.
Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Ben Hutchings [Mon, 18 Jan 2010 03:25:56 +0000 (03:25 +0000)]
Staging: rt{2860,2870}sta: Use request_firmware() to load firmware
When originally introduced into staging, these drivers had custom
firmware-loading code which checked a version number and CRC at the
end of each blob. This reintroduces those checks, using crc-ccitt
instead of custom code.
The removed firmware will be added to the linux-firmware.git
repository.
Based on work by Darren Salt <linux@youmustbejoking.demon.co.uk>.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Tested-By: Darren Salt <linux@youmustbejoking.demon.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Ian Abbott [Wed, 20 Jan 2010 13:04:50 +0000 (13:04 +0000)]
Staging: comedi: pcl816: Check channel list in AI command test
Check the channel list is valid in step 5 of the AI command test.
Split function check_and_setup_channel_list() in two. Also, remove
unnecessary chanlist_len tests in step 3 of the AI command test as the
comedi core has already checked it.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Ian Abbott [Wed, 20 Jan 2010 13:04:47 +0000 (13:04 +0000)]
Staging: comedi: adv_pci1710: Correct AI scan count and channel checks
For AI commands, the internal channel list used to check incoming
data was only set up partially if the channel list contained
repeats. Set it up fully. Also the current scan position was not
updated properly when moving a block of data from the FIFO unless
a whole number of scans was moved.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Ian Abbott [Wed, 20 Jan 2010 13:04:46 +0000 (13:04 +0000)]
Staging: comedi: pcl818: Correct AI scan counting and channel checks
For AI commands, the scan counter should be updated after every
scan. It was being updated after every sample except for DMA mode
where it was being updated after every repeated segment of the
channel list.
Also AI commands with multiple channels were being terminated with
an error prematurely except in DMA mode. This was because the
driver was comparing channel numbers received from the hardware
(combined with the sample value) with the expected channel numbers
to check for a "channel dropout". This test was failing
incorrectly because the driver was not keeping the current position
within the (repeated segment of the) channel list up to date.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Ian Abbott [Wed, 20 Jan 2010 13:04:45 +0000 (13:04 +0000)]
Staging: comedi: pcl816: Correct AI scan counting
For AI commands, the scan counter should be updated after every
scan. In DMA mode, it was being updated after every repeated
segment of the channel list. In non-DMA mode, it was being updated
after every sample.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Wu Zhangjin [Wed, 6 Jan 2010 08:33:10 +0000 (16:33 +0800)]
staging: sm7xx: remove the buggy 2D acceleration support
When scrolling the screen on the console with the 2D acceleration
support, the whole system may hang. for example, when copying some files
from another machine to YeeLoong netbook with the sm7xx video driver via
scp and when the screen output is enabled, the system may hang.
Before the bug is fixed, remove the 2D acceleration!
Andy Shevchenko [Thu, 14 Jan 2010 13:07:23 +0000 (15:07 +0200)]
staging: wlags49: don't use custom implementation of atoi()
Kernel has its own method called simple_strtoul() to do such things.
Here we are using simple_strtoul(value, NULL, 0) because in original function
the recognized base is 10 or 16 and input data is assumed to be unsigned.
Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
staging: iio: Fix incorrect existence check for a shared event pointer.
A second smatch detected error. First part fixes in a typo
in the comment directly above that I noticed whilst trying
to remember what this code actually does. Second part is
the actual fix. I'm fairly amazed this one never caused
trouble in testing as it is in one of the most common paths.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Staging: otus: Fix ZM_SEQ_DEBUG macro for no-debug case
tcp_seq is only initialised in case where ZM_ENABLE_PERFORMANCE_EVALUATION
is defined. So move the call to ZM_SEQ_DEBUG() and the decleration of
tcp_seq in there too. This allows ZM_SEQ_DEBUG() to be removed from the
non-ZM_ENABLE_PERFORMANCE_EVALUATION case in the header file.
This resolves several compile warnings for the
non-ZM_ENABLE_PERFORMANCE_EVALUATION case.
However, the ZM_ENABLE_PERFORMANCE_EVALUATION
case seems to be completely broken.
$ gcc (Debian 4.4.2-8) 4.4.2
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ make
...
drivers/staging/otus/80211core/cagg.c: In function 'zfAggRxEnabled':
drivers/staging/otus/80211core/cagg.c:1872: warning: left-hand operand of
comma expression has no effect
drivers/staging/otus/80211core/cagg.c:1872: warning: left-hand operand of
comma expression has no effect
drivers/staging/otus/80211core/cagg.c:1872: warning: statement with no
effect
...
Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
$ gcc (Debian 4.4.2-8) 4.4.2
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ make
...
drivers/staging/otus/ioctl.c: In function 'usbdrv_wpa_ioctl':
drivers/staging/otus/ioctl.c:2253: warning: ISO C90 forbids mixed declarations and code
...
Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jarod Wilson [Thu, 7 Jan 2010 23:35:58 +0000 (18:35 -0500)]
staging: crystalhd: add missing fixes for userspace lib build
I somehow managed to not actually include these two fixes in the submission
that was committed to the staging tree. libcrystalhd should eventually be
built against the kernel-provided header, and needs the stdint.h include. The
VOID bit is to keep things in sync with the Mac OS X driver and library that
Scott Davilla is also working on.
Signed-off-by: Scott Davilla <davilla@4pi.com> Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Peter Huewe [Thu, 7 Jan 2010 20:21:35 +0000 (21:21 +0100)]
Staging: wlan-ng: Add select WEXT_PRIV to Kconfig to prevent build failure
Without WEXT_PRIV set the p80211wext.c fails to build due to unknown fields in
the iw_handler_def struct.
Those fields are enclosed in WEXT_PRIV conditionals in the prototype
of iw_handler_def in include/net/iw_handler.h
Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Acked-by: Simon Horman <horms@verge.net.au> Cc: stable <stable@kernel.org> [2.6.33 only] Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Peter Huewe [Fri, 8 Jan 2010 08:10:13 +0000 (09:10 +0100)]
Staging: rtl8192u: Add select WEXT_PRIV to Kconfig to prevent build failure
Without WEXT_PRIV set the driver fails to build due to unknown fields in
the iw_handler_def struct.
Those fields are enclosed in WEXT_PRIV conditionals in the prototype
of iw_handler_def in include/net/iw_handler.h
Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Acked-by: Simon Horman <horms@verge.net.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Peter Huewe [Fri, 8 Jan 2010 08:09:12 +0000 (09:09 +0100)]
Staging: otus: Add select WEXT_PRIV to Kconfig to prevent build failure
Without WEXT_PRIV set the driver fails to build due to unknown fields in
the iw_handler_def struct.
Those fields are enclosed in WEXT_PRIV conditionals in the prototype
of iw_handler_def in include/net/iw_handler.h
Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Acked-by: Simon Horman <horms@verge.net.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>