Commit graph

83199 commits

Author SHA1 Message Date
David Miller
e3cb91ce1a timbgpio: fix build
Use of get_irq_chip_data() et al.  requires including linux/irq.h

Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Richard Röjfors <richard.rojfors@pelagicore.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-06 11:26:23 -08:00
Takahiro Yasui
f070304094 dm raid1: fix deadlock when suspending failed device
To prevent deadlock, bios in the hold list should be flushed before
dm_rh_stop_recovery() is called in mirror_suspend().

The recovery can't start because there are pending bios and therefore
dm_rh_stop_recovery deadlocks.

When there are pending bios in the hold list, the recovery waits for
the completion of the bios after recovery_count is acquired.
The recovery_count is released when the recovery finished, however,
the bios in the hold list are processed after dm_rh_stop_recovery() in
mirror_presuspend(). dm_rh_stop_recovery() also acquires recovery_count,
then deadlock occurs.

Signed-off-by: Takahiro Yasui <tyasui@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Reviewed-by: Mikulas Patocka <mpatocka@redhat.com>
2010-03-06 02:32:35 +00:00
Mike Snitzer
924e600d41 dm: eliminate some holes data structures
Eliminate a 4-byte hole in 'struct dm_io_memory' by moving 'offset' above the
'ptr' to which it applies (size reduced from 24 to 16 bytes).  And by
association, 1-4 byte hole is eliminated in 'struct dm_io_request' (size
reduced from 56 to 48 bytes).

Eliminate all 6 4-byte holes and 1 cache-line in 'struct dm_snapshot' (size
reduced from 392 to 368 bytes).

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2010-03-06 02:32:33 +00:00
Peter Rajnoha
3abf85b5b5 dm ioctl: introduce flag indicating uevent was generated
Set a new DM_UEVENT_GENERATED_FLAG when returning from ioctls to
indicate that a uevent was actually generated.  This tells the userspace
caller that it may need to wait for the event to be processed.

Signed-off-by: Peter Rajnoha <prajnoha@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2010-03-06 02:32:31 +00:00
Mikulas Patocka
a97f925a32 dm: free dm_io before bio_endio not after
Free the dm_io structure before calling bio_endio() instead of after it,
to ensure that the io_pool containing it is not referenced after it is
freed.

This partially fixes a problem described here
  https://www.redhat.com/archives/dm-devel/2010-February/msg00109.html

thread 1:
bio_endio(bio, io_error);
/* scheduling happens */
					thread 2:
					close the device
					remove the device
thread 1:
free_io(md, io);

Thread 2, when removing the device, sees non-empty md->io_pool (because the
io hasn't been freed by thread 1 yet) and may crash with BUG in mempool_free.
Thread 1 may also crash, when freeing into a nonexisting mempool.

To fix this we must make sure that bio_endio() is the last call and
the md structure is not accessed afterwards.

There is another bio_endio in process_barrier, but it is called from the thread
and the thread is destroyed prior to freeing the mempools, so this call is
not affected by the bug.

A similar bug exists with module unloads - the module may be unloaded
immediately after bio_endio - but that is more difficult to fix.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: stable@kernel.org
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2010-03-06 02:32:29 +00:00
Nikanth Karthikesan
8215d6ec5f dm table: remove unused dm_get_device range parameters
Remove unused parameters(start and len) of dm_get_device()
and fix the callers.

Signed-off-by: Nikanth Karthikesan <knikanth@suse.de>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2010-03-06 02:32:27 +00:00
Mike Snitzer
0f3649a9e3 dm ioctl: only issue uevent on resume if state changed
Only issue a uevent on a resume if the state of the device changed,
i.e. if it was suspended and/or its table was replaced.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Cc: stable@kernel.org
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2010-03-06 02:32:24 +00:00
Mikulas Patocka
ede5ea0b8b dm raid1: always return error if all legs fail
If all mirror legs fail, always return an error instead of holding the
bio, even if the handle_errors option was set.  At present it is the
responsibility of the driver underneath us to deal with retries,
multipath etc.

The patch adds the bio to the failures list instead of holding it
directly.  do_failures tests first if all legs failed and, if so,
returns the bio with -EIO.  If any leg is still alive and handle_errors
is set, do_failures calls hold_bio.

Reviewed-by: Takahiro Yasui <tyasui@redhat.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2010-03-06 02:32:22 +00:00
Kiyoshi Ueda
fb61264297 dm mpath: refactor pg_init
This patch pulls the pg_init path activation code out of
process_queued_ios() into a new function.

No functional change.

Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2010-03-06 02:32:18 +00:00
Kiyoshi Ueda
2bded7bd7e dm mpath: wait for pg_init completion when suspending
When suspending the device we must wait for all I/O to complete, but
pg-init may be still in progress even after flushing the workqueue
for kmpath_handlerd in multipath_postsuspend.

This patch waits for pg-init completion correctly in
multipath_postsuspend().

Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2010-03-06 02:32:13 +00:00
Kiyoshi Ueda
d0259bf0ee dm mpath: hold io until all pg_inits completed
m->queue_io is set to block processing I/Os, and it needs to be kept
while pg-init, which issues multiple path activations, is in progress.
But m->queue is cleared when a path activation completes without error
in pg_init_done(), even while other path activations are in progress.
That may cause undesired -EIO on paths which are not complete activation.

This patch fixes that by not clearing m->queue_io until all path
activations complete.

(Before the hardware handlers were moved into the SCSI layer, pg_init
only used one path.)

Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2010-03-06 02:30:02 +00:00
Kiyoshi Ueda
fce323dd68 dm mpath: avoid storing private suspended state
'suspended' flag in struct multipath was introduced to check whether
the multipath target is in suspended state, but the same check is
done through dm_suspended() now, so remove the flag and related code.

Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Cc: Mike Anderson <andmike@linux.vnet.ibm.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2010-03-06 02:29:59 +00:00
Kiyoshi Ueda
ecdb2e257a dm table: remove dm_get from dm_table_get_md
Remove the dm_get() in dm_table_get_md() because dm_table_get_md() could
be called from presuspend/postsuspend, which are called while
mapped_device is in DMF_FREEING state, where dm_get() is not allowed.

Justification for that is the lifetime of both objects: As far as the
current dm design/implementation, mapped_device is never freed while
targets are doing something, because dm core waits for targets to become
quiet in dm_put() using presuspend/postsuspend.  So targets should be
able to touch mapped_device without holding reference count of the
mapped_device, and we should allow targets to touch mapped_device even
if it is in DMF_FREEING state.

Backgrounds:
I'm trying to remove the multipath internal queue, since dm core now has
a generic queue for request-based dm.  In the patch-set, the multipath
target wants to request dm core to start/stop queue.  One of such
start/stop requests can happen during postsuspend() while the target
waits for pg-init to complete, because the target stops queue when
starting pg-init and tries to restart it when completing pg-init.  Since
queue belongs to mapped_device, it involves calling dm_table_get_md()
and dm_put().  On the other hand, postsuspend() is called in dm_put()
for mapped_device which is in DMF_FREEING state, and that triggers
BUG_ON(DMF_FREEING) in the 2nd dm_put().

I had tried to solve this problem by changing only multipath not to
touch mapped_device which is in DMF_FREEING state, but I couldn't and I
came up with a question why we need dm_get() in dm_table_get_md().

Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2010-03-06 02:29:52 +00:00
Moger, Babu
f7b934c812 dm mpath: skip activate_path for failed paths
This patch adds two minor fixes while processing device mapper path activation.

Skip failed paths while calling activate_path.  If the path is already failed
then activate_path will fail for sure. We don't have to call in that case. In
some case this might cause prolonged retries unnecessarily.

Change the misleading message if the path being activated fails with SCSI_DH_NOSYS.

Signed-off-by: Babu Moger <babu.moger@lsi.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2010-03-06 02:29:49 +00:00
Moger, Babu
83c0d5d538 dm mpath: pass struct pgpath to pg init done
This patch removes some unnecessary argument casting. There is no
functional change with this patch.

Passes 'struct pgpath' through to pg_init_done() instead of the enclosed
'struct dm_path'.

Tested the changes with LSI storage..

CC: Chandra Seetharaman <chandra.seetharaman@us.ibm.com>
Signed-off-by: Babu Moger <babu.moger@lsi.com>
Acked-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2010-03-06 02:29:45 +00:00
Linus Torvalds
e213e26ab3 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6: (33 commits)
  quota: stop using QUOTA_OK / NO_QUOTA
  dquot: cleanup dquot initialize routine
  dquot: move dquot initialization responsibility into the filesystem
  dquot: cleanup dquot drop routine
  dquot: move dquot drop responsibility into the filesystem
  dquot: cleanup dquot transfer routine
  dquot: move dquot transfer responsibility into the filesystem
  dquot: cleanup inode allocation / freeing routines
  dquot: cleanup space allocation / freeing routines
  ext3: add writepage sanity checks
  ext3: Truncate allocated blocks if direct IO write fails to update i_size
  quota: Properly invalidate caches even for filesystems with blocksize < pagesize
  quota: generalize quota transfer interface
  quota: sb_quota state flags cleanup
  jbd: Delay discarding buffers in journal_unmap_buffer
  ext3: quota_write cross block boundary behaviour
  quota: drop permission checks from xfs_fs_set_xstate/xfs_fs_set_xquota
  quota: split out compat_sys_quotactl support from quota.c
  quota: split out netlink notification support from quota.c
  quota: remove invalid optimization from quota_sync_all
  ...

Fixed trivial conflicts in fs/namei.c and fs/ufs/inode.c
2010-03-05 13:20:53 -08:00
Amerigo Wang
a0a5e3488a hwmon: Remove the deprecated adt7473 driver
adt7473 driver is obsoleted by adt7475 driver. And it is scheduled
to be removed in Feb 2010.

Signed-off-by: WANG Cong <amwang@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-03-05 22:17:26 +01:00
Jean Delvare
dc71afe5ac hwmon: Fix off-by-one kind values
Recent changes on the I2C front have left off-by-one array indexes in
3 hwmon drivers. Fix them.

Faulty commit:
e5e9f44c2 i2c: Drop I2C_CLIENT_INSMOD_2 to 8

Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Andre Prendel <andre.prendel@gmx.de>
Cc: stable@kernel.org
2010-03-05 22:17:26 +01:00
Jean Delvare
a44908d742 hwmon: (tmp421) Fix temperature conversions
The low bits of temperature registers are status bits, they must be
masked out before converting the register values to temperatures.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Andre Prendel <andre.prendel@gmx.de>
Cc: stable@kernel.org
2010-03-05 22:17:25 +01:00
Jean Delvare
8d59582a86 hwmon: (tmp421) Restore missing inputs
An off-by-one error caused some inputs to not be created by the driver
when they should. TMP421 gets only one input instead of two, TMP422
gets two instead of three, etc. Fix the bug by listing explicitly the
number of inputs each device has.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Andre Prendel <andre.prendel@gmx.de>
Cc: stable@kernel.org
2010-03-05 22:17:25 +01:00
George Joseph
d58de03872 hwmon: Driver for Andigilog aSC7621 family monitoring chips
Hwmon driver for Andigilog aSC7621 family monitoring chips.

Signed-off-by: George Joseph <george.joseph@fairview5.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-03-05 22:17:25 +01:00
Wolfram Sang
2324498502 hwmon: (adt7411) Improve locking
Add proper locking for the cached variables. Also get rid of
ref_is_vdd, which became obsolete.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-03-05 22:17:23 +01:00
Wolfram Sang
d84ca5b345 hwmon: Add driver for ADT7411 voltage and temperature sensor
Add basic support for the ADT7411. Reads out all conversion results (via I2C,
SPI yet missing) and allows some on-the-fly configuration. Tested with a
custom board.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-03-05 22:17:23 +01:00
Sven Anders
5852f9609d hwmon: (w83793) Add watchdog functionality
Add watchdog functionality to the Winbond W83793 driver.

Signed-off-by: Sven Anders <anders@anduras.de>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-03-05 22:17:22 +01:00
Jean Delvare
ebec05bdc4 hwmon: (g760a) Make rpm_from_cnt static
Function rpm_from_cnt is only used internally so it can be made
static. Make it inline while we're here, for performance reasons
(although hopefully gcc would figure out by itself...)

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Herbert Valerio Riedel <hvr@gnu.org>
Acked-by: Martin Michlmayr <tbm@cyrius.com>
2010-03-05 22:17:22 +01:00
Jean Delvare
cccfc9c4bb hwmon: (it87) Validate auto pwm settings
Before switching to automatic fan control mode, make sure that all the
trip points make sense. Otherwise, the control loop could lead to
weird fan behavior.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-03-05 22:17:21 +01:00
Jean Delvare
4f3f51bc21 hwmon: (it87) Add support for old automatic fan speed control
Add support for the automatic fan speed control interface as
implemented by IT8705F chips up to revision F and IT8712F chips up to
revision G. This implementation fits very well in our standard sysfs
interface.

I implemented the old and not the new interface because the only chip
I have at hand is an old one, and the new interface is more difficult
to map to the standard sysfs interface. Adding support later should be
possible though, if someone with a supported chip is interested.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-03-05 22:17:21 +01:00
Jean Delvare
f5f64501e4 hwmon: (it87) Use strict_strtol instead of simple_strtol
For consistency and robustness, use strict_strtol instead of
simple_strtol.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-03-05 22:17:19 +01:00
Jean Delvare
5f2dc798ca hwmon: (it87) Fix many checkpatch errors and warnings
Fix 20 errors and 11 warnings reported by the checkpatch script. The
remainining errors would require more work. The remaining warnings
will be addressed later.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-03-05 22:17:18 +01:00
Jean Delvare
d9b327c310 hwmon: (it87) Add support for beep on alarm
The IT87xxF chips support beeping on alarm, if properly wired and
configured. There is one control bit for each input type (temperature,
fan, voltage.) Let the user see and change them.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-03-05 22:17:17 +01:00
Jean Delvare
6a8d7acfbe hwmon: (it87) Create vid attributes by group
Only VID-related attributes are left in it87_attributes_opt, so we
might as well rename it to it87_attributes_vid and use this group to
create all attributes at once.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-03-05 22:17:16 +01:00
Jean Delvare
723a0aa0a1 hwmon: (it87) Refactor attributes creation and removal
There is a lot of code redundancy in the creation of the fan and
pwm attributes. Move these attributes to arrays so that the code can
be simplified.

This in turns makes the attributes removal code larger, so move it to
a separate function that can be called in both the standard removal
case and the error path during probing.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-03-05 22:17:16 +01:00
Jean Delvare
94ac7ee616 hwmon: (it87) Expose the PWM/temperature mappings
Let the user read the PWM-to-temperature mappings. Until the trip
points are also exposed, this is essentially a way to know how the
BIOS has set things up. The ability to change the settings will be
added later, together with the trip points.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-03-05 22:17:16 +01:00
Jean Delvare
b99883dcd5 hwmon: (it87) Display fan outputs in automatic mode as such
The it87 driver doesn't yet support automatic fan control. Let it at
least tell the user when a fan output is in automatic mode. Also let
the user switch from automatic mode (possibly set by the BIOS) to
manual mode and back without losing the settings.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-03-05 22:17:15 +01:00
Jean Delvare
53de33427f hwmon: (lm90) Add SMBus alert support
Tested successfully with an ADM1032 chip on its evaluation board. It
should work fine with all other chips as well.

At this point this is more of a proof-of-concept, we don't do anything
terribly useful on SMBus alert: we simply log the event. But this could
later evolve into libsensors signaling so that user-space applications
can take an appropriate action.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Trent Piepho <tpiepho@freescale.com>
2010-03-05 22:17:15 +01:00
Jean Delvare
9523836416 hwmon: (lm90) Restore configuration on exit
Restore the chip configuration when unloading the driver. This ensures
we don't leave the chip running if it was initially stopped.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-03-05 22:17:14 +01:00
Jean Delvare
6771ea1fff hwmon: (lm90) Add support for the Winbond/Nuvoton W83L771AWG/ASG
This chips is found on several Zotac Ion ITX boards, amongst others.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: MC Matti <mcmatti17@googlemail.com>
Cc: Manuel Lamotte-Schubert <mls@pronego.com>
2010-03-05 22:17:13 +01:00
Christoph Hellwig
b43fa8284d dquot: cleanup dquot transfer routine
Get rid of the transfer dquot operation - it is now always called from
the filesystem and if a filesystem really needs it's own (which none
currently does) it can just call into it's own routine directly.

