1
0
Fork 0
Commit Graph

2982 Commits (28f27dcbd255b44a30bf75bb438fdb3415fda4c7)

Author SHA1 Message Date
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
Himanshu 411a861fc4 Staging: usbip: Seperate usbip config debug from CONFIG_USB_DEBUG
Signed-off-by: Himanshu <himanshu@symmetricore.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:52 -08:00
Himanshu Chauhan a439f5bff5 Staging: usbip: Remove dead code
This patch removes the dead uncompiled code in usbip_common.c

Signed-off-by: Himanshu Chauhan <himanshu@symmetricore.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:52 -08:00
Himanshu Chauhan aad86577b8 Staging: usbip: use print_hex_dump() instead of open coding it.
Signed-off-by: Himanshu Chauhan <himanshu@symmetricore.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:52 -08:00
Himanshu Chauhan 1e5065dbd6 Staging: usbip: minor code cleanup
Signed-off-by: Himanshu Chauhan <himanshu@symmetricore.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:52 -08:00
Alan Cox 22e0967f72 Staging: et131x_kill MAC_STAT_t
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:52 -08:00
Alan Cox bd03d0d5bc Staging: et131x: kill off the rxmac ctrl type
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:52 -08:00
Alan Cox fef5ba3ae9 Staging: et131x: kill the rxmac ERROR_REG_t
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:52 -08:00
Alan Cox dcb0789bb3 Staging: et131x: Kill MIF_CTL_t
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:52 -08:00
Alan Cox 370d52acf7 Staging: et131x: Kill the SPACE_AVAIL type
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:52 -08:00
Alan Cox f7ae1957ca Staging: et131x: Kill off the rxq_diag types
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:51 -08:00
Alan Cox 287acb63a5 Staging: et131x: Kill of the MCIF types
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:51 -08:00
Alan Cox b186f33137 Staging: et131x: kill off RXMAC_PF_CTRL_t
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:51 -08:00
Alan Cox 70a29a2408 Staging: et131x: Kill rxmac crc fields
More we don't need

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:51 -08:00
Alan Cox afa7e5ec93 Staging: et13x: kill off TXMAC_ERR_INT_t
This completes the structures within the txmac block so we can now
propogate a name change and type removal up a layer and clean up TXMAC as
well

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:51 -08:00
Alan Cox 003e52e85b Staging: et131x: Kill off the TXMAC_ERR_t type
This is another one we don't really need to do much to get rid of

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:51 -08:00
Alan Cox 1cb180dc9d Staging: et131x: kill txmac err count typedef
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:51 -08:00
Alan Cox 6720949d55 Staging: et131x: Kil the txmac type
Only used for one trivial thing so turn that into something trivial instead

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:51 -08:00
Alan Cox 69ea5fcb5e Staging: et131x: Collapse all the function definitions into one place
We have lots of tiny files right now that could be one

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:51 -08:00
Alan Cox ec7d9f6101 Staging: et131x: Kill unused error defines
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:50 -08:00
Alan Cox f1471660df Staging: et131x: kill MP_ERR_COUNTERS which is unused
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:50 -08:00
Alan Cox 8f12785dd0 Staging: et131x: Kill off RX_RING_t
This completes the typedef clean up of the rx specific structures, although
there is plenty do on field names and the like

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:50 -08:00
Alan Cox 4ba64c1ba5 Staging: et131x: clean up the pkt_desc_stat_t types
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:50 -08:00
Alan Cox 8a66278cf9 Staging: et131x: Clean up the fbr lookup table
All the subtypes are sane so just turn it into something struct and linux
like

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:50 -08:00
Alan Cox 07563ac691 Staging: et131x: Fix rx_status typing
Use the proper pointer types for the higher level pointers to the rx_status
object and kill casts

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:50 -08:00
Alan Cox f926d21650 Staging: et131x: rx_status_block_t is now clean
So kill off the top level type and turn it into a struct

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:50 -08:00
Alan Cox c9a8ad187a Staging: et131x: kill off the rx interrupt state enum
Another verbose enum we don't need

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:50 -08:00
Alan Cox 61aa21f208 Staging: et131x: Clean up the rx status word types
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:50 -08:00
Alan Cox dc26ffc772 Staging: et131x: Kill MAC_STAT_t
All the contents of this type are now clean, so kill the top level type
as well

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:50 -08:00
Alan Cox 461e0e8b15 Staging: et131x: Kill off MMC_t
The contents of MMC_t are clean so kill off the MMC_t typedef

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:49 -08:00
Alan Cox 060a78a07a Staging: et131x: Kill off TXDMA_t
All the contents are clean so kill off the top level typedefs

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:49 -08:00
Alan Cox 2b903327d3 Staging: et131x: GLOBAL_t is now sane so kill the GLOBAL_t itself
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:49 -08:00
Alan Cox 254472ac59 Staging: et131x: kill EXP_ROM
This is another unused type for the bin

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:49 -08:00
Alan Cox 61d5ed8c62 Staging: et131x: Kill off the rxdma type
We have a clean struct of this now so turn the top level typedefs into a
struct

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:49 -08:00
Alan Cox 1bd751c1ab Staging: et131x: Clean up rxdma_csr
This is another set of flags as typedef that can be cleaned up.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:49 -08:00
Alan Cox 13a79c697f Staging: et131x: fbr_desc is now only sane types
Clean up the typdef for fbr_desc itself so we know it is done

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:49 -08:00
Alan Cox 7d9e15eb31 Staging: et131x: kill of FBR_WORD2
This is only used meaningfully as a definition, we never mask and fetch the
bits apart

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:49 -08:00
Alan Cox 09b25c6fa3 Staging: et131x: kill off the FBR_NUM_DES type
This is another 10 bit value with the high bits clear, and where the
type doesn't get used anywhere properly anyway

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:49 -08:00
Dave Airlie 5fe68019c6 Staging: crystalhd: fix build on powerpc
Add necessary include to fix build on PowerPC

Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:49 -08:00
Dan Carpenter cffd4e16cd Staging: rtl8187se: fix if statement
I removed a misplace semicolon.  It is clear from the indentation that
TxPwrTracking87SE() was only supposed to be called if CheckTxPwrTracking()
returned true.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:48 -08:00
Ben Hutchings c22202faad Staging: rt{2860,2870}sta: Use request_firmware() to load firmware
When originally introduced into staging, these drivers had custom
firmware-loading code which checked a version number and CRC at the
end of each blob.  This reintroduces those checks, using crc-ccitt
instead of custom code.

The removed firmware will be added to the linux-firmware.git
repository.