Rename the now static low-level dquot_transfer helper to __dquot_transfer
and vfs_dq_transfer to dquot_transfer to have a consistent namespace,
and make the new dquot_transfer return a normal negative errno value
which all callers expect.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jan Kara <jack@suse.cz>
2010-03-05 00:20:29 +01:00
Greg Kroah-Hartman
a71b676fa9 Staging: winbond: fix up wireless api errors
The wireless core made a number of api changes that caused
the winbond driver to break.  This patch fixes those errors by
making the needed changes to the driver.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-04 08:44:13 -08:00
Greg Kroah-Hartman
f341dddf1d Staging: merge staging patches into Linus's main branch
There were a number of patches that went into Linus's
tree already that conflicted with other changes in the
staging branch.  This merge resolves those merge conflicts.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-04 08:39:02 -08:00
Linus Torvalds
4c10c937cc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-next-2.6: (49 commits)
  drivers/ide: Fix continuation line formats
  ide: fixed section mismatch warning in cmd640.c
  ide: ide_timing_compute() fixup
  ide: make ide_get_best_pio_mode() static
  via82cxxx: use ->pio_mode value to determine pair device speed
  tx493xide: use ->pio_mode value to determine pair device speed
  siimage: use ->pio_mode value to determine pair device speed
  palm_bk3710: use ->pio_mode value to determine pair device speed
  it821x: use ->pio_mode value to determine pair device speed
  cs5536: use ->pio_mode value to determine pair device speed
  cs5535: use ->pio_mode value to determine pair device speed
  cmd64x: fix handling of address setup timings
  amd74xx: use ->pio_mode value to determine pair device speed
  alim15x3: fix handling of UDMA enable bit
  alim15x3: fix handling of DMA timings
  alim15x3: fix handling of command timings
  alim15x3: fix handling of address setup timings
  ide-timings: use ->pio_mode value to determine fastest PIO speed
  ide: change ->set_dma_mode method parameters
  ide: change ->set_pio_mode method parameters
  ...
2010-03-04 08:24:06 -08:00
Linus Torvalds
9bb676966a Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx: (28 commits)
  ioat: cleanup ->timer_fn() and ->cleanup_fn() prototypes
  ioat3: interrupt coalescing
  ioat: close potential BUG_ON race in the descriptor cleanup path
  ioat2: kill pending flag
  ioat3: use ioat2_quiesce()
  ioat3: cleanup, don't enable DCA completion writes
  DMAENGINE: COH 901 318 lli sg offset fix
  DMAENGINE: COH 901 318 configure channel direction
  DMAENGINE: COH 901 318 remove irq counting
  DMAENGINE: COH 901 318 descriptor pool refactoring
  DMAENGINE: COH 901 318 cleanups
  dma: Add MPC512x DMA driver
  Debugging options for the DMA engine subsystem
  iop-adma: redundant/wrong tests in iop_*_count()?
  dmatest: fix handling of an even number of xor_sources
  dmatest: correct raid6 PQ test
  fsldma: Fix cookie issues
  fsldma: Fix cookie issues
  dma: cases IPU_PIX_FMT_BGRA32, BGR32 and ABGR32 are the same in ipu_ch_param_set_size()
  dma: make Open Firmware device id constant
  ...
2010-03-04 08:20:14 -08:00
Linus Torvalds
0f2cc4ecd8 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (52 commits)
  init: Open /dev/console from rootfs
  mqueue: fix typo "failues" -> "failures"
  mqueue: only set error codes if they are really necessary
  mqueue: simplify do_open() error handling
  mqueue: apply mathematics distributivity on mq_bytes calculation
  mqueue: remove unneeded info->messages initialization
  mqueue: fix mq_open() file descriptor leak on user-space processes
  fix race in d_splice_alias()
  set S_DEAD on unlink() and non-directory rename() victims
  vfs: add NOFOLLOW flag to umount(2)
  get rid of ->mnt_parent in tomoyo/realpath
  hppfs can use existing proc_mnt, no need for do_kern_mount() in there
  Mirror MS_KERNMOUNT in ->mnt_flags
  get rid of useless vfsmount_lock use in put_mnt_ns()
  Take vfsmount_lock to fs/internal.h
  get rid of insanity with namespace roots in tomoyo
  take check for new events in namespace (guts of mounts_poll()) to namespace.c
  Don't mess with generic_permission() under ->d_lock in hpfs
  sanitize const/signedness for udf
  nilfs: sanitize const/signedness in dealing with ->d_name.name
  ...

Fix up fairly trivial (famous last words...) conflicts in
drivers/infiniband/core/uverbs_main.c and security/tomoyo/realpath.c
2010-03-04 08:15:33 -08:00
Greg Kroah-Hartman
b02957d58a Staging: Merge two branches of coding style fixes together
Turns out that multiple people sent pretty much the same patch
for the same staging drivers.  Commit these in two different
branches and merge them together to get a more complete coverage
of the cleanup and properly credit everyone for the work that they
did.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-04 08:14:54 -08:00
Linus Torvalds
1fae4cfb97 Merge git://git.infradead.org/battery-2.6
* git://git.infradead.org/battery-2.6:
  power_supply: bq27x00: fix voltage and current units
  power_supply: bq27x00: add status and time properties
  power_supply: bq27x00: add BQ27500 support
  power_supply: bq27x00: fix temperature conversion
  power_supply: bq27x00: remove unused struct fields
  power_supply: bq27x00: remove double endian swap
  da9030_battery: fix spelling in comment
  wm97xx_battery: Clean up some warnings
2010-03-04 08:04:22 -08:00
Chihau Chau
b94c765ac3 Staging: dream: camera: sk5k3e2fx: fix code style issues
This fixes some code style issues about assignments in if conditions.

Signed-off-by: Chihau Chau <chihau@gmail.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-04 07:59:02 -08:00
Chihau Chau
df84f941e9 Staging: dream: camera: msm_camera: fix code style issues
This fixes some code style issues like to add one space after a while or
switch statement and before a open parenthesis '(', and to include KERN_
facility level in the printk() functions.

Signed-off-by: Chihau Chau <chihau@gmail.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-04 07:59:02 -08:00
Andrew Elwell
3f4b4e7797 Staging: wlan-ng: More checkpatch.pl error cleanups
Signed-off-by: Andrew Elwell <Andrew.Elwell@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-04 07:59:02 -08:00
Andrew Elwell
ef1a0ed7f1 Staging: wlan-ng - checkpatch.pl fixups
Basic fixups in the staging/wlan-ng directory.
(First kernel patch - thanks to FOSDEM talk)