Based on work by Darren Salt <linux@youmustbejoking.demon.co.uk>.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Tested-By: Darren Salt <linux@youmustbejoking.demon.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:48 -08:00
Ben Hutchings 8838d2560a Staging: rt2870sta: constify RTUSBMultiWrite(), RTUSBFirmwareWrite()
These functions do not modify the data they are passed.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:48 -08:00
Roel Kluin 35f077dca7 Staging: serqt_usb2: Two branches the same in qt_set_termios()
Regardless of the condition, the branches executed the same code

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:48 -08:00
Roel Kluin a2c3fdb996 Staging: rt2860/sta_ioctl.c: Two branches the same in rt_ioctl_giwscan()
Regardless of the condition, the branches execute the same code

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:48 -08:00
Ian Abbott 57ac827c9b Staging: comedi: pcl818: Remove unneeded chanlist_len check
For AI command testing, the driver does not need to range-check the
length of the channel list as the comedi core has already checked it.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:48 -08:00
Ian Abbott 64a1f7bd56 Staging: comedi: pcl816: Check channel list in AI command test
Check the channel list is valid in step 5 of the AI command test.
Split function check_and_setup_channel_list() in two.  Also, remove
unnecessary chanlist_len tests in step 3 of the AI command test as the
comedi core has already checked it.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:48 -08:00
Ian Abbott c203b521e6 Staging: comedi: pcl812: Update MUX for multi-channel AI command
For multi-channel AI commands, the interrupt handler is missing code to
switch to the next channel.  Add some (untested) code to handle this.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:48 -08:00
Ian Abbott 8f87b832de Staging: comedi: adv_pci1710: Remove unneeded chanlist_len check
For AI command testing, the driver does not need to range-check
the length of the channel list as the comedi core has already
checked it.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:48 -08:00
Ian Abbott 61283d227c Staging: comedi: adv_pci1710: Correct AI scan count and channel checks
For AI commands, the internal channel list used to check incoming
data was only set up partially if the channel list contained
repeats.  Set it up fully.  Also the current scan position was not
updated properly when moving a block of data from the FIFO unless
a whole number of scans was moved.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:47 -08:00
Ian Abbott b3559cb1aa Staging: comedi: pcl818: Correct AI scan counting and channel checks
For AI commands, the scan counter should be updated after every
scan.  It was being updated after every sample except for DMA mode
where it was being updated after every repeated segment of the
channel list.

Also AI commands with multiple channels were being terminated with
an error prematurely except in DMA mode.  This was because the
driver was comparing channel numbers received from the hardware
(combined with the sample value) with the expected channel numbers
to check for a "channel dropout".  This test was failing
incorrectly because the driver was not keeping the current position
within the (repeated segment of the) channel list up to date.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:47 -08:00
Ian Abbott 13de4f000e Staging: comedi: pcl816: Correct AI scan counting
For AI commands, the scan counter should be updated after every
scan.  In DMA mode, it was being updated after every repeated
segment of the channel list.  In non-DMA mode, it was being updated
after every sample.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:47 -08:00
Ian Abbott 7edfa10689 Staging: comedi: pcl812: Correct AI scan counting
The AI scan counter should be updated after every completed scan,
not after every channel.  Keep track of current channel.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:46 -08:00
Roel Kluin 6c381c5775 Staging: Comedi: G1-3 status registers not read in ni_gpct_to_660x_register()
Read from the right status register

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:46 -08:00
Benjamin Adolphi 615d5b6c56 Staging: comedi: pcl730: Checkpatch cleanups
This fixes all checkpatch issues in the pcl730 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:46 -08:00
Benjamin Adolphi acb60e915a Staging: comedi: pcl725: Checkpatch cleanups
This fixes all checkpatch issues in the pcl725 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:45 -08:00
Benjamin Adolphi 186539192c Staging: comedi: pcl724: Checkpatch cleanups
This fixes all checkpatch issues in the pcl724 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:45 -08:00
Benjamin Adolphi 266bfbdd3e Staging: comedi: pcl711: Checkpatch cleanups
This fixes some checkpatch issues in the pcl711 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:45 -08:00
Julia Lawall f51f903000 Staging: go7007: Eliminate useless code
The variable s is initialized twice to the same (side effect-free)
expression.  Drop one initialization.