Signed-off-by: Andrew Elwell <Andrew.Elwell@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-04 07:59:02 -08:00
Andrea Gelmini
6705b68d0b Staging: comedi: comedi_fops.c: Checkpatch cleanup
ERROR: do not initialise externals to 0 or NULL
+int comedi_num_legacy_minors = 0;

WARNING: braces {} are not necessary for single statement blocks
+			if (s->subdev_flags & SDF_CMD_READ) {
+				kill_fasync(&dev->async_queue, SIGIO, POLL_IN);
+			}

WARNING: braces {} are not necessary for single statement blocks
+			if (s->subdev_flags & SDF_CMD_WRITE) {
+				kill_fasync(&dev->async_queue, SIGIO, POLL_OUT);
+			}

Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-04 07:59:01 -08:00
Stewart Robertson
639b9f1ee5 Staging: comedi: fix suspect code indent in ni_labpc.c
This is a patch to the ni_labpc.c file that fixes suspect code indent for
conditional statements found by the checkpatch.pl tool

Signed-off-by: Stewart Robertson <stewart_r@aliencamel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-04 07:59:01 -08:00
Maurice Dawson
65d6d26c6b Staging: comedi: fix yet another brace coding style issue in ni_labpc.c
This is a patch to the ni_labpc.c file that fixes up all the brace
warnings found by the checkpatch.pl tool

Signed-off-by: Maurice Dawson <mauricedawson2699@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-04 07:59:01 -08:00
Maurice Dawson
2bb9c33590 Staging: comedi: fix another brace coding style issues in ni_labpc.c
This is a patch to the ni_labpc.c file that fixes up a brace warning
found by the checkpatch.pl tool

Signed-off-by: Maurice Dawson <mauricedawson2699@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-04 07:59:01 -08:00
Maurice Dawson
8377e813c7 Staging: comedi: fix brace coding style issue in ni_labpc.c
This is a patch to the ni_labpc.c file that fixes up a brace warning
found by the checkpatch.pl tool.

Signed-off-by: Maurice Dawson <maurice2699@btinternet.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-04 07:59:01 -08:00
Chihau Chau
a917d4c425 Staging: comedi: poc: Adding some KERN_ facility level
This fixes some coding style issues like include KERN_ facility levels
in some printk() and one trailing whitespace error.

Signed-off-by: Chihau Chau <chihau@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-04 07:59:01 -08:00
Chihau Chau
d4023a5ee2 Staging: dream: camera: msm_camera: fix some code style issues
This fixes some code style issues like else staments after the close
braces '}' and to use __func__ instead of __FUNCTION__.

Signed-off-by: Chihau Chau <chihau@gmail.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-04 07:59:01 -08:00
Alessandro Ghedini
71508ee489 Staging: wlan-ng: fix most of the style issues in hfa384x.h
This patch fixes all the errors and the majority of the warnings found with
checkpatch.pl script in hfa384x.h, following Gábor Stefanik hints

Signed-off-by: Alessandro Ghedini <al3xbio@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-04 07:59:01 -08:00
Chihau Chau
49c9b5c7bd Staging: dream: camera: msm_camera: fix coding style issues
This fixes some coding style issues like to use __func__ instead
__FUNCTION__, "foo *bar" instead "foo* bar" and a initial comment with
"/* */" instead "//"

Signed-off-by: Chihau Chau <chihau@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-04 07:59:01 -08:00
Graham M Howe
0054a361e4 Staging: comedi: fix bracing coding style and 80 character issues in ni_660x.c
This is a patch to the ni_660x.c file that fixes up the brace and 80
character issues found by the checkpatch tool

Signed-off-by: Graham M Howe <gmhowe@btopenworld.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-04 07:59:01 -08:00
Graham M Howe
c2ca6a476a Staging: comedi: fix bracing coding style issue in ni_65xx.c
This is a patch to the ni_65xx.c file that fixes up a brace
warning found by the checkpatch.pl tool

Signed-off-by: Graham M Howe <gmhowe@btopenworld.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-04 07:59:00 -08:00
Benjamin Adolphi
dedf3ad153 Staging: comedi: pcmad: Checkpatch cleanups
This fixes all checkpatch issues in the pcmad comedi driver.

Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-04 07:59:00 -08:00
Chihau Chau
52d83bde6f Staging: comedi: poc: fix coding style issues
This fixes a line over 80 characters and a brace warnings.

Signed-off-by: Chihau Chau <chihau@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-04 07:59:00 -08:00
Linus Torvalds
c8bf9fec47 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6: (27 commits)
  Regulators: wm8400 - cleanup platform driver data handling
  Regulators: wm8994 - clean up driver data after removal
  Regulators: wm831x-xxx - clean up driver data after removal
  Regulators: pcap-regulator - clean up driver data after removal
  Regulators: max8660 - annotate probe and remove methods
  Regulators: max1586 - annotate probe and remove methods
  Regulators: lp3971 - fail if platform data was not supplied
  Regulators: tps6507x-regulator - mark probe method as __devinit
  Regulators: tps65023-regulator - mark probe method as __devinit
  Regulators: twl-regulator - mark probe function as __devinit
  Regulators: fixed - annotate probe and remove methods
  Regulators: ab3100 - fix probe and remove annotations
  Regulators: virtual - use sysfs attribute groups
  twl6030: regulator: Configure STATE register instead of REMAP
  regulator: Provide optional dummy regulator for consumers
  regulator: Assume regulators are enabled if they don't report anything
  regulator: Convert fixed voltage regulator to use enable_time()
  regulator: Add WM8994 regulator support
  regulator: enable max8649 regulator driver
  regulator: trivial: fix typos in user-visible Kconfig text
  ...
2010-03-04 07:52:06 -08:00
Linus Torvalds
a2e28fc116 Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6:
  pcmcia: disable pcmcia ioctl for !ARM, prepare for removal
  pcmcia: CodingStyle fixes
  pcmcia: alchemy: fixup wrong comments
  pcmcia: remove irq_list parameter from pd6729
  yenta_socket: ENE CB712 CardBus bridge needs special treatment with Echo Audio Indigo soundcards
2010-03-04 07:51:36 -08:00
Linus Torvalds
03a2c4d76c Merge branch 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (151 commits)
  vga_switcheroo: disable default y by new rules.
  drm/nouveau: fix *staging* driver build with switcheroo off.
  drm/radeon: fix typo in Makefile
  vga_switcheroo: fix build on platforms with no ACPI
  drm/radeon: Fix printf type warning in 64bit system.
  drm/radeon/kms: bump the KMS version number for square tiling support.
  vga_switcheroo: initial implementation (v15)
  drm/radeon/kms: do not disable audio engine twice
  Revert "drm/radeon/kms: disable HDMI audio for now on rv710/rv730"
  drm/radeon/kms: do not preset audio stuff and start timer when not using audio
  drm/radeon: r100/r200 ums: block ability for userspace app to trash 0 page and beyond
  drm/ttm: fix function prototype to match implementation
  drm/radeon: use ALIGN instead of open coding it
  drm/radeon/kms: initialize set_surface_reg reg for rs600 asic
  drm/i915: Use a dmi quirk to skip a broken SDVO TV output.
  drm/i915: enable/disable LVDS port at DPMS time
  drm/i915: check for multiple write domains in pin_and_relocate
  drm/i915: clean-up i915_gem_flush_gpu_write_domain
  drm/i915: reuse i915_gpu_idle helper
  drm/i915: ensure lru ordering of fence_list
  ...

Fixed trivial conflicts in drivers/gpu/vga/Kconfig
2010-03-04 07:49:37 -08:00
Amit Shah
335a64a5c2 virtio: console: Use better variable names for fill_queue operation
We want to keep track of the number of buffers added to a vq. Use
nr_added_bufs instead of 'ret'.

Also, the users of fill_queue() overloaded a local 'err' variable to
check the numbers of buffers allocated. Use nr_added_bufs instead of
err.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Reported-by: Juan Quintela <quintela@redhat.com>
2010-03-04 13:40:39 +05:30
Amit Shah
604b2ad7cc virtio: console: Fix type of 'len' as unsigned int
We declare 'len' as int type but it should be 'unsigned int', as
get_buf() wants it to be.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Reported-by: Juan Quintela <quintela@redhat.com>
2010-03-04 13:40:33 +05:30
Dan Williams
dd58ffcf5a Merge branch 'coh' into dmaengine 2010-03-03 21:22:21 -07:00
Dan Williams
aa4d72ae94 ioat: cleanup ->timer_fn() and ->cleanup_fn() prototypes
If the calling convention of ->timer_fn() and ->cleanup_fn() are unified
across hardware versions we can drop parameters to ioat_init_channel() and
unify ioat_is_dma_complete() implementations.

Both ->timer_fn() and ->cleanup_fn() are modified to expect a struct
dma_chan pointer.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2010-03-03 21:21:13 -07:00
Dan Williams
b9cc98697d ioat3: interrupt coalescing
The hardware automatically disables further interrupts after each event
until rearmed.  This allows a delay to be injected between the occurence
of the interrupt and the running of the cleanup routine.  The delay is
scaled by the descriptor backlog and then written to the INTRDELAY
register which specifies the number of microseconds to hold off
interrupt delivery after an interrupt event occurs.  According to
powertop this reduces the interrupt rate from ~5000 intr/s to ~150
intr/s per without affecting throughput (simple dd to a raid6 array).

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2010-03-03 21:21:13 -07:00
Dan Williams
aa75db0080 ioat: close potential BUG_ON race in the descriptor cleanup path
Since ioat_cleanup_preamble() and the update of the last completed
descriptor are not synchronized there is a chance that two cleanup threads
can see descriptors to clean.  If the first cleans up all pending
descriptors then the second will trigger the BUG_ON.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2010-03-03 21:21:10 -07:00
H Hartley Sweeten
3a8954e8f2 staging: dt3155: revert u_long to u64 usage
Commit 9c1390a923ddb6fba1cf9d7440743369140c6d8a replaced
all u_int's with u32 and u_long's with u64. Unfortunately, a u_long
is still only 32-bits so they should have been replaced with u32 also.

This can be verified by the register definitions in dt3155_io.h.  It
specifically states that the memory mapped registers are 32-bit.

Fix this by changing all the u64 to u32.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Greg Kroah-Hartman <greg@kroah.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:07 -08:00
Andrea Gelmini
5617f9da46 Staging: comedi: drivers.c: Checkpatch cleanup
WARNING: Use #include <linux/io.h> instead of <asm/io.h>
+#include <asm/io.h>