A simplified version of the semantic match that finds this problem is:
(http://coccinelle.lip6.fr/)

// <smpl>
@forall@
idexpression *x;
identifier f!=ERR_PTR;
@@

x = f(...)
... when != x
(
x = f(...,<+...x...+>,...)
|
* x = f(...)
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:45 -08:00
Benjamin Adolphi 79a22d5c26 Staging: comedi: rti800: Checkpatch cleanups
This fixes some 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:45 -08:00
Benjamin Adolphi 23d53b1768 Staging: comedi: c6xdigio: Checkpatch cleanups
This fixes some checkpatch issues and some
spelling mistakes in the c6xdigio 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:45 -08:00
Benjamin Adolphi d2e01434fd Staging: comedi: adq12b: Checkpatch cleanups
This fixes some 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:45 -08:00
Roel Kluin 0289bb5d18 Staging: rtl8192u: ieee80211: CurrentMPDUDensity assigned to itself in HTUseDefaultSetting()
CurrentMPDUDensity was designed to itself.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:44 -08:00
Wu Zhangjin 3af805735a staging: sm7xx: remove the buggy 2D acceleration support
When scrolling the screen on the console with the 2D acceleration
support, the whole system may hang. for example, when copying some files
from another machine to YeeLoong netbook with the sm7xx video driver via
scp and when the screen output is enabled, the system may hang.

Before the bug is fixed, remove the 2D acceleration!

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Cc: Teddy Wang <teddy.wang@siliconmotion.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:44 -08:00
Uwe Kleine-König d5a2ffd8e8 staging: fix typos "couter" -> "counter"
This patch was generated by

        git grep -l 'couter' drivers/staging | xargs -r perl -p -i -e 's/couter/counter/'

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:44 -08:00
Uwe Kleine-König 9d220c6b54 staging: fix typos "aquire" -> "acquire"
This patch was generated by

    git grep -E -i -l '[Aa]quire' drivers/staging | xargs -r perl -p -i -e 's/([Aa])quire/$1cquire/'

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:44 -08:00
Uwe Kleine-König a82fd70197 staging: fix typos "selct" -> "select"
This patch was generated by

	git grep -E -i -l 's(le|el)ct' drivers/staging | xargs -r perl -p -i -e 's/([Ss])(le|el)ct/$1elect/'

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:44 -08:00
Uwe Kleine-König 1832664ae1 staging: fix typos "enalbe" -> "enable"
This patch was generated by

	git grep -E -l 'enalbe' drivers/staging | xargs -r perl -p -i -e 's/enalbe/enable/g'

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:44 -08:00
Andy Shevchenko 9f64859208 staging: wlags49: don't use custom implementation of atoi()
Kernel has its own method called simple_strtoul() to do such things.

Here we are using simple_strtoul(value, NULL, 0) because in original function
the recognized base is 10 or 16 and input data is assumed to be unsigned.

Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:44 -08:00
Ben Hutchings e4c3a24dc5 Staging: sep: declare MODULE_FIRMWARE
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:43 -08:00
Ben Hutchings 4401e8243d Staging: sep: include driver name in firmware filenames
The current names "cache.image.bin" and "resident.image.bin" are far
too generic.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:43 -08:00
Ben Hutchings 5d929a7190 staging: declare MODULE_FIRMWARE in various drivers
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:43 -08:00
Pavel Vasilyev 32dbb67138 Staging: dream: HTC Dream camera, not need sizeof
http://bugzilla.kernel.org/show_bug.cgi?id=14825

sizeof(extlen), always will be sizeof( unit32_t) or 4
It seems that something is wrong?!?!

Signed-off-by: Pavel Vasilyev <pavel@pavlinux.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:43 -08:00
Jeff Mahoney 362f46e3ab Staging: vme/tsi148: Depend on VIRT_TO_BUS
This driver depends on virt_to_bus working correctly, but it doesn't
exist on ppc64 (and probably other arches).

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:43 -08:00
Jeff Mahoney 2363912652 Staging: otus: fix assignment makes integer from pointer without a cast warnings
This patch fixes some %x pointer printing to %p.

It also uses the skb_tail_pointer and skb_mac_header macros for accessing
thos members.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:43 -08:00
Jeff Mahoney ab59186c75 Staging: rtl8192u: dont use -mhard-float
rtl8192u uses -mhard-float, which doesn't exist on ia64. Since in-kernel
floating-point isn't allowed, this is implied anyway.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:43 -08:00
Jeff Mahoney 1c7ec2e8e0 Staging: rtl8192e: Use skb_tail_pointer
rtl8192e uses skb->tail directly. This patch uses the tail pointer macros
instead.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:43 -08:00
Jeff Mahoney 53cf8743d2 Staging: rt2860: Use skb_tail_pointer
rt2860 uses skb->tail directly. This patch uses the tail pointer macros
instead.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:42 -08:00
Minchan Kim 3bf040c752 Staging: ramzswap: Free memory when create_device is failed
If create_device is failed, it can't free gendisk and request_queue of
preceding devices. It cause memory leak.

This patch fixes it.

Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
Acked-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:42 -08:00
Németh Márton b76a32638d staging: make i2c device id constant
The id_table field of the struct i2c_driver is constant in <linux/i2c.h>
so it is worth to make the initialization data also constant.

The semantic match that finds this kind of pattern is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
disable decl_init,const_decl_init;
identifier I1, I2, x;
@@
	struct I1 {
	  ...
	  const struct I2 *x;
	  ...
	};
@s@
identifier r.I1, y;
identifier r.x, E;
@@
	struct I1 y = {
	  .x = E,
	};
@c@
identifier r.I2;
identifier s.E;
@@
	const struct I2 E[] = ... ;
@depends on !c@
identifier r.I2;
identifier s.E;
@@
+	const
	struct I2 E[] = ...;
// </smpl>

Signed-off-by: Németh Márton <nm127@freemail.hu>
Cc: Julia Lawall <julia@diku.dk>
Cc: cocci@diku.dk
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:42 -08:00
Németh Márton a457732b83 staging: make USB device id constant
The id_table field of the struct usb_device_id is constant in <linux/usb.h>
so it is worth to make the initialization data also constant.

The semantic match that finds this kind of pattern is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
disable decl_init,const_decl_init;
identifier I1, I2, x;
@@
	struct I1 {
	  ...
	  const struct I2 *x;
	  ...
	};
@s@
identifier r.I1, y;
identifier r.x, E;
@@
	struct I1 y = {
	  .x = E,
	};
@c@
identifier r.I2;
identifier s.E;
@@
	const struct I2 E[] = ... ;
@depends on !c@
identifier r.I2;
identifier s.E;
@@
+	const
	struct I2 E[] = ...;
// </smpl>

Signed-off-by: Németh Márton <nm127@freemail.hu>
Cc: Julia Lawall <julia@diku.dk>
Cc: cocci@diku.dk
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:42 -08:00
Németh Márton 13ac58dac0 staging: make PCI device id constant
The id_table field of the struct pci_driver is constant in <linux/pci.h>
so it is worth to make the initialization data also constant.

The semantic match that finds this kind of pattern is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
disable decl_init,const_decl_init;
identifier I1, I2, x;
@@
	struct I1 {
	  ...
	  const struct I2 *x;
	  ...
	};
@s@
identifier r.I1, y;
identifier r.x, E;
@@
	struct I1 y = {
	  .x = E,
	};
@c@
identifier r.I2;
identifier s.E;
@@
	const struct I2 E[] = ... ;
@depends on !c@
identifier r.I2;
identifier s.E;
@@
+	const
	struct I2 E[] = ...;
// </smpl>

Signed-off-by: Németh Márton <nm127@freemail.hu>
Cc: Julia Lawall <julia@diku.dk>
Cc: cocci@diku.dk
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:42 -08:00
Jonathan Cameron 75b16013e2 staging: iio: Fix incorrect existence check for a shared event pointer.
A second smatch detected error. First part fixes in a typo
in the comment directly above that I noticed whilst trying
to remember what this code actually does. Second part is
the actual fix.  I'm fairly amazed this one never caused
trouble in testing as it is in one of the most common paths.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:42 -08:00
Jonathan Cameron 75c8075394 staging: iio: Ensure mutex is correctly unlocked in __iio_push_event
This error was picked up by running the smatch static
checker over all the IIO subsytem.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:42 -08:00
Simon Horman 0daa04a586 Staging: otus: zfTkipInit(): increment another pointer
Increment the pointer rather than its value.
These appear to be logic errors.

Thanks to Dan Carpenter for the first hunk of this change.

Cc: Dan Carpenter <error27@gmail.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:42 -08:00
horms@vergenet.net e36e8c0add Staging: otus: Fix ZM_SEQ_DEBUG macro for no-debug case
tcp_seq is only initialised in case where ZM_ENABLE_PERFORMANCE_EVALUATION
is defined. So move the call to ZM_SEQ_DEBUG() and the decleration of
tcp_seq in there too.  This allows ZM_SEQ_DEBUG() to be removed from the
non-ZM_ENABLE_PERFORMANCE_EVALUATION case in the header file.

This resolves several compile warnings for the
non-ZM_ENABLE_PERFORMANCE_EVALUATION case.
However, the ZM_ENABLE_PERFORMANCE_EVALUATION
case seems to be completely broken.

$ gcc (Debian 4.4.2-8) 4.4.2
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ make
...
drivers/staging/otus/80211core/cagg.c: In function 'zfAggRxEnabled':
drivers/staging/otus/80211core/cagg.c:1872: warning: left-hand operand of
comma expression has no effect
drivers/staging/otus/80211core/cagg.c:1872: warning: left-hand operand of
comma expression has no effect
drivers/staging/otus/80211core/cagg.c:1872: warning: statement with no
effect
...

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:41 -08:00
horms@vergenet.net 3db96cd871 Staging: otus: remove unused constants
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:41 -08:00
horms@vergenet.net d74385fd9c Staging: otus: remove unused variables
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:41 -08:00
horms@vergenet.net d027936949 Staging: otus: dont mix declarations and code
$ gcc (Debian 4.4.2-8) 4.4.2
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ make
...
drivers/staging/otus/ioctl.c: In function 'usbdrv_wpa_ioctl':
drivers/staging/otus/ioctl.c:2253: warning: ISO C90 forbids mixed declarations and code
...

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:41 -08:00
Jarod Wilson 90d49b4f32 staging: crystalhd: trim register defines
We don't actually need most of the register defines to build,
and most of the ones we don't need aren't currently interesting.

We'll leave a full copy of all of them in libcrystalhd's source,
and only include what we need and/or think might be interesting
in the driver.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:41 -08:00
Jarod Wilson 88d4300009 staging: crystalhd: add missing fixes for userspace lib build
I somehow managed to not actually include these two fixes in the submission
that was committed to the staging tree. libcrystalhd should eventually be
built against the kernel-provided header, and needs the stdint.h include. The
VOID bit is to keep things in sync with the Mac OS X driver and library that
Scott Davilla is also working on.

Signed-off-by: Scott Davilla <davilla@4pi.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:41 -08:00
Peter Huewe 8a8e29752d Staging: wlan-ng: Add select WEXT_PRIV to Kconfig to prevent build failure
Without WEXT_PRIV set the p80211wext.c fails to build due to unknown fields in
the iw_handler_def struct.
Those fields are enclosed in WEXT_PRIV conditionals in the prototype
of iw_handler_def in include/net/iw_handler.h

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Acked-by: Simon Horman <horms@verge.net.au>
Cc: stable <stable@kernel.org>  [2.6.33 only]
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:41 -08:00
Peter Huewe 733acf902f Staging: rtl8192u: Add select WEXT_PRIV to Kconfig to prevent build failure
Without WEXT_PRIV set the driver fails to build due to unknown fields in
the iw_handler_def struct.
Those fields are enclosed in WEXT_PRIV conditionals in the prototype
of iw_handler_def in include/net/iw_handler.h

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Acked-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:41 -08:00
Peter Huewe 95702ef05b Staging: otus: Add select WEXT_PRIV to Kconfig to prevent build failure
Without WEXT_PRIV set the driver fails to build due to unknown fields in
the iw_handler_def struct.
Those fields are enclosed in WEXT_PRIV conditionals in the prototype
of iw_handler_def in include/net/iw_handler.h

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Acked-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:40 -08:00
Peter Huewe 0df28be06e Staging: asus_oled: Add NULL test for kmalloc
This patch adds a NULL test to check wether kmalloc was successful or
not.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:40 -08:00
Alexander Beregalov c424d46fdc staging: cx25821: avoid NULL pointer dereference
Assign dev only if fh is not NULL.

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:40 -08:00
Roel Kluin 267c39c918 Staging: v56655: add missing parentheses (in comment)
`!' has a higher precedence than `&' so parentheses are required.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:40 -08:00
Andrew Lunn 9d4682d070 Staging: batman-adv: Update the README for mainline usage.
The module now only compiles inside mainline, so remove the comments
about different versions of the kernel it can be used with. Also
update comments about building with debug enabled and how to use the
VIS data now that it no longer natively outputs dot or JSON.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:40 -08:00
Evgeniy Polyakov 182374a0bd Staging: Fixed pohmelfs regression because of per-bdi writeback.
Since pohmelfs isn't tied to a single block device, it needs to setup a
backing dev like nfs/btrfs/etc do.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:40 -08:00
Dan Carpenter e3c0acf44d Staging: pohmelfs: avoid null dereference
err_out_put is for when the netfs_trans_alloc() succeeded.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:40 -08:00
Joe Perches 0c14c06cc1 Staging: pohmelfs: Remove uses of NIPQUAD, use %pI4
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:40 -08:00
Alan Cox 74e1cd4555 Staging: sep: Fix use of legacy ioctl fop
SEP doesn't need lock_kernel.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:40 -08:00
Alan Cox db376005ab Staging: sep: Fix build problems from header changes
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:39 -08:00
Roel Kluin 274350fe40 Staging: otus: 80211core: Fix &&/|| confusion
This always evaluates to true.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:39 -08:00
Benjamin Adolphi f3557cc180 Staging: rar: Fix all coding style issues.
This fixes all coding style issues and some spelling mistakes.

Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:39 -08:00
Dan Carpenter 88e05d854c Staging: rtl8192su: buffer overflow in r8192U_core.c
There was a buffer overflow in the original code.  rf_path was 2 and it should
have been only 0 or 1.

I don't have the hardware for this, so I can't test it.

Looking at the code, there are two almost identical sections for updating the
hal variables.  The first one was clearly wrong and had the array overflow as 
well.  The second one looked correct.  I decided to use the second section as
is except for whitespace changes.

The differences between the two original sections:
1)  The second one had more debug output.
2)  The second one looped over rf_path instead of corrupting data.
3)  The second one had these additional assigments.
                      if (rf_path == 0) {
                              priv->TxPowerLevelOFDM24G[i] = priv->RfTxPwrLevelOfdm1T[rf_path][i] ;
                              priv->TxPowerLevelCCK[i] = priv->RfTxPwrLevelCck[rf_path][i];
                      }

Signed-off-by: Dan Carpenter <error27@gmail.com>
Cc: Jerry chuang <wlanfae@realtek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:39 -08:00
H Hartley Sweeten 00367a6d7c Staging: vt6655/device_main.c: use %pM to shown MAC address
Trivial, use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:39 -08:00
H Hartley Sweeten 6756993baf r8192U_core.c: use %pM to shown MAC address
Trivial, use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:39 -08:00
H Hartley Sweeten 820793c396 Staging: r8192E_core.c: use %pM to shown MAC address
Trivial, use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:39 -08:00
H Hartley Sweeten 28a2333413 Staging: et131x_netdev.c: use %pM to shown MAC address
Trivial, use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Olaf Hartmann <o.hartmann@telovital.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:39 -08:00
Dan Carpenter 1c7e4a7c32 Staging: otus: off by one in usbdrvwext_siwessid()
A 33 char ESSID is too long and it could cause a buffer overflow
a couple lines below when we put a NULL terminator on the end.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:39 -08:00
Dan Carpenter ed30013207 Staging: cx25821: off by one in cx25821_enum_input()
The INPUT(n) macro indexes an array of size 2.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:38 -08:00
Dan Carpenter 7a02f549fc Staging: cx25821: fix double unlock in medusa_video_init()
medusa_set_videostandard() takes the lock but it always drops it before
returning.

This was found with a static checker and compile tested only.  :/

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:38 -08:00
Dan Carpenter 4b2ba24399 Staging: comedi: reorder check in pcmmio_attach()
The check for dio_num_asics is used to determine if there is more than 1 irq.
If it is false then irq[1] is past the end of the array.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:38 -08:00
Dan Carpenter 5d3aed7424 Staging: comedi: off by one in doDevConfig()
Changed > to >= to avoid array overflow.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:38 -08:00
C yp ef4ffb7ade Staging: ramzswap: Minor spelling fixes
Also removed an extra semicolon.