WARNING: braces {} are not necessary for any arm of this statement
+	if (dev->driver) {
[...]
+	} else {
[...]

WARNING: braces {} are not necessary for single statement blocks
+	if (insn->insn == INSN_READ) {
+		data[0] = (new_data[1] >> (chan - base_bitfield_channel)) & 1;
+	}

WARNING: braces {} are not necessary for single statement blocks
+	if (async->prealloc_buf && async->prealloc_bufsz == new_size) {
+		return 0;
+	}

WARNING: braces {} are not necessary for single statement blocks
+				if (async->buf_page_list[i].virt_addr == NULL) {
+					break;
+				}

WARNING: braces {} are not necessary for single statement blocks
+	if ((int)(async->buf_write_alloc_count + nbytes - free_end) > 0) {
+		nbytes = free_end - async->buf_write_alloc_count;
+	}

WARNING: braces {} are not necessary for single statement blocks
+	if ((int)(async->buf_write_alloc_count + nbytes - free_end) > 0) {
+		nbytes = 0;
+	}

WARNING: braces {} are not necessary for single statement blocks
+	if (async->buf_write_ptr >= async->prealloc_bufsz) {
+		async->buf_write_ptr %= async->prealloc_bufsz;
+	}

Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:07 -08:00
Andrea Gelmini
b91665e95d Staging: arlan: arlan.h: more Checkpatch cleanup
ERROR: do not use C99 // comments
+      volatile	u_char radioModule;// shows EEPROM, can be overridden at 0x111

ERROR: do not use C99 // comments
+      volatile	u_char defaultChannelSet; // shows EEProm, can be overriiden at 0x10A

Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:07 -08:00
Andrea Gelmini
e22245b6c2 Staging: arlan: Makefile: Checkpatch cleanup
ERROR: trailing whitespace
+obj-$(CONFIG_ARLAN) += arlan.o $

Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:07 -08:00
Andrea Gelmini
aa1468b3fa Staging: rt3070: md4.h: Checkpatch cleanup
WARNING: space prohibited between function name and open parenthesis '('
+void MD4Init (MD4_CTX *);

WARNING: space prohibited between function name and open parenthesis '('
+void MD4Update (MD4_CTX *, u8 *, UINT);

WARNING: space prohibited between function name and open parenthesis '('
+void MD4Final (u8 [16], MD4_CTX *);

ERROR: do not use C99 // comments
+#endif //__MD4_H__

Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:07 -08:00
Andrea Gelmini
a5a8695987 Staging: arlan: arlan.h: Checkpatch cleanup
ERROR: trailing whitespace
+ *  Copyright (C) 1998 Elmer.Joandi@ut.ee, +37-255-13500^I$

WARNING: Use #include <linux/io.h> instead of <asm/io.h>
+#include <asm/io.h>

ERROR: do not use C99 // comments
+//#define ARLAN_DEBUGGING 1

ERROR: "foo * bar" should be "foo *bar"
+extern int     arlan_command(struct net_device * dev, int command);

ERROR: trailing whitespace
+ $

ERROR: trailing whitespace
+#define IFDEBUG( L ) if ( (L) & arlan_debug ) $

ERROR: space prohibited after that open parenthesis '('
+#define IFDEBUG( L ) if ( (L) & arlan_debug )

ERROR: space prohibited before that close parenthesis ')'
+#define IFDEBUG( L ) if ( (L) & arlan_debug )

ERROR: trailing whitespace
+#define ARLAN_FAKE_HDR_LEN 12 $

ERROR: space required after that ',' (ctx:VxV)
+	#define ARLAN_DEBUG(a,b) printk(KERN_DEBUG a, b)
 	                     ^

ERROR: trailing whitespace
+^I#define ARLAN_DEBUG(a,b) $

ERROR: space required after that ',' (ctx:VxV)
+	#define ARLAN_DEBUG(a,b)
 	                     ^

ERROR: open brace '{' following struct go on the same line
+struct arlan_shmem
+{

ERROR: trailing whitespace
+      /* Header Signature */ $

ERROR: trailing whitespace
+      $

ERROR: trailing whitespace
+      $

ERROR: trailing whitespace
+      $

ERROR: trailing whitespace
+     $

ERROR: trailing whitespace
+      int systemId; $

ERROR: open brace '{' following struct go on the same line
+struct TxParam
+{

ERROR: "foo * bar" should be "foo *bar"
+      struct arlan_shmem __iomem * card;

ERROR: "foo * bar" should be "foo *bar"
+      struct arlan_shmem * conf;

ERROR: trailing whitespace
+      struct arlan_conf_stru * Conf;^I     $

ERROR: "foo * bar" should be "foo *bar"
+      struct arlan_conf_stru * Conf;

ERROR: trailing whitespace
+ $

ERROR: space required after that ',' (ctx:VxV)
+#define READSHM(to,from,atype) {\
                   ^

ERROR: space required after that ',' (ctx:VxV)
+#define READSHM(to,from,atype) {\
                        ^

ERROR: space required after that ',' (ctx:VxO)
+	memcpy_fromio(&(tmp),&(from),sizeof(atype));\
 	                    ^

ERROR: space required before that '&' (ctx:OxV)
+	memcpy_fromio(&(tmp),&(from),sizeof(atype));\
 	                     ^

ERROR: space required after that ',' (ctx:VxV)
+	memcpy_fromio(&(tmp),&(from),sizeof(atype));\
 	                            ^

ERROR: space required after that ',' (ctx:VxV)
+#define READSHMEM(from,atype)\
                       ^

ERROR: space required after that ',' (ctx:VxV)
+#define WRITESHM(to,from,atype) \
                    ^

ERROR: space required after that ',' (ctx:VxV)
+#define WRITESHM(to,from,atype) \
                         ^

ERROR: space required after that ',' (ctx:VxO)
+	memcpy_toio(&(to),&tmpSHM,sizeof(atype));\
 	                 ^

ERROR: space required before that '&' (ctx:OxV)
+	memcpy_toio(&(to),&tmpSHM,sizeof(atype));\
 	                  ^

ERROR: space required after that ',' (ctx:VxV)
+	memcpy_toio(&(to),&tmpSHM,sizeof(atype));\
 	                         ^

ERROR: space required after that ',' (ctx:VxV)
+#define DEBUGSHM(levelSHM,stringSHM,stuff,atype) \
                          ^

ERROR: space required after that ',' (ctx:VxV)
+#define DEBUGSHM(levelSHM,stringSHM,stuff,atype) \
                                    ^

ERROR: space required after that ',' (ctx:VxV)
+#define DEBUGSHM(levelSHM,stringSHM,stuff,atype) \
                                          ^

ERROR: space required after that ',' (ctx:VxO)
+		memcpy_fromio(&tmpSHM,&(stuff),sizeof(atype));\
 		                     ^

ERROR: space required before that '&' (ctx:OxV)
+		memcpy_fromio(&tmpSHM,&(stuff),sizeof(atype));\
 		                      ^

ERROR: space required after that ',' (ctx:VxV)
+		memcpy_fromio(&tmpSHM,&(stuff),sizeof(atype));\
 		                              ^

ERROR: space required after that ',' (ctx:VxV)
+		IFDEBUG(levelSHM) printk(stringSHM,tmpSHM);\
 		                                  ^

ERROR: space required after that ',' (ctx:VxO)
+	writeb(val,&(to))
 	          ^

ERROR: space required before that '&' (ctx:OxV)
+	writeb(val,&(to))
 	           ^

ERROR: space required after that ',' (ctx:VxO)
+	writew(val,&(to))
 	          ^

ERROR: space required before that '&' (ctx:OxV)
+	writew(val,&(to))
 	           ^

ERROR: space required after that ',' (ctx:VxO)
+	writel(val,&(to))
 	          ^

ERROR: space required before that '&' (ctx:OxV)
+	writel(val,&(to))
 	           ^

ERROR: space prohibited after that open parenthesis '('
+   ( (   READSHMB(((struct arlan_private *)netdev_priv(dev))->card->registrationMode)    > 0) && \

ERROR: space prohibited after that open parenthesis '('
+     (   READSHMB(((struct arlan_private *)netdev_priv(dev))->card->registrationStatus) == 0)    )

ERROR: space prohibited before that close parenthesis ')'
+     (   READSHMB(((struct arlan_private *)netdev_priv(dev))->card->registrationStatus) == 0)    )

ERROR: code indent should use tabs where possible
+ ^IREADSHMB(((struct arlan_private *)netdev_priv(dev))->card->cntrlRegImage)$

ERROR: space required before the open brace '{'
+#define writeControlRegister(dev, v){\

ERROR: space required after that ',' (ctx:WxV)
+   WRITESHMB(((struct arlan_private *)netdev_priv(dev))->card->cntrlRegImage	,((v) &0xF) );\
                                                                             	^

ERROR: need consistent spacing around '&' (ctx:WxV)
+   WRITESHMB(((struct arlan_private *)netdev_priv(dev))->card->cntrlRegImage	,((v) &0xF) );\
                                                                             	      ^

ERROR: space prohibited before that close parenthesis ')'
+   WRITESHMB(((struct arlan_private *)netdev_priv(dev))->card->cntrlRegImage	,((v) &0xF) );\

ERROR: space required after that ',' (ctx:WxV)
+   WRITESHMB(((struct arlan_private *)netdev_priv(dev))->card->controlRegister	,(v) 	);}
                                                                               	^

ERROR: space required after that ';' (ctx:VxV)
+   WRITESHMB(((struct arlan_private *)netdev_priv(dev))->card->controlRegister	,(v) 	);}
                                                                               	     	 ^

ERROR: space prohibited before that close parenthesis ')'
+   WRITESHMB(((struct arlan_private *)netdev_priv(dev))->card->controlRegister	,(v) 	);}

WARNING: suspect code indent for conditional statements (3, 6)
+   if (cr & ARLAN_CHANNEL_ATTENTION){ \
+      writeControlRegister(dev, (cr & ~ARLAN_CHANNEL_ATTENTION));\

ERROR: space required before the open brace '{'
+   if (cr & ARLAN_CHANNEL_ATTENTION){ \

ERROR: space required after that close brace '}'
+   }else  \

ERROR: space required before the open brace '{'
+#define clearChannelAttention(dev){ \

ERROR: space required after that ',' (ctx:VxV)
+   writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_CHANNEL_ATTENTION);}
                            ^

ERROR: space required after that ';' (ctx:VxV)
+   writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_CHANNEL_ATTENTION);}
                                                                                 ^

ERROR: space required after that ',' (ctx:VxV)
+   writeControlRegister(dev,readControlRegister(dev) | ARLAN_RESET);}
                            ^

ERROR: space required after that ';' (ctx:VxV)
+   writeControlRegister(dev,readControlRegister(dev) | ARLAN_RESET);}
                                                                    ^

ERROR: space required after that ',' (ctx:VxV)
+   writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_RESET);}
                            ^

ERROR: space required after that ';' (ctx:VxV)
+   writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_RESET);}
                                                                     ^

ERROR: space required before the open brace '{'
+#define setInterruptEnable(dev){\

ERROR: space required after that ',' (ctx:VxV)
+   writeControlRegister(dev,readControlRegister(dev) | ARLAN_INTERRUPT_ENABLE)  ;}
                            ^

ERROR: space required after that ';' (ctx:WxV)
+   writeControlRegister(dev,readControlRegister(dev) | ARLAN_INTERRUPT_ENABLE)  ;}
                                                                                 ^

ERROR: space required before the open brace '{'
+#define clearInterruptEnable(dev){\

ERROR: space required after that ',' (ctx:VxV)
+   writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_INTERRUPT_ENABLE)  ;}
                            ^

ERROR: space required after that ';' (ctx:WxV)
+   writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_INTERRUPT_ENABLE)  ;}
                                                                                  ^

ERROR: space required before the open brace '{'
+#define setClearInterrupt(dev){\

ERROR: space required after that ',' (ctx:VxV)
+   writeControlRegister(dev,readControlRegister(dev) | ARLAN_CLEAR_INTERRUPT)   ;}
                            ^

ERROR: space required after that ';' (ctx:WxV)
+   writeControlRegister(dev,readControlRegister(dev) | ARLAN_CLEAR_INTERRUPT)   ;}
                                                                                 ^

ERROR: space required before the open brace '{'
+#define clearClearInterrupt(dev){\