Signed-off-by: Cyp <cyp561@gmail.com>
Cc: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:38 -08:00
Simon Horman 2141ec629c Staging: dt3155: remove compat code
Remove compatibility code as this is not an older version of the kernel.

Signed-off-by: Simon Horman <horms@verge.net.au>
Cc: Scott Smedley <ss@aao.gov.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:38 -08:00
Simon Horman cf137d5c49 Staging: rtl8192su, rtl8192u: use min_t() in store_debug_level()
sizeof() returns a size_t but the other types involved
are unsigned long, so using min() results in a warning.

As sizeof() is called on an 11 character buffer defined
immediately above unsigned long is obviously wide enough
for the result.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:38 -08:00
Simon Horman 27b93f80e4 Staging: rtl8192e: remove some functions from the __exit section
ieee80211_crypto_tkip_exit(), ieee80211_crypto_deinit() and
ieee80211_crypto_ccmp_exit() are called by ieee80211_rtl_init()
which are in section __init, so they can't be in section __exit.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:38 -08:00
Simon Horman 9bfafe825d Staging: rtl8192e: print the elements of tx_pn and rx_pn not the arrays themselves
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:38 -08:00
Simon Horman db15438cd5 Staging: rt2870: Remove unnecessary forward declarations
Remove unnecessary forward declaration of rtusb_probe() and rtusb_disconnect()

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:38 -08:00
Simon Horman c33c2065fc Staging: rt2870: rtusb_probe() should be in section __devinit
$ make CONFIG_DEBUG_SECTION_MISMATCH=y
WARNING: drivers/staging/rt2870/rt2870sta.o(.text+0x2f4c5): Section
mismatch in reference from the function rtusb_probe() to the function .devinit.text:rt2870_probe()
The function rtusb_probe() references
the function __devinit rt2870_probe().
This is often because rtusb_probe lacks a __devinit
annotation or the annotation of rt2870_probe is wrong.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:37 -08:00
Simon Horman 6910dadf3f Staging: DT3155: Use pci_get_device()
The use of pci_find_device() is deprecated.

Signed-off-by: Simon Horman <horms@verge.net.au>
Cc: Scott Smedley <ss@aao.gov.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:37 -08:00
Greg Kroah-Hartman c22090facd Staging: hv: match on DMI values to know if we should run.
The HV core mucks around with specific irqs and other low-level stuff
and takes forever to determine that it really shouldn't be running on a
machine.  So instead, trigger off of the DMI system information and
error out much sooner.  This also allows the module loading tools to
recognize that this code should be loaded on this type of system.

Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:37 -08:00
Greg Kroah-Hartman 9a775dbd4e Staging: hv: add a pci device table
This allows the HV core to be properly found and autoloaded
by the system tools.

It uses the Microsoft virtual VGA device to trigger this.

Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:37 -08:00
Chris Nicholson 0fa37b1ee9 Staging: hv: fix brace coding style issue in Channel.c
This is a patch to the Channel.c file that fixes up a brace
warning found by checkpatch.pl

Signed-off-by: Chris Nicholson <chris.nicholson@cnick.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:37 -08:00
Haiyang Zhang f916a34dc0 Staging: hv: Rename struct device_context and re-arrange the fields inside
Rename struct device_context and re-arrange the fields inside.

Rename struct device_context to struct vm_device, and move struct device
field to the end according to Document/driver-model standard.

Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:37 -08:00
Hank Janssen 26c14cc119 Staging: hv: Add proper versioning to HV drivers
Provide proper versioning information for all HV drivers.

With removal of build time/date/and Minor number as requested by Greg KH

Signed-off-by: Hank Janssen    <hjanssen@microsoft.com>
Signed-off-by: Haiyang Zhang   <haiyang@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:37 -08:00
C. Bartlett 4408f5319b Staging: hv: fix various coding style issues in RingBuffer.c
This is a patch to the RingBuffer.c file that corrects various coding style
warnings and errors found by checkpatch.pl

[ The real solution here is to get rid of this file entirely, and use the
kernel's internal ring buffer api, but until then, make these changes so as to
make checkpatch.pl happy, and keep others from continuously sending this type
of patch. - gkh]

Signed-off-by: Craig Bartlett <c-bartlett@hotmail.co.uk>
Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Nicolas Palix <npalix@diku.dk>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:37 -08:00
Hank Janssen a73e6b7c50 Staging: hv: Remove xen legacy code and check for Hyper-V
Removed legacy XEN layer from hypervisor setup, and made sure only
Hyper-V is Is a valid hypervisor to run on.

Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:37 -08:00
Greg Kroah-Hartman 4f28900bcf Staging: hv: remove unneeded OnClose callback
This callback only calls one function, so just call the function
instead, no need for indirection at all.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:36 -08:00
Greg Kroah-Hartman 2d0753464b Staging: hv: remove unneeded OnOpen callback
This callback only calls one function, so just call the function
instead, no need for indirection at all.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:36 -08:00
Greg Kroah-Hartman 354b0a643e Staging: hv: remove unneeded OnHostReset callback
This callback only calls one function, so just call the function
instead, no need for indirection at all.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:36 -08:00
Greg Kroah-Hartman 99358ca725 Staging: hv: storvsc_drv: move unused functions
Now that the callback pointer was removed, we can remove
the code itself, as it is never used.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:36 -08:00
Greg Kroah-Hartman 65e65a3e73 Staging: hv: remove unneeded OnHostRescan callback
This callback was never called, so delete the thing.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:36 -08:00
Linus Lüssing 4230020c42 Staging: batman-adv: Dont deactivate aggregation on wrong input
A non-integer changes the aggregation mode. Therefore this patch changes
the behaviour to explicitly check strict_strtoul()'s return code.

Signed-off-by: Linus Lüssing <linus.luessing@web.de>
Acked-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:42:36 -08:00
Simon Wunderlich abad544658 Staging: batman-adv: Remove compat.h
Since we are now part of mainline, we don't need compat.h to allow
building of the module with old versions of the kernel.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:36 -08:00
Andrew Lunn b9b27e4ef6 Staging: batman-adv: Use printk(%pM) for MAC addresses
printk() since kernel version 2.6.29 has supported printing MAC
addresses directly, as an extension to the %p processing. This patch
makes use of this for printk() and bat_dbg(). This will remove the
overhead of using addr_to_string() which is normally never actually
output.

Fixed a typo found by Gus Wirth.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:36 -08:00
Andrew Lunn a9c2910aa1 Staging: batman-adv: Allow the MAC address to be set
Some embedded devices have very limited sources of entropy for the
random number generator. It has been observed that the random MAC
address on the interface bat0 is not always random. When testing with
a collection of identical hardware, sometimes the bat0 device the same
MAC address on multiple devices, causing mayhem. This patch allows the
MAC address to be set by the user.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:36 -08:00
Simon Wunderlich e70171957a Staging: batman-adv: receive packets directly using skbs
This patch removes the (ugly and racy) packet receiving thread and the
kernel socket usage. Instead, packets are received directly by registering
the ethernet type and handling skbs instead of self-allocated buffers.