ERROR: space required after that ',' (ctx:VxV)
+   writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_CLEAR_INTERRUPT);}
                            ^

ERROR: space required after that ';' (ctx:VxV)
+   writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_CLEAR_INTERRUPT);}
                                                                               ^

ERROR: space required before the open brace '{'
+#define setPowerOff(dev){\

ERROR: space required after that ',' (ctx:VxV)
+   writeControlRegister(dev,readControlRegister(dev) | (ARLAN_POWER && ARLAN_ACCESS));\
                            ^

ERROR: space required after that ',' (ctx:VxV)
+   writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_ACCESS);}
                            ^

ERROR: space required after that ';' (ctx:VxV)
+   writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_ACCESS);}
                                                                      ^

ERROR: space required before the open brace '{'
+#define setPowerOn(dev){\

ERROR: space required after that ',' (ctx:VxV)
+   writeControlRegister(dev,readControlRegister(dev) & ~(ARLAN_POWER));   }
                            ^

ERROR: space required before the open brace '{'
+#define arlan_lock_card_access(dev){\

ERROR: space required after that ',' (ctx:VxV)
+   writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_ACCESS);}
                            ^

ERROR: space required after that ';' (ctx:VxV)
+   writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_ACCESS);}
                                                                      ^

ERROR: space required before the open brace '{'
+#define arlan_unlock_card_access(dev){\

ERROR: trailing whitespace
+   writeControlRegister(dev,readControlRegister(dev) | ARLAN_ACCESS ); }  $

ERROR: space required after that ',' (ctx:VxV)
+   writeControlRegister(dev,readControlRegister(dev) | ARLAN_ACCESS ); }
                            ^

ERROR: space prohibited before that close parenthesis ')'
+   writeControlRegister(dev,readControlRegister(dev) | ARLAN_ACCESS ); }

ERROR: trailing whitespace
+ $

ERROR: trailing whitespace
+ $

Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:07 -08:00
Andrea Gelmini
fa93e19dcf Staging: comedi: dt2801.c: Checkpatch cleanup
ERROR: code indent should use tabs where possible
+          0 = [-10,10]$

ERROR: code indent should use tabs where possible
+          0 = [-10,10]$

WARNING: braces {} are not necessary for single statement blocks
+		if (stat & (DT_S_COMPOSITE_ERROR | DT_S_READY)) {
+			return stat;
+		}

WARNING: braces {} are not necessary for single statement blocks
+		if (stat & DT_S_COMPOSITE_ERROR) {
+			return stat;
+		}

WARNING: braces {} are not necessary for single statement blocks
+	if (stat & DT_S_READY) {
+		return 0;
+	}

WARNING: braces {} are not necessary for single statement blocks
+		if (stat & DT_S_COMPOSITE_ERROR) {
+			return stat;
+		}

WARNING: braces {} are not necessary for single statement blocks
+		if (stat & DT_S_READY) {
+			return 0;
+		}

WARNING: braces {} are not necessary for single statement blocks
+	if (!(stat & DT_S_READY)) {
+		printk("dt2801: !ready in dt2801_writecmd(), ignoring\n");
+	}

WARNING: braces {} are not necessary for single statement blocks
+	if (!timeout) {
+		printk("dt2801: timeout 1 status=0x%02x\n", stat);
+	}

WARNING: braces {} are not necessary for single statement blocks
+	if (!timeout) {
+		printk("dt2801: timeout 2 status=0x%02x\n", stat);
+	}