Some consequences and comments:

 * we don't copy the payload data when forwarding/sending/receiving data
   anymore. This should boost performance.
 * packets from/to different interfaces can be (theoretically) processed
   simultaneously. Only the big originator hash lock might be in the way.
 * no more polling or sleeping/wakeup/scheduling issues when receiving
   packets
 * this might introduce new race conditions.
 * aggregation and vis code still use packet buffers and are not (yet)
   converted.
 * all spinlocks were converted to irqsave/restore versions to solve
   some lifelock issues when preempted. This might be overkill, some
   of these locks might be reverted later.
 * skb copies are only done if neccesary to avoid overhead

performance differences:

 * we made some "benchmarks" with intel laptops.
 * bandwidth on Gigabit Ethernet increased from ~500 MBit/s to ~920 MBit/s
 * ping latency decresed from ~2ms to ~0.2 ms

I did some tests on my 9 node qemu environment and could confirm that
usual sending/receiving, forwarding, vis, batctl ping etc works.

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Acked-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Acked-by: Marek Lindner <lindner_marek@yahoo.de>
Acked-by: Linus Lüssing <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:42:36 -08:00
Simon Wunderlich c4bf05d396 Staging: batman-adv: check all kmalloc()s
there are some kmallocs left which are not checked whether they succeeds or
not, which might lead to corrupted data structures if the system memory is
full. This patch should clean up the remaining unchecked kmalloc()s.

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:42:35 -08:00
Marek Lindner e9b764506a Staging: batman-adv: splitting /proc vis file into vis_server and vis_data
The /proc vis file was used to enable/disable the vis server and to output
the vis data at the same time. This behaviour was confusing and lacked a
proper method to display the current vis server status.
This patch seperates the 2 functionalities:
* use vis_server to enable/disable the vis server and to retrieve its status
* use vis_data to retrieve the vis raw data (if the server is enabled)

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:42:35 -08:00
Linus Luessing 6051d44cb1 Staging: batman-adv: remove obsoleted vis_format /proc file
batman-adv used to export the vis data using different formats that were
switchable via /proc/net/batman-adv/vis_format. The various formats moved
to user space and rendered this configuration switch useless.

Signed-off-by: Linus Luessing <linus.luessing@web.de>
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:42:35 -08:00
Andrew Lunn b801fede6b Staging: batman-adv: moving vis output formats out of the kernel
The batman-adv kernel module is able to output visualization data using the
dot draw or JSON format. This patch transforms the output into a generic
format (called vis raw). User space tool may convert the raw data to support
a variety of formats without the need of modifying the kernel module.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:35 -08:00
Marek Lindner b665aac8a7 Staging: batman-adv: fix minor orig table layout bug
The originator table contained a TAB instead of a space which broke
the layout as well as the batctl parser.

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:42:35 -08:00
Linus Lüssing 9bbf1ecdb3 Staging: batman-adv: Fixes rounding issues in vis.c
This patches fixes two rounding issues in vis.c for sending and
purging vis packets. Before, the timers and timeouts always got
rounded down to seconds, though we want a precision in
milliseconds.

This also fixes a kernel panic that occures when lowering the
timer for sending vis packets (vis_interval) to less than 1000ms
in main.c manually.

Signed-off-by: Linus Lüssing <linus.luessing@web.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:42:35 -08:00
Sven Eckelmann cec4a69cfc Staging: batman-adv: Use forw_bcast_list_lock always with disabled interrupts
forw_bcast_list_lock is spin_locked in both process and softirq context.
SoftIRQ calls the spinlock with disabled IRQ and normal process context
with enabled IRQs.

When process context is inside an spin_locked area protected by
forw_bcast_list_lock and gets interrupted by an IRQ, it could happen
that something tries to lock forw_bcast_list_lock again in SoftIRQ
context. It cannot proceed further since the lock is already taken
somewhere else, but no reschedule will happen inside the SoftIRQ
context. This leads to an complete kernel hang without any chance of
resurrection.

All functions called in process context must disable IRQs when they try
to get get that lock to to prevent any reschedule due to IRQs.

Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.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:42:35 -08:00
Simon Wunderlich 5ea84fa369 Staging: batman-adv: consistent spelling of "neighbors"
we have written "neighbors", "neighbours" and bad spelled versions of this
word, this patch should make it consistent.

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:42:35 -08:00
Simon Wunderlich b6c359767b Staging: batman-adv: initialize static hash iterators
instead of dynamically registering hash iterators, calling functions are
changed to register the iterator objects statically. The two advantages are:

 * no memory leaks when aborting from hash_iterate()
 * no calls to kmalloc/kfree, therefore a little faster/safer