WARNING: braces {} are not necessary for any arm of this statement
+		if (stat == -ETIME) {
[...]
+		} else {
[...]

Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:06 -08:00
Andrea Gelmini
20962c10c1 Staging: comedi: dmm32at.c: Checkpatch cleanup
WARNING: braces {} are not necessary for any arm of this statement
+	if (data[0] == COMEDI_OUTPUT) {
[...]
+	} else {
[...]

Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:06 -08:00
Andrea Gelmini
882e5b32b5 Staging: comedi: cb_pcimdas.c: more Checkpatch cleanup
WARNING: braces {} are not necessary for single statement blocks
+		if (fifo_empty) {
+			break;
+		}

WARNING: braces {} are not necessary for single statement blocks
+	if (irq) {
+		printk(", irq %u", irq);
+	}

Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:06 -08:00
Andrea Gelmini
ecd89ddcab Staging: comedi: das6402.c: Checkpatch cleanup
ERROR: Macros with complex values should be enclosed in parenthesis
+#define N_WORDS 3000*64

Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:06 -08:00
Andrea Gelmini
dd105f08c0 Staging: comedi: hwdrv_apci3120.c: Checkpatch cleanup
ERROR: do not initialise statics to 0 or NULL
+static unsigned int ui_Temp = 0;

WARNING: braces {} are not necessary for any arm of this statement
+		if (data[1]) {
[...]
+		} else
[...]

WARNING: braces {} are not necessary for single statement blocks
+		for (i = 0; i < devpriv->ui_AiNbrofChannels; i++) {
+			devpriv->ui_AiChannelList[i] = data[4 + i];
+		}

ERROR: that open brace { should be on the previous line
+	} else			/*  EOC */
+	{

WARNING: braces {} are not necessary for any arm of this statement
+		if (data[1]) {
[...]
+		} else {
[...]

ERROR: that open brace { should be on the previous line
+	if (insn->unused[0] == 222)	/*  second insn read */
+	{

WARNING: braces {} are not necessary for single statement blocks
+		for (i = 0; i < insn->n; i++) {
+			data[i] = devpriv->ui_AiReadData[i];
+		}

WARNING: braces {} are not necessary for single statement blocks
+	if (cmd->start_src != TRIG_NOW && cmd->start_src != TRIG_EXT) {
+		err++;
+	}

ERROR: that open brace { should be on the previous line
+	if (cmd->scan_begin_src == TRIG_TIMER)	/*  Test Delay timing */
+	{

ERROR: that open brace { should be on the previous line
+	if (cmd->convert_src == TRIG_TIMER)	/*  Test Acquisition timing */
+	{

WARNING: braces {} are not necessary for any arm of this statement
+	if (cmd->stop_src == TRIG_COUNT) {
[...]
+	} else {
[...]

WARNING: braces {} are not necessary for single statement blocks
+	if (devpriv->b_ExttrigEnable == APCI3120_ENABLE) {
+		i_APCI3120_ExttrigEnable(dev);	/*  activate EXT trigger */
+	}

WARNING: braces {} are not necessary for single statement blocks
+			if (dmalen0 > (devpriv->ui_AiDataLength)) {
+				dmalen0 = devpriv->ui_AiDataLength;
+			}

WARNING: braces {} are not necessary for single statement blocks
+			if (dmalen1 > (devpriv->ui_AiDataLength)) {
+				dmalen1 = devpriv->ui_AiDataLength;
+			}

WARNING: braces {} are not necessary for any arm of this statement
+		if (CR_RANGE(chanlist[i]) < APCI3120_BIPOLAR_RANGES) {
[...]
+		} else {
[...]

ERROR: that open brace { should be on the previous line
+		if (devpriv->b_EocEosInterrupt == APCI3120_ENABLE)	/*  enable this in without DMA ??? */
+		{

ERROR: that open brace { should be on the previous line
+	if (data[0] == APCI3120_TIMER)	/* initialize timer */
+	{

ERROR: that open brace { should be on the previous line
+	} else			/*  Initialize Watch dog */
+	{

ERROR: that open brace { should be on the previous line
+	if (data[0] == 2)	/*  write new value */
+	{

ERROR: that open brace { should be on the previous line
+		if (devpriv->b_Timer2Mode == APCI3120_TIMER)	/* start timer */
+		{

ERROR: that open brace { should be on the previous line
+		} else		/* start watch dog */
+		{

ERROR: that open brace { should be on the previous line
+		if (devpriv->b_Timer2Mode == APCI3120_TIMER)	/* start timer */
+		{

ERROR: that open brace { should be on the previous line
+	} else			/*  Read watch dog status */
+	{

WARNING: braces {} are not necessary for single statement blocks
+	if (!devpriv->b_OutputMemoryStatus) {
+		ui_Temp = 0;
+
+	}			/* if(!devpriv->b_OutputMemoryStatus ) */

ERROR: code indent should use tabs where possible
+                      data[0]     Value to be written$

ERROR: code indent should use tabs where possible
+                      data[1]    :1 Set digital o/p ON$

ERROR: code indent should use tabs where possible
+                      data[1]     2 Set digital o/p OFF with memory ON$

ERROR: that open brace { should be on the previous line
+	if (ui_Range)		/*  if 1 then unipolar */
+	{

ERROR: that open brace { should be on the previous line
+	} else			/*  if 0 then   bipolar */
+	{

ERROR: that open brace { should be on the previous line
+	do			/* Waiting of DA_READY BIT */
+	{

Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:06 -08:00
Andrea Gelmini
d539047c7b Staging: comedi: das08_cs.c: Checkpatch cleanup
ERROR: code indent should use tabs where possible
+        NONE$

ERROR: do not initialise statics to 0 or NULL
+static struct pcmcia_device *cur_dev = NULL;

Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:06 -08:00
Andrea Gelmini
426054ce11 Staging: comedi: contec_pci_dio.c: Checkpatch cleanup
WARNING: braces {} are not necessary for single statement blocks
+		if (dev->iobase) {
+			comedi_pci_disable(devpriv->pci_dev);
+		}

Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:06 -08:00
Andrea Gelmini
f1c54e8272 Staging: comedi: cb_pcimdda.c: Checkpatch cleanup
WARNING: braces {} are not necessary for any arm of this statement
+	if (it->options[2]) {
[...]
+	} else {
[...]

WARNING: braces {} are not necessary for single statement blocks
+			if (devpriv->registers) {
+				comedi_pci_disable(devpriv->pci_dev);
+			}

Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:06 -08:00
Andrea Gelmini
7c2f1946a5 Staging: comedi: cb_pcimdas.c: Checkpatch cleanup
WARNING: braces {} are not necessary for any arm of this statement
+	if (thisboard->has_dio) {
[...]
+	} else {
[...]

WARNING: braces {} are not necessary for single statement blocks
+			if (devpriv->BADR0) {
+				comedi_pci_disable(devpriv->pci_dev);
+			}

Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:06 -08:00
Andrea Gelmini
e3a21d0ac2 Staging: comedi: cb_pcidio.c: Checkpatch cleanup
WARNING: braces {} are not necessary for single statement blocks
+			if (devpriv->dio_reg_base) {
+				comedi_pci_disable(devpriv->pci_dev);
+			}

WARNING: braces {} are not necessary for single statement blocks
+		for (i = 0; i < thisboard->n_8255; i++) {
+			subdev_8255_cleanup(dev, dev->subdevices + i);
+		}

Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:06 -08:00
Andrea Gelmini
20db7d7de7 Staging: comedi: cb_pcidda.c: Checkpatch cleanup
WARNING: braces {} are not necessary for single statement blocks
+			if (devpriv->dac) {
+				comedi_pci_disable(devpriv->pci_dev);
+			}

WARNING: braces {} are not necessary for single statement blocks
+		if (inw_p(devpriv->dac + DACALIBRATION1) & SERIAL_OUT_BIT) {
+			value |= 1 << (value_width - i);
+		}

WARNING: braces {} are not necessary for single statement blocks
+	for (i = 0; i < max_num_caldacs; i++) {
+		cal2_bits |= DESELECT_CALDAC_BIT(i);
+	}

WARNING: braces {} are not necessary for single statement blocks
+	for (i = 0; i < max_num_caldacs; i++) {
+		cal2_bits |= DESELECT_CALDAC_BIT(i);
+	}

Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:05 -08:00
Andrea Gelmini
2d238b2972 Staging: comedi: cb_pcidas.c: Checkpatch cleanup
ERROR: "foo * bar" should be "foo *bar"
+		      uint8_t * data);

WARNING: braces {} are not necessary for single statement blocks
+		if (devpriv->s5933_config) {
+			comedi_pci_disable(devpriv->pci_dev);
+		}

WARNING: braces {} are not necessary for single statement blocks
+	if (cmd->stop_src == TRIG_COUNT) {
+		devpriv->count = cmd->chanlist_len * cmd->stop_arg;
+	}

WARNING: braces {} are not necessary for single statement blocks
+	if (cmd->stop_src == TRIG_COUNT) {
+		devpriv->ao_count = cmd->chanlist_len * cmd->stop_arg;
+	}

WARNING: braces {} are not necessary for single statement blocks
+	if (cmd->stop_src == TRIG_COUNT) {
+		devpriv->ao_count -= num_points;
+	}

WARNING: braces {} are not necessary for single statement blocks
+	if (dev->attached == 0) {
+		return IRQ_NONE;
+	}

WARNING: braces {} are not necessary for single statement blocks
+	if ((status & (INT | EOAI | LADFUL | DAHFI | DAEMI)) == 0) {
+		comedi_error(dev, "spurious interrupt");
+	}

WARNING: braces {} are not necessary for single statement blocks
+	if (status & (DAHFI | DAEMI)) {
+		handle_ao_interrupt(dev, status);
+	}

WARNING: braces {} are not necessary for single statement blocks
+		if (async->cmd.stop_src == TRIG_COUNT) {
+			devpriv->ao_count -= num_points;
+		}

ERROR: "foo * bar" should be "foo *bar"
+		      uint8_t * data)

Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:05 -08:00
Andrea Gelmini
882e1233a1 Staging: comedi: hwdrv_apci1032.c: Checkpatch cleanup
ERROR: do not initialise externals to 0 or NULL
+unsigned int ui_InterruptStatus = 0;

WARNING: braces {} are not necessary for single statement blocks
+		else {
+			outl(0x6, devpriv->iobase + APCI1032_DIGITAL_IP_IRQ);
+		}		/* else if(data[1] == ADDIDATA_OR) */

WARNING: braces {} are not necessary for single statement blocks
+		if (data[1] == 1) {
+			*data = ui_InterruptStatus;
+		}		/* if(data[1]==1) */

Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:05 -08:00
Andrea Gelmini
a9ecb5bb58 Staging: comedi: addi_common.h: Checkpatch cleanup
ERROR: code indent should use tabs where possible
+        const struct comedi_lrange *pr_AiRangelist;^I/* rangelist for A/D */$

ERROR: code indent should use tabs where possible
+        const struct comedi_lrange *pr_AoRangelist;^I/* rangelist for D/A */$

Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:05 -08:00
Andrea Gelmini
015fadba7c Staging: comedi: addi_amcc_S5920.c: Checkpatch cleanup
WARNING: braces {} are not necessary for any arm of this statement
+			if (i_Counter == 0) {
[...]
+			} else {
[...]

Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:05 -08:00
d binderman
48d07f2bf3 Staging: comedi: amplc_pci224.c: coding style cleanups
Signed-off-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:05 -08:00
Alessio Igor Bogani
02c7b237f6 Staging: Cleanup useless headers
BKL isn't anymore present into these files thus it is no necessary still include smp_lock.h.

Signed-off-by: Alessio Igor Bogani <abogani@texware.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:05 -08:00
Florian Schilhabel
7bd795bfcd Staging: rtl8192su: use list_for_each_safe() in ieee80211_crypto_deinit
Signed-off-by: Florian Schilhabel <florian.c.schilhabel@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:05 -08:00
Florian Schilhabel
a99840b1aa Staging: rtl8192su: re-enable tx-stats
currently, interface statistics look like this:

wlan0     Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx
          inet addr:xxx.xxx.xxx.xxx  Bcast:xxx.xxx.xxx.xxx  Mask:xxx.xxx.xxx.xxx
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:435 errors:0 dropped:1 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:456758 (446.0 Kb)  TX bytes:0 (0.0 b)

after re-enabling the tx-stats it looks like this:

wlan0     Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx
          inet addr:xxx.xxx.xxx.xxx  Bcast:xxx.xxx.xxx.xxx  Mask:xxx.xxx.xxx.xxx
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1269 errors:0 dropped:1 overruns:0 frame:0
          TX packets:1049 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1667442 (1.5 Mb)  TX bytes:82606 (80.6 Kb)

Signed-off-by: Florian Schilhabel <florian.c.schilhabel@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:05 -08:00
Florian Schilhabel
29a1fbc88b Staging: rtl8192su: fix for rtl819xU:Error TX URB for zero byte xxx, error -2
according to 'linux device drivers',
ENOENT, ECONNRESET, ESHUTDOWN are not real transmission errors.
also, a little cosmetics.

Signed-off-by: Florian Schilhabel <florian.c.schilhabel@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:04 -08:00
Florian Schilhabel
2f22560880 Staging: rtl8192su: Remove Firmware from r8192SU_HWImg.c
Because the Firmware is loaded from RTL8192SU/rtl8192sfw.bin,
it it save, to remove it from r8192SU_HWImg.c

Signed-off-by: Florian Schilhabel <florian.c.schilhabel@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:04 -08:00
Sven-Thorsten Dietrich
c852ab6672 Staging: make drivers use spin_lock_init()
This fixes some RT-triggered compile errors and typos.

Signed-off-by: Sven-Thorsten Dietrich <sdietrich@novell.com>
Acked-by: Marek Lindner <lindner_marek@yahoo.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:04 -08:00
Ameya Palande
21b0838c1a Staging: crystalhd: Misc improvements for crystalhd_lnx.c
This patch does following improvements:

1. Follow kernel style for comments
2. Reorganize code for readability improvement
3. Use PCI helper macros
4. Use __devinit, __devexit, __devexit_p at necessary places
5. Mark functions and data as static when it is not exported

Signed-off-by: Ameya Palande <2ameya@gmail.com>
Cc: Naren Sankar <nsankar@broadcom.com>
Cc: Jarod Wilson <jarod@wilsonet.com>
Cc: Scott Davilla <davilla@4pi.com>
Cc: Manu Abraham <abraham.manu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:04 -08:00
Jim Dog
0925796901 Staging: wlan-ng: Fixed line length issues in prism2usb.c
This is a patch to the prism2usb.c that fixes one line which was over
the 80 character limit by wrapping it to a new line and removes a
commented out configuration for a ZyDAS ZD1201 device since support for
this device with this driver is now deprecated.

Signed-off-by: Jim Dog <jimdog@northern-indymedia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:04 -08:00
Randy Dunlap
582de7caf5 Staging/pohmelfs: fix write_inode parameter warning
sparse warns that:
drivers/staging/pohmelfs/inode.c:1797: warning: initialization from incompatible pointer type

so fix pohmelfs_write_inode() to have the expected parameters.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:04 -08:00
Randy Dunlap
83a0f9bc65 Staging: fix wlan-ng printk format warning
Fix prism2fw.c printk format warning:

drivers/staging/wlan-ng/prism2fw.c:209: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:04 -08:00
Randy Dunlap
128a5d0223 Staging: rtl8192* needs semaphore.h
The rtl8192* drivers in staging use semaphores, so they need
to #include <linux/semaphore.h>.

(similar to staging-rtl8187se-needs-semaphore.h.patch)

drivers/staging/rtl8192e/ieee80211/ieee80211.h:2038: error: field 'ips_sem' has incomplete type
drivers/staging/rtl8192e/ieee80211/ieee80211.h:2249: error: field 'wx_sem' has incomplete type
drivers/staging/rtl8192e/ieee80211/ieee80211.h:2250: error: field 'scan_sem' has incomplete type
drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c:442: error: implicit declaration of function 'down'
drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c:500: error: implicit declaration of function 'up'
drivers/staging/rtl8192e/ieee80 211/ieee80211_softmac.c:3165: error: implicit declaration of function 'sema_init'

drivers/staging/rtl8192su/ieee80211/ieee80211.h:1330: error: field 'wx_sem' has incomplete type
drivers/staging/rtl8192su/ieee80211/ieee80211.h:1331: error: field 'scan_sem' has incomplete type

drivers/staging/rtl8192u/ieee80211/ieee80211.h:2010: error: field 'wx_sem' has incomplete type
drivers/staging/rtl8192u/ieee80211/ieee80211.h:2011: error: field 'scan_sem' has incomplete type

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:04 -08:00
Sylvain Trias
0f7cf0034c Staging: line6: variax.c: fixed a space a "x ? a : b" coding style issue
Fixed a coding style issue.

Signed-off-by: Sylvain Trias <bozo@nobodix.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:04 -08:00
Frank Mori Hess
ea12ac4fd2 Staging: comedi: Increased timeout for digital output dma loading
Increased timeout for digital output dma loading, due to report of it
being too short for some hardware.

Signed-off-by: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:03 -08:00
OGAWA Hirofumi
2021937c6d Staging: comedi: serial2002: Fix filp_open usage
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:03 -08:00
Benjamin Adolphi
9f7a344b69 Staging: comedi: amplc_pc236: Checkpatch cleanups
This fixes all checkpatch issues in the amplc_pc236 comedi driver.

Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:03 -08:00
Benjamin Adolphi
669c930c8f Staging: comedi: amplc_dio200: Checkpatch cleanups
This fixes all checkpatch issues in the amplc_dio200 comedi driver.

Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:03 -08:00
Benjamin Adolphi
e20ad20d84 Staging: comedi: aio_iiro_16: Checkpatch cleanups
This fixes all checkpatch issues in the aio_iiro_16 comedi driver.

Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:03 -08:00
Stewart Robertson
e41a6f6d9c Staging: comedi: fix coding style issues in ni_labpc.c
This is a patch to the ni_labpc.c file that fixes the brace warnings and
comments over 80 characters found by the checkpatch.pl tool. Some code
still goes over 80 characters because I didn't know what to do with it.

Signed-off-by: Stewart Robertson <stewart_r@aliencamel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:03 -08:00
Marek Lindner
af71b816cd Staging: batman-adv: fix module initialization
Make sure that batman-adv does not process packets before its
initialization is complete. Some sanity checks added to the receiver
function.

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:03 -08:00
Marek Lindner
da6d6c7ac3 Staging: batman-adv: avoid crash on memory allocation error
skb_share_check() returns NULL if it can't allocate more memory but
it still frees the skbuff.

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:03 -08:00
Andrew Lunn
8d03847c09 Staging: batman-adv: Fix skbuff leak in VIS code.
The vis code takes a copy of the data inside the skbuf if it is interesting
for us, so we always need to release the skbuf.

Reported-by: Linus Luessing <linus.luessing@web.de>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:03 -08:00
Linus Luessing
837b8248f6 Staging: batman-adv: atomic variable for vis-srv activation
This fixes the bug discovered by Marek Lindner which did not allow
turning on the vis-server before an interface has been added. With this
patch we are using a global atomic variable for activating and
deactiating the vis-server-mode, which can be used before
inserting an interface.

Signed-off-by: Linus Luessing <linus.luessing@web.de>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:02 -08:00
Marek Lindner
bc0ad071a7 Staging: batman-adv: remove obsolete variables
This patch removes a variable that became obsolete since the skb handling
replaced the packet handling thread.

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:02 -08:00
Marek Lindner
149de2e58b Staging: batman-adv: avoid having the same error message more than once
The routing code has 2 sections which warn about ttl exceeded. The
corresponding warnings were identical which makes it hard to debug. In
addition, batman-adv does not need to warn about ttl exceeded in case
we encountered an echo request as this is commonly used to generate
traceroute graphs.

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:02 -08:00
Simon Wunderlich
eb50081d8f Staging: batman-adv: don't lock while sending packets
As in other parts of batman-adv, we should not lock while sending a packet but
keep the lock held for as short as possible. Additionally, we should check
whether the interface is active, otherwise batman_if->net_dev might not be
available ...

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Acked-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:02 -08:00
Sven Eckelmann
0fce64362d Staging: batman-adv: depend on NET instead of PACKET in Kconfig
The code which uses the raw packet sockets was removed. The only related
dependencies are the skb and netdev handling code. This is provided by
NET in Kconfig.

Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:02 -08:00
Mark Brown
77712e5fbe Staging: iio: Staticise non-exported functions
Staticise a number of functions which aren't exported outside their
source files, and also add a __user annotation for the buffer in
iio_event_chrdev_read().

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:02 -08:00
Graham M Howe
9a16a92c11 Staging: comedi: fix brace and 80 character coding style issue in ni_daq_700.c
This is a patch to the ni_daq_700.c file that fixes up brace and 80 character warnings
found by the checkpatch.pl tool

Signed-off-by: Graham M Howe <gman.1352@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:02 -08:00
Arthur Benilov
3c2aabc41d Staging: vme: VMIVME-7805 board support
VMIVME-7805 board has a special control register that has to be used in
order to activate the VME bus access via the Universe II bridge.
This control register also handles endianess convertion.

Signed-off-by: Arthur Benilov <arthur.benilov@iba-group.com>
Signed-off-by: Vincent Bossier <vincent.bossier@iba-group.com>
Acked-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:02 -08:00
Arthur Benilov
33e920d9eb Staging: vme: Allocate memory buffers for master windows
For VME device I/O operations on master windows the user driver tends
to use kern_buf buffer array which is not allocated. This causes an error
when reading from master window device files.

Signed-off-by: Arthur Benilov <arthur.benilov@iba-group.com>
Signed-off-by: Vincent Bossier <vincent.bossier@iba-group.com>
Acked-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:02 -08:00
Arthur Benilov
5188d74cc4 Staging: vme: Use A24 when requesting slave resource
When requesting slave resources A16 addressing mode flag is used to find
available windows. Since the ca91cx42 bridge only supports two A16 slave windows
but four are requested, the driver fails to initialize. The flag has been
changed to A24, which is supported by all slave windows.

Signed-off-by: Arthur Benilov <arthur.benilov@iba-group.com>
Signed-off-by: Vincent Bossier <vincent.bossier@iba-group.com>
Acked-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:02 -08:00
Arthur Benilov
877de4b486 Staging: vme: llseek support in user driver
Provide vme_user_llseek() implementation.

Signed-off-by: Arthur Benilov <arthur.benilov@iba-group.com>
Signed-off-by: Vincent Bossier <vincent.bossier@iba-group.com>
Acked-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:01 -08:00
Martyn Welch
bb9ea89ec8 Staging: vme: Remove legacy unsupported code
Remove the code from the drivers that we are not going to implement before
submitting for review.

Signed-off-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:01 -08:00
Martyn Welch
25331ba2f8 Staging: vme: ca91cx42 slot detection
Sort out slot detection on the ca91cx42.

Signed-off-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:01 -08:00
Martyn Welch
04e10e15f9 Staging: vme: Add ca91cx42 rmw support
Add support for Master Read-Modify-Write cycles on the ca91cx42.

Signed-off-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:01 -08:00
Martyn Welch
21e0cf6d2e Staging: vme: Correct ca91cx42 resource handling
The ca91cx42 driver currently incorrectly handles master windows, setting
and retrieving the sizing parameters incorrectly. Also, in the slave window
handling, it uses an incorrectly set variable.

Signed-off-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:01 -08:00
Martyn Welch
4860ab74d4 Staging: vme: add ca91cx42 dma support
Add support for the DMA controller in the ca91cx42 bridge.

Signed-off-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:01 -08:00
Martyn Welch
2b82beb8c1 Staging: vme: Add location monitor support for ca91cx42
Signed-off-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:01 -08:00
Martyn Welch
8fafb47638 Staging: vme: Make vme_master_resource naming bus neutral
The vme_master_resource structure contains an item called "pci_resource".
Rename to make bus agnostic.

Signed-off-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:01 -08:00
Martyn Welch
29848ac9f3 Staging: vme: Enable drivers to handle more than one bridge
At the moment the vme bridge drivers are written in a way that only
allows them to support one bridge at a time. Modify the drivers to
enable more than one bridge to be present per board.

Signed-off-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:00 -08:00
Martyn Welch
4f723df45d Staging: vme: Attribute Testing For Dma Request
Check the directions in which the DMA controller is expected to operate
before giving control of a resource.

Signed-off-by: Martyn Welch <martyn.welch@gefanuc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:00 -08:00
Martyn Welch
66bd8db52a Staging: vme: Renaming following split of GE Fanuc joint venture
This patch corrects author email addresses and Copyright notices as a
result of the split up of the GE Fanuc joint venture.

Signed-off-by: Martyn Welch <martyn.welch@gefanuc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:00 -08:00
Randy Dunlap
a94f530a5e Staging: rtl8187se: needs semaphore.h
rtl8187se needs to include semaphore.h to prevent build errors:

drivers/staging/rtl8187se/ieee80211/ieee80211.h:1004: error: field 'wx_sem' has incomplete type
drivers/staging/rtl8187se/ieee80211/ieee80211.h:1005: error: field 'scan_sem' has incomplete type

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:00 -08:00
Bernie Thompson
bd80816b28 Staging: udlfb: remove printk and small cleanup
Remove last remaining printk and clarify comments

Signed-off-by: Bernie Thompson <bernie@plugable.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:00 -08:00
Bernie Thompson
dd8015f1c8 Staging: udlfb: explicit dependencies and warnings
Specify Kconfig dependencies, and include warnings for building as a module

udlfb is dependent on FB_DEFERRED_IO, FB_SYS_*, and FB_MODE_HELPERS

Because many kernels do not include defio (which cannot be built
as a module), yet users want to be able to build udlfb as a module later,
udlfb has ifdefs and these dependency warnings to help udlfb build with or
without certain dependencies, but also print warnings for any lost function.

Even though this kind of flexibility isn't common, we've gotten feedback
from a significant portion of users that they were frustrated without it.

Signed-off-by: Bernie Thompson <bernie@plugable.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:00 -08:00
Bernie Thompson
3e8f3d6fa6 Staging: udlfb: Support for fbdev mmap clients (defio)
Add support for fbdev mmap clients who don't send damage ioctls

Because DisplayLink devices are out on the other end of usb, their
"framebuffer" is just normal system memory. So memory mapped writes
don't automatically trigger anything. So up to this point, standard
fbdev clients who rely on mmap() will get an unchanging screen.

This patch makes udlfb a client of Jaya Kumar's defio framework - which sets
up page fault triggers, and those faults are accumulated and sent to udlfb
on a defferred basis, to process as damage notifications for the framebuffer.

Because this involves more overhead than a notification directly from
the application (e.g. just passing on X DAMAGE extension notifications),
a sysfs attribute is provided by udlfb to control defio support.

/sys/class/graphics/fb*/use_defio - writing a "0" to this file before
calling mmap() causes defio to not be initialized - instead udlfb
will rely on getting damage notifications directly through the damage ioctl.

There are unsolved rendering problems with defio (horizontal dead regions
on framebuffer, that accumulate over time) which still needs a fix.

Signed-off-by: Bernie Thompson <bernie@plugable.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:00 -08:00
Bernie Thompson
530f43a8a6 Staging: udlfb: improved rendering performance
Rework rendering for improved performance

Approx 10-20% gain avg across several "benchmarks": x11perf, gtkperf, glxgears
Moves from a single pre-alloc'd urb protected by a long-held mutex
To a list of (4) pre-alloc'd urbs which can be dispatched asynchonously

Improved rendering algorithm to hardware with lower CPU consumption,
fewer system memory accesses, and slightly higher compression.

Better scalability to multiple processors, especially with
multiple framebuffers active.

Signed-off-by: Bernie Thompson <bernie@plugable.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:00 -08:00
Bernie Thompson
2469d5dbca Staging: udlfb: Rework startup and teardown to fix race conditions
Rework probe to use refcounts and std functions

Because the different parts of the driver (usb, fbdev) tear down
in different orders, the driver previously could crash accessing
data that had already been freed.  Refcounting system used to handle.

Reworked probe to make use of refcounts, set mode using std fbops,
and set up sysfs and pre-allocated urbs.

Signed-off-by: Bernie Thompson <bernie@plugable.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:00 -08:00
Bernie Thompson
7d9485e2c5 Staging: udlfb: Add functions to expose sysfs metrics and controls
Add sysfs controls for edid and performance metrics

There are 8 new files exposed in /sys/class/graphics/fb*

edid - returns 128 byte edid blog, suitable for parsing with parse-edid
metrics_bytes_identical
metrics_bytes_rendered
metrics_bytes_sent
metrics_cpu_kcycles_used
metrics_misc
and metrics_reset, which resets all perf metrics to zero

The 6 perf metrics are of type atomic_t.
So these metrics return precise results for short benchmarks, but
any test approx a minute or longer runtime may roll over.

Signed-off-by: Bernie Thompson <bernie@plugable.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:43:00 -08:00
Bernie Thompson
4574203f45 Staging: udlfb: clean up function naming
Move to more consistent naming scheme

All udlfb functions start with udlfb_
All functions for udlfb's fbdev interface start with udlfb_ops_
All functinos for udlfb's usb interface start with udlfb_usb_

Signed-off-by: Bernie Thompson <bernie@plugable.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:59 -08:00
Bernie Thompson
4a4854dd20 Staging: udlfb: pre-allocated urb list helpers
Add functions to pre-allocate and free usb bulk urbs for core render path.

Udlfb currently allocates a single urb, guarded by a mutex, that is a key
bottleneck. Because udlfb sends so much data, preallocation is most efficient.

Functions will be used by new rendering functions in later patches.

Signed-off-by: Bernie Thompson <bernie@plugable.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:59 -08:00
Bernie Thompson
cc403dc67d Staging: udlfb: reorganize function order
Reorganize the location of a few things to be closer to related code

Signed-off-by: Bernie Thompson <bernie@plugable.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:59 -08:00
Bernie Thompson
1d31a9ee69 Staging: udlfb: checkpatch cleanup
Eliminate checkpatch.pl warnings and errors so later patches in series are clean

Signed-off-by: Bernie Thompson <bernie@plugable.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:59 -08:00
Larry Finger
cd18964a1d Staging: r8187se: Remove dead code from r8185b_init.c
Remove dead code from r8185b_init.c.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:59 -08:00
Larry Finger
8daba6b94d Staging: r8187se: Remove two private variables that have a fixed value
For the RTL8187SE, the variable priv->rf_chip is always RF_ZEBRA4
and priv->RegThreeWireMode is always HW_THREE_WIRE_SI. Remove these
2 variables.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:59 -08:00
Larry Finger
b1b7621b08 staging: r8187se: Remove write_phy routine
Remove a routine that is not used.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:58 -08:00
Svenne Krap
5dd8acc8fd Staging: wlan-ng: multiple safe style cleanups
Cleanups as suggested by checkpatch.pl utiltiy.
.o's from before and after cleanup have matching SHA1s.

Signed-off-by: Svenne Krap <svenne@krap.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:58 -08:00
Svenne Krap
46800b225f Staging: wlan-ng: clean up assignments in if statements
Trivial changes to code-paths.

Signed-off-by: Svenne Krap <svenne@krap.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:58 -08:00
Graham M Howe
bc2955ddf4 Staging: comedi: bracing fix to ni_atmio.c
This is a patch to ni_atmio.c file to fix up bracing style problems
found by checkpatch.pl tool

Signed-off-by: Graham M Howe <gman.1352@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:58 -08:00
Dan Carpenter
cd9d25ba31 staging: vt6655: add missing curly braces
It's clear from the indent levels and the context that there are supposed to
be curly braces here.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:58 -08:00
Larry Finger
6de92dd649 Staging: r8187se: Fix for LED not following radio switch
The current driver does not follow the state of the RF switch.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:58 -08:00
Larry Finger
742821ce5f staging: r8187se: Change to use common eeprom routines in EEPROM_93CX
The TODO list includes switching this driver to use the common EEPROM
routines in EEPROM_93CX.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested by: Bernhard Schiffner <bernhard@schiffner-limbach.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:57 -08:00
Jochen Maes
13a21ad18c staging: dream: more Code style fixes
Removed parenthesis from return statements,
split up assignment and if condition

Signed-off-by: Jochen Maes <jochen.maes@sejo.be>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:57 -08:00
Jochen Maes
451ff3737d staging: dream: another Codestyle patch
Fixed code style issues.

Signed-off-by: Jochen Maes <jochen.maes@sejo.be>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:57 -08:00
Jochen Maes
df16b962f0 staging: dream: Codestyle fix
Fixed Codestyle issues

Signed-off-by: Jochen Maes <jochen.maes@sejo.be>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:57 -08:00
Benjamin Adolphi
326bdc6537 Staging: comedi: rti800: more Checkpatch cleanups
This fixes all checkpatch issues in the rti800 comedi driver.

Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:57 -08:00
Mark Allyn
3913add413 Staging: rar_register: add suspend and resume functions
Add suspend and resume functions (which are currently stubs
returning -ENOSYS)

Signed-off-by: Mark Allyn <mark.a.allyn@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:57 -08:00
Mark Allyn
433e63c63e Staging: rar_register: fix checkpatch errors and debug program file
Signed-off-by: Mark Allyn <mark.a.allyn@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:57 -08:00
Mark Allyn
9cedb3924b Staging: rar_register: fix checkpatch errors and debug header file
Signed-off-by: Mark Allyn <mark.a.allyn@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:57 -08:00
Mark Allyn
bafb6f63af Staging: rar_register: provide better explanation in Kconfig
Provides a better explanation of what this
driver is for in the Kconfig file

Signed-off-by: Mark Allyn <mark.a.allyn@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:57 -08:00
Mark Allyn
e33cc5cec0 Staging: rar_register: renaming directory to rar_register
Renames the directory in which the driver files
are located; again for clarity.

Signed-off-by: Mark Allyn <mark.a.allyn@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:56 -08:00
Mark Allyn
ee7dfb7e24 staging: rar_register: renaming driver to rar_register
Patch renames rar_driver to rar_register to clarifiy and differentiate
from rar_handler that will be submitted later

Signed-off-by: Mark Allyn <mark.a.allyn@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:56 -08:00
Greg Kroah-Hartman
e37bcc0de0 Staging: mimio: remove the mimio driver
It turns out that Mimio has a userspace solution for this product using
libusb, and the in-kernel driver is just getting in the way now and
causing problems.  So they have asked that the in-kernel driver be
removed.  As the staging driver wasn't quite working anyway, and Mimio
supports their libusb solution for all distros, I am removing the
in-kernel driver.

The libusb solution can be downloaded from:
	http://www.mimio.com/downloads/mimio_studio_software/linux.asp

Cc: <mwilder@cs.nmsu.edu>
Cc: Phil Hannent <phil@hannent.co.uk>
Cc: Marc Rousseau <Marc.Rousseau@mimio.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:56 -08:00
Greg Kroah-Hartman
ef97e4ef15 Staging: dt3155: fix coding style issues in dt3155_io.c
This fixes up the sparse and coding style issues found in the
dt3155_io.c file.

No code is changed, only formatting and removing unused code.

Cc: Scott Smedley <ss@aao.gov.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:56 -08:00
Greg Kroah-Hartman
dcff74ce8b Staging: dt3155: replace u_int and u_long usage
Use u32 and u64 instead, that's the proper thing to do.

Cc: Scott Smedley <ss@aao.gov.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:56 -08:00
Greg Kroah-Hartman
5d3921117d Staging: dt3155: replace u_char usage
Use u8 instead, that's the proper thing to do.

Cc: Scott Smedley <ss@aao.gov.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:56 -08:00
Greg Kroah-Hartman
062d164719 Staging: dt3155: coding cleanups for dt3155_io.h
This fixes up some coding style issues in the dt3155_io.h file

Cc: Scott Smedley <ss@aao.gov.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:56 -08:00
Greg Kroah-Hartman
f721ad7a9c Staging: dt3155: fix build warnings
This fixes the build warnings in the dt3155 driver

Cc: Scott Smedley <ss@aao.gov.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:56 -08:00
Greg Kroah-Hartman
dee86e8c92 Staging: comedi: ssc_dnp: fixed a brace coding style issue
Fixed a coding style issue.

Created during the keynote presentation at FOSDEM 2010

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:56 -08:00
Benjamin Adolphi
2d2facda0b Staging: comedi: ni_pcidio: Checkpatch cleanups
This fixes almost all checkpatch issues in the ni_pcidio comedi driver.

Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:56 -08:00
Benjamin Adolphi
83c41dabcc Staging: comedi: rti802: Checkpatch cleanups
This fixes all checkpatch issues in the rti802 comedi driver.

Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:55 -08:00
Benjamin Adolphi
0acc516aee Staging: comedi: dt2815: Checkpatch cleanups
This fixes all checkpatch issues in the dt2815 comedi driver.

Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:55 -08:00
Chihau Chau
d3c796fd57 Staging: samsung-laptop: fix coding style issues
This fixes some lines over 80 characters coding style issues.

Signed-off-by: Chihau Chau <chihau@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:55 -08:00
Yong Zhang
e41e5d601e Staging: rt2860: correct onstack wait_queue_head declaration
Use DECLARE_WAIT_QUEUE_HEAD_ONSTACK to make lockdep happy

Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: Alexander Beregalov <a.beregalov@gmail.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:55 -08:00
Tim Schofield
01823a13dc Staging: rtl8192e: fix spacing style issues in r8180_93cx6.c
This is a patch to the r8180_93cx6.c file that fixes up spacing issue
warnings found by the checkpatch.pl tool

Signed-off-by: Tim Schofield <tim@weberpafrica.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:55 -08:00
Paul Elms
f4098b4f8a Staging: comedi: fix brace coding style in comedi_fops.c
This patch to the comedi_fops.c file fixes a brace warning found by the checkpatch.pl tool

Signed-off-by: Paul Elms <paul@uprocera.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:55 -08:00
tony burrows
412bd046b0 Staging: comedi: fix brace coding style issues in ni_labpc.c
This patch fixes all of the brace style warnings found by the
checkpatch.pl tool

Signed-off-by: Tony Burrows <tony@tonyburrows.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:55 -08:00
Joe Perches
c7e10c9956 Staging: Fix continuation line formats
String constants that are continued on subsequent lines with \
are not good.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:55 -08:00
Richard Kennedy
8455cd1bdb Staging: wlan-ng: minor cleanups
Remove iw_handle_def private initialisations as they are no longer need
these.

Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:55 -08:00
Joe Perches
bc56894234 Staging: Fix continuation line formats
String constants that are continued on subsequent lines with \
are not good.
Fixed a "is tryied" / tried typo

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:54 -08:00
Benjamin Adolphi
7df1735beb Staging: comedi: adq12b: Checkpatch cleanups 2
This fixes all checkpatch issues in the adq12b comedi driver.

Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:54 -08:00
Benjamin Adolphi
27aa732097 Staging: comedi: fl512: Checkpatch cleanups
This fixes all checkpatch issues in the fl512 comedi driver.

Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:54 -08:00
Benjamin Adolphi
d8dfb3882e Staging: comedi: ni_65xx: Checkpatch cleanups
This fixes all checkpatch issues in the ni_65xx comedi driver.

Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:54 -08:00
Benjamin Adolphi
c733110ae3 Staging: comedi: ni_670x: Checkpatch cleanups
This fixes all checkpatch issues in the ni_670x comedi driver.

Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:54 -08:00
Benjamin Adolphi
900b780885 Staging: comedi: ni_660x: Checkpatch cleanups
This fixes all checkpatch issues in the ni_660x comedi driver.

Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:54 -08:00
Benjamin Adolphi
94941bc805 Staging: comedi: poc: Checkpatch cleanups
This fixes all checkpatch issues in the poc comedi driver.

Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:54 -08:00
Benjamin Adolphi
b1e68ea5e1 Staging: comedi: pcm3730: Checkpatch cleanups
This fixes all checkpatch issues in the pcm3730 comedi driver.

Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:54 -08:00
Benjamin Adolphi
50ae2a521f Staging: comedi: pcm3724: Checkpatch cleanups
This fixes all checkpatch issues in the pcm3724 comedi driver.

Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:53 -08:00
Nitin Gupta
1130ebbaae Staging: ramzswap: Update copyright notice
Update copyright notice.

Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:53 -08:00
Nitin Gupta
c25d75a234 Staging: ramzswap: Handle case for invalid backing swap
Currently, we crash (issue BUG_ON) if backing swap
disk size is zero. This can happen is user specified
an extended partition or simply a bad disk as backing
swap. A crash is really an unpleasant surprise to user
for such trivial problems.

Now, we check for this condition and simply fail device
initialization if this is the case.

Additional cleanups:
 * use static for all functions
 * remove extra newline between functions
 * memset backing_swap_name to NULL on device reset

Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:53 -08:00
Nitin Gupta
2e88228174 Staging: ramzswap: Remove redundant check for zero page
ramzswap_free_page() already handles the case for zero filled
pages. So, remove redundant logic for the same in ramzswap_write().

Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:53 -08:00
Nitin Gupta
de1a21a0f1 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.

Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:53 -08:00
Nitin Gupta
5d83d5a0b5 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.

Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:53 -08:00
Nitin Gupta
7eef753390 Staging: ramzswap: Flush block device before reset
Make sure we flush block device before freeing all metadata
during reset ioctl.

Signed-off-by: Nitin Gupta <ngupta@vflar.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:53 -08:00
Nitin Gupta
6a90772886 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.

Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:53 -08:00
Larry Finger
1994130e4f Staging: r8187se: Fix a faulty if and do additional cleanups
Cleanup the driver and fix a faulty if statement.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested by: Bernhard Schiffner <bernhard@schiffner-limbach.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:53 -08:00
d binderman
e501b36bdf Staging: otus: fix memory leak
Fix memory leak in drivers/staging/otus

Signed-off-by: David Binderman <dcb314@hotmail.com>
2010-03-03 16:42:53 -08:00