Tested with 9 QEMU instances, no obvious regression found.

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:42:35 -08:00
Andrew Lunn 4ce21a7faf Staging: batman-adv: Replace KERN_DEBUG with bat_dbg
Ameya Palande requested we replace printk(KERN_DEBUG "") by pr_debug()
I decided it was better to use our debug macro.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:34 -08:00
Simon Wunderlich 183cd9ee54 Staging: batman-adv: update README for latest kernel
state in the README that we also (compile) support 2.6.32

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:42:34 -08:00
Sven Eckelmann acdfd0e088 Staging: batman-adv: Remove NULL pointer check
It is safe to call kfree(NULL) which makes this extra check unneeded. It
was found using checkpatch.pl from linux-2.6

Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Acked-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:42:34 -08:00
Roel Kluin 23a51a8061 Staging: rt2860: test off by one in RtmpAsicSendCommandToMcu()
`i' reaches 101 after the loop, so if it was 100 then it succeeded in
the last iteration. This is probably unlikely to cause problems.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:34 -08:00
Roel Kluin 716323c093 Staging: rtl8192u: ieee80211: add missing parentheses
not(!) has a higher precedence than bit and(&).

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:34 -08:00
Jarod Wilson 7963eb432b staging: add Broadcom Crystal HD driver
This patch supersedes the earlier ones sent by Manu Abraham to add
the Broadcom Crystal HD driver to the staging tree, per discussion
with him about it. I've been working with Broadcom's Naren Sankar
on this driver for a number of months, and had already talked Naren
about submitting this on Broadcom's behalf, didn't expect anyone
else to jump on submitting it as quickly as Manu did. ;)

This version is a one-shot deal, incorporating the original driver,
Manu's coding style clean-ups, udev device creation support from
Edgar 'gimli' Hucek, and a number of other small tweaks from myself
and Scott Davilla, the other individual who has been working closely
on this code with Naren and I.

I've tested this iteration of the code lightly on a mini pci-e board
in a ThinkPad T61p running x86_64 Fedora 12, with the expected results,
and will test further on other systems with other variants of the card
(I have three varieties of this device currently in hand). Scott has
also tested on assorted primarily i686 varieties of Ubuntu, and Naren
has tested with both Fedora and Ubuntu, iirc.

Note: only the 70012 is currently supported by this driver, 70015
support will follow later. Also note that Blu-Ray support isn't
enabled (at the firmware level), due to misc fun related to the
BD encryption scheme, DRM, etc. :\

I *do* have a git tree containing the driver, lib, gst plugin and
firmware that I'm working from at the moment[*], as there are inter-
dependencies between the driver and lib, and the driver can be used
with kernels going a ways back (I've only tested back to 2.6.18 as
it exists in Red Hat Enterprise Linux 5). I'm exporting from there,
into a linux-next tree, then generating patches from there. The goal
is to feed everything upstream as quickly as possible, but there are
users who want this code for earlier kernels too...

The firmware will be submitted for inclusion in dwmw2's linux-firmware
tree once there is a suitable redistribution-no-modification type of
license on it (I believe Naren is working with Broadcom legal to get
that in place).

Changelog from initial Broadcom release to here:

commit d20475d444610c5683d09e63f707f5bb22359062
Author: Jarod Wilson <jarod@redhat.com>
Date:   Mon Jan 4 13:55:16 2010 -0500

    include: lib doesn't build w/o the removed stdint include
    
    So add it back...
    
    Signed-off-by: Jarod Wilson <jarod@redhat.com>

commit c181070a330530b792d2b80e3ec6ab12a5a57394
Author: Scott Davilla <davilla@4pi.com>
Date:   Mon Jan 4 13:38:37 2010 -0500

    include: don't define VOID if its already defined
    
    Signed-off-by: Scott Davilla <davilla@4pi.com>
    Signed-off-by: Jarod Wilson <jarod@redhat.com>

commit 33d8a2b691e81212e398f53770578d79650bf0bc
Author: Jarod Wilson <jarod@redhat.com>
Date:   Mon Jan 4 13:12:10 2010 -0500

    driver: create crystalhd device using udev
    
    Based on:
    http://sourceforge.net/apps/trac/archvdr/browser/trunk/archvdr/crystalhd/use_udev.patch
    
    Signed-off-by: Edgar ( gimli ) Hucek <ebsi4711 at gmail dot com>
    
    Formatting tweaks, error-handling path fixups and any bugs added by Jarod.
    
    Signed-off-by: Jarod Wilson <jarod@redhat.com>

commit c44c64dea5537814796fcbe2d9db0209383c78b9
Author: Manu Abraham <abraham.manu@gmail.com>
Date:   Mon Jan 4 10:32:47 2010 -0500

    crystalhd: coding style cleanups
    
    Signed-off-by: Manu Abraham <abraham.manu@gmail.com>
    Signed-off-by: Jarod Wilson <jarod@redhat.com>

commit cffa6da7467ff697a656d1dfff54bb0513a053dc
Author: Jarod Wilson <jarod@redhat.com>
Date:   Mon Jan 4 10:17:27 2010 -0500

    crystalhd: run dos2unix over everything, this is linux source...
    
    Signed-off-by: Jarod Wilson <jarod@redhat.com>

commit 7fa38a282db7af5a5746055f7c6cef8a9b8ee138
Author: Jarod Wilson <jarod@redhat.com>
Date:   Mon Jan 4 10:02:33 2010 -0500

    crystalhd: initial import of released Broadcom code
    
    Straight import of:
    http://www.broadcom.com/docs/support/crystalhd/crystalhd_linux_20091229.zip
    
    Unfortunately, we're unable to publicly publish all the history that got
    us from the initial internal code to what was released here, but such is
    life, we can just be happy we've got this open-sourced now. :)
    
    Signed-off-by: Jarod Wilson <jarod@redhat.com>

Signed-off-by: Naren Sankar <nsankar@broadcom.com>
Signed-off-by: Scott Davilla <davilla@4pi.com>
Signed-off-by: Manu Abraham <abraham.manu@gmail.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:34 -08:00
Greg Kroah-Hartman ca1f29c01a Staging: altpciechdma: remove driver
No one seems to be able to maintain this, or merge it into mainline, so
remove it.

Acked-by: Leon Woestenberg <leon@sidebranch.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:34 -08:00
Greg Kroah-Hartman 2d629030ca Staging: p9auth: remove driver from tree
No one seems to be maintaining this anymore, and it is not on any
track to be merged to mainline.

Cc: Ashwin Ganti <ashwin.ganti@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:33 -08:00
Greg Kroah-Hartman a945db6543 staging: remove the b3dfg driver
It has no users, and no developers to maintain it to get
it merged into mainline.

So sad.

Cc: Daniel Drake <ddrake@brontes3d.com>
Cc: Justin Bronder <jsbronder@brontes3d.com>
Cc: Duane Griffin <duaneg@dghda.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:33 -08:00
Greg Kroah-Hartman 8c6356e2a5 Staging: dt3155: coding style cleanups for the .h files
This cleans up some of the coding style issues in the .h files.

More remains to be done.

Cc: Scott Smedley <ss@aao.gov.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:33 -08:00
Greg Kroah-Hartman 1769fd86e1 Staging: dt3155: coding style cleanups for allocator code
This fixes up the worst of the coding style errors for the
allocator code.

Cc: Scott Smedley <ss@aao.gov.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:33 -08:00
Simon Horman 8125e2f668 Staging: wlan-ng: initialise mibitem
$ gcc --version

gcc (Debian 4.4.2-5) 4.4.2
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ make
...
drivers/staging/wlan-ng/p80211wext.c: In function ‘p80211wext_dorequest’:
drivers/staging/wlan-ng/p80211wext.c:139: warning: ‘mibitem.len’ is used uninitialized in this function
drivers/staging/wlan-ng/p80211wext.c:139: warning: ‘mibitem.status’ is used uninitialized in this function
drivers/staging/wlan-ng/p80211wext.c: In function ‘p80211wext_giwretry’:
drivers/staging/wlan-ng/p80211wext.c:967: warning: ‘mibitem.len’ is used uninitialized in this function
drivers/staging/wlan-ng/p80211wext.c:967: warning: ‘mibitem.status’ is used uninitialized in this function
drivers/staging/wlan-ng/p80211wext.c:967: warning: ‘mibitem.data’ is used uninitialized in this function
drivers/staging/wlan-ng/p80211wext.c: In function ‘p80211wext_siwretry’:
drivers/staging/wlan-ng/p80211wext.c:1057: warning: ‘mibitem.len’ may be used uninitialized in this function
drivers/staging/wlan-ng/p80211wext.c:1057: warning: ‘mibitem.status’ may be used uninitialized in this function
drivers/staging/wlan-ng/p80211wext.c: In function ‘p80211wext_giwtxpow’:
drivers/staging/wlan-ng/p80211wext.c:1149: warning: ‘mibitem.len’ is used uninitialized in this function
drivers/staging/wlan-ng/p80211wext.c:1149: warning: ‘mibitem.status’ is used uninitialized in this function
drivers/staging/wlan-ng/p80211wext.c:1149: warning: ‘mibitem.data’ is used uninitialized in this function
drivers/staging/wlan-ng/p80211wext.c: In function ‘p80211wext_siwtxpow’:
drivers/staging/wlan-ng/p80211wext.c:1123: warning: ‘mibitem.len’ may be used uninitialized in this function
drivers/staging/wlan-ng/p80211wext.c:1123: warning: ‘mibitem.status’ may be used uninitialized in this function
drivers/staging/wlan-ng/p80211wext.c: In function ‘p80211wext_giwfrag’:
drivers/staging/wlan-ng/p80211wext.c:891: warning: ‘mibitem.len’ is used uninitialized in this function
drivers/staging/wlan-ng/p80211wext.c:891: warning: ‘mibitem.status’ is used uninitialized in this function
drivers/staging/wlan-ng/p80211wext.c:891: warning: ‘mibitem.data’ is used uninitialized in this function
drivers/staging/wlan-ng/p80211wext.c: In function ‘p80211wext_siwfrag’:
drivers/staging/wlan-ng/p80211wext.c:933: warning: ‘mibitem.len’ may be used uninitialized in this function
drivers/staging/wlan-ng/p80211wext.c:933: warning: ‘mibitem.status’ may be used uninitialized in this function
drivers/staging/wlan-ng/p80211wext.c: In function ‘p80211wext_giwrts’:
drivers/staging/wlan-ng/p80211wext.c:826: warning: ‘mibitem.len’ is used uninitialized in this function
drivers/staging/wlan-ng/p80211wext.c:826: warning: ‘mibitem.status’ is used uninitialized in this function
drivers/staging/wlan-ng/p80211wext.c:826: warning: ‘mibitem.data’ is used uninitialized in this function
drivers/staging/wlan-ng/p80211wext.c: In function ‘p80211wext_siwrts’:
drivers/staging/wlan-ng/p80211wext.c:866: warning: ‘mibitem.len’ may be used uninitialized in this function
drivers/staging/wlan-ng/p80211wext.c:866: warning: ‘mibitem.status’ may be used uninitialized in this function
drivers/staging/wlan-ng/p80211wext.c: In function ‘p80211wext_giwrate’:
drivers/staging/wlan-ng/p80211wext.c:775: warning: ‘mibitem.len’ is used uninitialized in this function
drivers/staging/wlan-ng/p80211wext.c:775: warning: ‘mibitem.status’ is used uninitialized in this function
drivers/staging/wlan-ng/p80211wext.c:775: warning: ‘mibitem.data’ is used uninitialized in this function
drivers/staging/wlan-ng/p80211wext.c: In function ‘p80211wext_giwfreq’:
drivers/staging/wlan-ng/p80211wext.c:273: warning: ‘mibitem.len’ is used uninitialized in this function
drivers/staging/wlan-ng/p80211wext.c:273: warning: ‘mibitem.status’ is used uninitialized in this function
drivers/staging/wlan-ng/p80211wext.c:273: warning: ‘mibitem.data’ is used uninitialized in this function
drivers/staging/wlan-ng/p80211wext.c: In function ‘p80211wext_siwfreq’:
drivers/staging/wlan-ng/p80211wext.c:320: warning: ‘mibitem.len’ may be used uninitialized in this function
drivers/staging/wlan-ng/p80211wext.c: In function ‘p80211wext_siwmode’:
drivers/staging/wlan-ng/p80211wext.c:401: warning: ‘mibitem.len’ may be used uninitialized in this function
drivers/staging/wlan-ng/p80211wext.c:401: warning: ‘mibitem.status’ may be used uninitialized in this function
...

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:33 -08:00
Simon Horman e8ffaa3a06 Staging: prism2-usb: Build should select WIRELESS_EXT
The prevailing idiom is to select WIRELESS_EXT not depend on it.

Depending leaves this driver in a situation where it can only
be built if another driver that selects WIRELESS_EXT has been enabled.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:33 -08:00
Simon Horman d512a142f0 Staging: rtl8192su: Use z format qualifier for output of sizeof()
$ gcc --version
gcc (Debian 4.4.2-5) 4.4.2
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ make
...
drivers/staging/rtl8192su/ieee80211/rtl819x_BAProc.c: In function ‘ieee80211_rx_ADDBAReq’:
drivers/staging/rtl8192su/ieee80211/rtl819x_BAProc.c:342: warning: format ‘%ld’ expects type ‘long int’, but argument 3 has type ‘unsigned int’
drivers/staging/rtl8192su/ieee80211/rtl819x_BAProc.c: In function ‘ieee80211_rx_ADDBARsp’:
drivers/staging/rtl8192su/ieee80211/rtl819x_BAProc.c:443: warning: format ‘%ld’ expects type ‘long int’, but argument 3 has type ‘unsigned int’
drivers/staging/rtl8192su/ieee80211/rtl819x_BAProc.c: In function ‘ieee80211_rx_DELBA’:
drivers/staging/rtl8192su/ieee80211/rtl819x_BAProc.c:573: warning: format ‘%ld’ expects type ‘long int’, but argument 3 has type ‘unsigned int’
...

Also some style fixes for these lines:
+ Fix excessively long lines
+ Remove leading space before struct
+ Remove unnecessary parentheses

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:33 -08:00
Simon Horman 784d311947 Staging: rtl8192su: Build should select WIRELESS_EXT
The prevailing idiom is to select WIRELESS_EXT not depend on it.

Depending leaves this driver in a situation where it can only
be built if another driver that selects WIRELESS_EXT has been enabled.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:33 -08:00
Justin Madru 8c172dde41 Staging: s5k3e2fx.c: simplify complexity by factoring
the code was looping, setting s_move[i] to the following calculations

if (actual_step>= 0)
         s_move[i] = ((((i + 1) * gain + 0x200) - (i * gain + 0x200)) / 0x400);
else
         s_move[i] = ((((i + 1) * gain - 0x200) - (i * gain - 0x200)) / 0x400);

but, this code reduces to the expression
	s_move[i] = gain>>  10;

The reason for the complexity was to generate a step function with
integer division and rounding to land on specific values. But these calculations
can be simplified to the following code:

	gain = ((actual_step<<  10) / 5)>>  10;
	for (i = 0; i<= 4; i++)
		s_move[i] = gain;

Signed-off-by: Justin Madru<jdm64@gawab.com>
Reviewed-by: Ray Lee<ray-lk@madrabbit.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:33 -08:00
Pekka Enberg 096417e087 Staging: w35und: Remove unused typedefs MLME_DEAUTHREQ_PARA and MLME_DISASSOCREQ_PARA
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:32 -08:00
Pekka Enberg 8fab4020fa Staging: w35und: Remove unused typedef RXLAYER1
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:32 -08:00
Pekka Enberg 2b6e6df4d9 Staging: w35und: Remove unused typedef TXRETRY_REC
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:32 -08:00
Pekka Enberg 23b0dce239 Staging: w35und: Remove unused typedef CHAN_LIST
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:32 -08:00
Pekka Enberg 440a233db4 Staging: w35und: Convert typedef ChanInfo to struct chan_info
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:32 -08:00
Pekka Enberg 395af56182 Staging: w35und: Remove unused typedef _EVENTLOG
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:32 -08:00