dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

4008 Commits

Author SHA1 Message Date
Sven Eckelmann 8bfe363874 Staging: batman-adv: Ignore debugfs on kernels without debugfs support
All code for debugfs is ignored when the creation of the batman-adv root
directory in debugfs fails. It must also be ignored when the
debugfs_create_dir tells us that debugfs is not implemented to prevent
possible crashes in the future.

Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-22 14:05:05 -07:00
Sven Eckelmann 42fa1b92ab Staging: batman-adv: Mark locally used symbols as static
Functions and variables which are used only inside one object file can
be declared as static. This helped to find unused functions/variables

 * mainIfAddr_default
 * main_if_was_up

and functions with declarations but missing definitions

 * hash_debug
 * orig_find
 * send_own_packet_work

Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-22 14:05:05 -07:00
Joe Perches 516c9a7778 Staging: batman-adv: Convert MAC_FMT to %pM
Remove the last uses of MAC_FMT

Signed-off-by: Joe Perches <joe@perches.com>
[sven.eckelmann@gmx.de: Adapted for current batman-adv version]
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-22 14:05:04 -07:00
Marek Lindner 1bcb164e5d Staging: batman-adv: remove superfluous hint to "translation table"
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
[sven.eckelmann@gmx.de: Rework on top of current version]
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-22 14:05:04 -07:00
Marek Lindner 3a632cc71a Staging: batman-adv: convert all sysfs files to single value files
This patch removes the extra usage output which came when
the sysfs files were read.

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-22 14:05:04 -07:00
Sven Eckelmann 4caecbc039 Staging: batman-adv: Move tables from sysfs to debugfs
Files which represent more than a single attribute aren't allowed in
sysfs. As we have some files which aren't essential and are lists or
tables aggregated from data from different places inside batman-adv, we
must place them in a filesystem without such a restriction.

Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-22 14:05:03 -07:00
Sven Eckelmann c41214328a Staging: batman-adv: Move device for icmp injection to debugfs
batctl uses /dev/batman-adv to send special batman-adv icmp packets to
other nodes in the mesh. To get it working with multiple batX devices we
must ensure that every mesh device can have their own socket which is
used to inject those packets in exactly one mesh.

The current implementation still doesn't allow to use complete separated
meshes as we rely on structures which are not part of the private data
of a batman device.

Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-22 14:05:03 -07:00
Javier Martinez Canillas 1bd2c2159a Staging: batman-adv: fix function prototype
In today linux-next I got a compile warning in staging/batman-adv.

This is due a struct bin_attribute read function prototype change and the driver was not updated.

This patch solves the issue

Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-21 15:32:05 -07:00
Dan Carpenter cf2d3fc978 Staging: batman-adv: return -EFAULT on copy_to_user errors
copy_to_user() returns the number of bites remaining but we want to
return a negative error code here.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-21 15:31:52 -07:00
Simon Wunderlich e6dc269b40 Staging: batman-adv: convert vis_interval into define
vis_interval does not neccesarily needs to be a variable, as there is
no way to change it anyway (and probably no need to). We can therefore
remove yet another global variable.

Thanks Marek for pointing this out.

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
[sven.eckelmann@gmx.de: Rework on top of current version]
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 17:01:19 -07:00
Marek Lindner 8af60a8cf0 Staging: batman-adv: Add information about batman-adv sysfs entries
Add documents about new sysfs entries in
 * /sys/class/net/<iface>/batman-adv/mesh_iface
 * /sys/class/net/<mesh_iface>/mesh/vis_mode

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 17:00:25 -07:00
Linus Lüssing 96d592ed59 Staging: batman-adv: Adding netfilter-bridge hooks
batman-adv is receiving and sending the packets of its own ether type
on a very early/low level. Therefore we need to add explicit hooks to
give netfilter/ebtables a chance to filter them.

Reported-by: Antonio Quartulli <ordex@ritirata.org>
Signed-off-by: Linus Lüssing <linus.luessing@web.de>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 16:59:40 -07:00
Marek Lindner 186305aa12 Staging: batman-adv: remove redundant struct declaration
The hardif_attr and the bat_attr struct share the same attributes,
hence it is not necessary to specify 2 different structs.

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 16:57:25 -07:00
Huang Weiyi 7ddd5d0279 Staging: MSM: remove duplicated #include
Remove duplicated #include('s) in
  drivers/staging/msm/mddihost.h
  drivers/staging/msm/msm_fb_def.h
  drivers/staging/msm/staging-devices.c

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 16:54:24 -07:00
Huang Weiyi b8564d7b38 Staging: XGI: remove duplicated #include
Remove duplicated #include('s) in
  drivers/staging/xgifb/XGI_main_26.c
  drivers/staging/xgifb/vb_init.c

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 16:54:24 -07:00
Javier Martinez Canillas ab17a4ac32 Staging: pohmelfs: fix compile warning
A really trivial patch to solve a warning when compiling staging/pohmelfs

Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 16:54:24 -07:00
H Hartley Sweeten a46f9087e6 Staging: dt3155: remove DT_3155_* errno defines
Remove the DT_3155_{SUCCESS/FAILURE} errno defines and use the
kernel provided ones.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Scott Smedley <ss@aao.gov.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 16:50:04 -07:00
H Hartley Sweeten 0f3ff30b93 Staging: dt3155: fix different address spaces noise in dt3155_drv.c
This fixes the different address spaces noise when copying data to/from
user space to kernel space.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 16:50:04 -07:00
Marin Mitov f932e3a361 Staging: dt3155v4l: correcting a pointer mismatch bug and cleanups
The third argument of dma_alloc_coherent() is of type dma_addr_t and is defined
as u64 for x86_64, while the member 'device_base' of struct dma_coherent_mem is
defined as u32.

While at it, clean up the code. Now if dev->dma_mem != NULL all the fields/members
are already properly initialized.

Signed-off-by: Marin Mitov <mitov@issp.bas.bg>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 16:50:04 -07:00
Mike Gilks 616f58f6ec staging: rtl8192u: fix checkpatch.pl issues to line 514
Fixed most problems pointed out by checkpatch.pl in file r8192U_core.c
up to line 500

Signed-off-by: Mike Gilks <mike.kernel@gilksonline.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 16:49:02 -07:00
Nanakos Chrysostomos 70eef90e49 Staging: dt3155: dt3155_isr.c: Fix checkpatch.pl issues.
Fix resolves checkpatch.pl issues.

Signed-off-by: Nanakos Chrysostomos <nanakos@wired-net.gr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 16:43:15 -07:00
Andreas Herrmann 0374e91c90 Staging: rtl81xx: Fix build problems when CONFIG_CRYPTO=n
Select CONFIG_CRYPTO for all rtl81xx wireless drivers

... to avoid build problems like:

ERROR: "crypto_destroy_tfm" [drivers/staging/rtl8187se/r8187se.ko] undefined!
ERROR: "crypto_alloc_base" [drivers/staging/rtl8187se/r8187se.ko] undefined!
ERROR: "crypto_destroy_tfm" [drivers/staging/rtl8192u/r8192u_usb.ko] undefined!
ERROR: "crypto_alloc_base" [drivers/staging/rtl8192u/r8192u_usb.ko] undefined!
ERROR: "crypto_destroy_tfm" [drivers/staging/rtl8192su/r8192s_usb.ko] undefined!
ERROR: "crypto_alloc_base" [drivers/staging/rtl8192su/r8192s_usb.ko] undefined!
ERROR: "crypto_destroy_tfm" [drivers/staging/rtl8192e/r8192e_pci.ko] undefined!
ERROR: "crypto_alloc_base" [drivers/staging/rtl8192e/r8192e_pci.ko] undefined!

when drivers are built as modules but CONFIG_CRYPTO=n.

Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 16:41:50 -07:00
Scott Kidder 6167944d8a Staging: crystalhd: removed kfree(NULL) checks
Removed kfree(NULL checks) that were not necessary

Signed-off-by: Scott Kidder <scott.kidder11@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 16:41:25 -07:00
Nanakos Chrysostomos ef079a76fe Staging: dream: pmem.c: Fix checkpatch.pl issues.
This patch resolves checkpatch.pl issues in the pmem.c file.

Signed-off-by: Nanakos Chrysostomos <nanakos@wired-net.gr>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 16:41:17 -07:00
Scott Kidder 231ded903f Staging: cx25821: added KERN_ facility levels
Fixed issues found by checkpatch.pl including adding KERN_
facility levels to printk() calls and C99 comments.

Signed-off-by: Scott Kidder <scott.kidder11@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 16:40:09 -07:00
Matti Lammi fa3620c515 Staging: otus: Removed one unnecessary space
Nothing special really, just a small fix.

Signed-off-by: Matti Lammi <matti.lammi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 16:40:09 -07:00
Dan Carpenter cc7e7d38e9 Staging: otus: fix strcpy() overflow
wrq->name is only 16 characters long but "IEEE 802.11-MIMO" is 16
characters + a NULL character, so it's too long.  This patch changes it
to "IEEE 802.11abgn".

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 16:40:09 -07:00
Joe Perches 84f8008a7d Staging: otus: TODO: Don't bother, for documentation purposes only
On Mon, 2010-06-07 at 12:02 -0700, Luis R. Rodriguez wrote:
> this driver is unmaintained and its only purpose is as a
> source of documentation for developers working on ar9170 and carl9170.
> Once carl9170 gets 11n support and merged upstream then this driver
> can be removed.

Then the TODO file should be updated.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 16:40:08 -07:00
Scott Kidder b55515cf72 Staging: otus: fix style issues in zdusb.c
This is a patch to zdusb.c that fixes whitespace,
C99 comment, and other style issues found by the
checkpatch.pl tool

Signed-off-by: Scott Kidder <scott.kidder11@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 16:40:08 -07:00
Dan Carpenter 594578979d Staging: wlan-ng: silence a sparse warning
This doesn't change the behavior.  It just silences a sparse warning.

drivers/staging/wlan-ng/hfa384x_usb.c:2810:62: warning: dubious: !x | !y

The point of the bitwise OR is so that a logical OR could short circuit
the second call to test_and_set_bit().

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 15:33:57 -07:00
Greg Kroah-Hartman 25ebc2f42b Merge branch 'staging-next' into work 2010-06-18 15:31:26 -07:00
Greg Kroah-Hartman 2e04bb7b28 Staging: winbond: fix build errors
Some errors crept in due to a previous patch that I missed.

This fixes them up so the driver continues to build, sorry about that.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 15:30:28 -07:00
Karl Relton cb3126e60f Staging: wlan-ng: Switch from wext to cfg80211
Switch driver over from wext to cfg80211 interface.

Some Notes:

- This patch moves the driver wholesale from wext to cfg80211. Wext
support is still provided through the cfg80211 provided wext
compatability layer.

- Currently only infrastructure mode is implemented. Ad hoc mode is not
yet implemented, but can be added.

- It does not support connecting to a specified bssid, instead roaming
is handled by the card itself. This matches the behaviour of the
existing driver.

- It has been tested using NetworkManager (via wpa_supplicant)
configured to use the wext compatability layer, and then again with the
native nl80211 layer.

Signed-off-by: Karl Relton <karllinuxtest.relton@ntlworld.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 15:22:55 -07:00
Jiri Kosina 9c770f3b88 Staging: cxt1e1: remove code guarded by GENERIC_HDLC_VERSION
Current linux kernel has GENERIC_HDLC_VERSION equal to 4, no need to
have dead code in-kernel which was there for ancient kernel versions.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 15:20:59 -07:00
Jiri Kosina bb71770cdb Staging: rtl8192su: remove all code dependent on LINUX_VERSION_CODE
Remove all code which is dead for in-kernel driver due to being
ifdefed by LINUX_VERSION_CODE.

While at it, also remove surrounding code which is commented out,
or '#if 1' nops.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 15:17:12 -07:00
Jiri Kosina 5749df14ae Staging: cxt1e1: remove all code dependent on LINUX_VERSION_CODE
Remove all code which is dead for in-kernel driver due to being
ifdefed by LINUX_VERSION_CODE.

While at it, also remove surrounding code which is commented out,
or '#if 1' nops.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 15:16:21 -07:00
Ben Hutchings 41a38d9e63 Staging: rtl8192su: Fix procfs code for interfaces not named wlan0
The current code creates directories in procfs named after interfaces,
but doesn't handle renaming.  This can result in name collisions and
consequent WARNINGs.  It also means that the interface name cannot
reliably be used to remove the directory - in fact the current code
doesn't even try, and always uses "wlan0"!

Since the name of a proc_dir_entry is embedded in it, use that when
removing it.

Add a netdev notifier to catch interface renaming, and remove and
re-add the directory at this point.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
2010-06-18 15:16:21 -07:00
Ben Hutchings 9a3dfa0555 Staging: rtl8192su: Clean up in case of an error in module initialisation
Currently various resources may be leaked in case of an error.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 15:16:21 -07:00
Julia Lawall 37a18632b0 Staging: dream: camera: Use memdup_user
Use memdup_user when user data is immediately copied into the
allocated region.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression from,to,size,flag;
position p;
identifier l1,l2;
@@

-  to = \(kmalloc@p\|kzalloc@p\)(size,flag);
+  to = memdup_user(from,size);
   if (
-      to==NULL
+      IS_ERR(to)
                 || ...) {
   <+... when != goto l1;
-  -ENOMEM
+  PTR_ERR(to)
   ...+>
   }
-  if (copy_from_user(to, from, size) != 0) {
-    <+... when != goto l2;
-    -EFAULT
-    ...+>
-  }
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 15:16:21 -07:00
Julia Lawall 7c0ace5488 Staging: vme: bridges: Add missing unlocks
Add a spin_unlock and mutex_unlock missing on the error path.

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

// <smpl>
@@
expression E1;
@@

* spin_lock(E1,...);
  <+... when != E1
  if (...) {
    ... when != E1
*   return ...;
  }
  ...+>
* spin_unlock(E1,...);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 15:16:21 -07:00
Nanakos Chrysostomos 45f9f01896 Staging: vme: devices: vme_user.c: Fix checkpatch.pl issues.
Fix resolves checkpatch.pl issues for vme_user.c file.

Signed-off-by: Nanakos Chrysostomos <nanakos@wired-net.gr>
Signed-off-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 15:16:20 -07:00
Matthias Brugger e3613299b5 Staging: adis16255: missing spacess in log messages added
Signed-off-by: Matthias Brugger <mensch0815@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 15:16:20 -07:00
Barry Song 00ae79463e Staging: iio: adis16209/220/240/350: tuning spi delay to make hardware more stable
Signed-off-by: Barry Song <21cnbao@gmail.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 15:16:20 -07:00
Barry Song 3fd66da1d5 Staging: iio: adis16400: fix some minor issues and clean-up
1. move adis16400_spi_read_burst() to adis16400_ring.c since it is only
   called there
2. add the lost calling to adis16400_self_test()
3. codes cleanup

Signed-off-by: Barry Song <21cnbao@gmail.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 15:16:20 -07:00
Barry Song ee9a691e08 Staging: iio: adis16300: fix some minor issues and clean-up
1. add delay between spi transfers
2. move burst read to ring function
3. clean-up

Signed-off-by: Barry Song <21cnbao@gmail.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 15:16:19 -07:00
Dan Carpenter 794e7d9df2 Staging: iio: add file pointer to sysfs callbacks
The sysfs attribute call backs take a file pointer these days.  This was
added in 2c3c8bea60 "sysfs: add struct file* to bin_attr callbacks"

Signed-off-by: Dan Carpenter <error27@gmail.com>
Cc: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 13:14:33 -07:00
Jonathan Cameron de6c37ad2a Staging: iio: Add mailing list to the TODO file.
As suggested by Charles Clement

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 13:14:33 -07:00
Mike Frysinger 1cb6c1f594 Staging: iio: pull in slab.h for kmalloc funcs
These drivers use kzalloc() but don't include slab.h.  They currently
build though because the spi.h header will pull in slab.h for us.  But
rather than rely on that behavior forever, include slab.h explicitly.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 13:14:32 -07:00
Mike Frysinger c608cb012e Staging: iio: kill off spurious semicolons
A bunch of IIO files contain spurious semicolons after function
definitions and case statements and if statements.  Guess people
really like this thing, but kill them anyways so they'll stop
spreading via copy & paste with new drivers.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 13:14:32 -07:00
Mike Frysinger 98a62bb7bc Staging: iio: standardize kconfig/makefile spacing/style
Standardize the spacing/style across the IIO build files:
	- comment block in Kconfigs
	- newlines at ends of files
	- trailing lines at ends of files
	- indent with one tab, not spaces or mixed

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 13:14:32 -07:00
Nitin Gupta 00ac9ba01d Staging: zram: Rename ramzswap to zram in documentation
Related changes:
 - Included example to show usage as generic
(non-swap) disk with ext4 filesystem.
 - Renamed rzscontrol to zramconfig to match
with new device naming.

Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 12:50:30 -07:00
Nitin Gupta f1e3cfff4d Staging: zram: Rename ramzswap to zram in code
Automated renames in code:
 - rzs* -> zram*
 - RZS* -> ZRAM*
 - ramzswap* -> zram*

Manual changes:
 - Edited comments/messages mentioning "swap"

Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 12:49:48 -07:00
Nitin Gupta 16a4bfb9e9 Staging: Rename ramzswap files to zram
Related changes:
 - Modify revelant Kconfig and Makefile accordingly.
 - Change include filenames in code.
 - Remove dependency on CONFIG_SWAP in Kconfig as zram usage
is no longer limited to swap disks.

Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 12:46:42 -07:00
Nitin Gupta a1dd52afa9 Staging: ramzswap: Support generic I/O requests
Currently, ramzwap devices (/dev/ramzswapX) can only
be used as swap disks since it was hard-coded to consider
only the first request in bio vector.

Now, we iterate over all the segments in an incoming
bio which allows us to handle all kinds of I/O requests.

ramzswap devices can still handle PAGE_SIZE aligned and
multiple of PAGE_SIZE sized I/O requests only. To ensure
that we get always get such requests only, we set following
request_queue attributes to PAGE_SIZE:
 - physical_block_size
 - logical_block_size
 - io_min
 - io_opt

Note: physical and logical block sizes were already set
equal to PAGE_SIZE and that seems to be sufficient to get
PAGE_SIZE aligned I/O.

Since we are no longer limited to handling swap requests
only, the next few patches rename ramzswap to zram. So,
the devices will then be called /dev/zram{0, 1, 2, ...}

Usage/Examples:
 1) Use as /tmp storage
 - mkfs.ext4 /dev/zram0
 - mount /dev/zram0 /tmp

 2) Use as swap:
 - mkswap /dev/zram0
 - swapon /dev/zram0 -p 10 # give highest priority to zram0

Performance:

 - I/O benchamark done with 'dd' command. Details can be
found here:
http://code.google.com/p/compcache/wiki/zramperf
Summary:
 - Maximum read speed (approx):
   - ram disk: 1200 MB/sec
   - zram disk: 600 MB/sec
 - Maximum write speed (approx):
   - ram disk: 500 MB/sec
   - zram disk: 160 MB/sec

Issues:

 - Double caching: We can potentially waste memory by having
two copies of a page -- one in page cache (uncompress) and
second in the device memory (compressed). However, during
reclaim, clean page cache pages are quickly freed, so this
does not seem to be a big problem.

 - Stale data: Not all filesystems support issuing 'discard'
requests to underlying block devices. So, if such filesystems
are used over zram devices, we can accumulate lot of stale
data in memory. Even for filesystems to do support discard
(example, ext4), we need to see how effective it is.

 - Scalability: There is only one (per-device) de/compression
buffer stats. This can lead to significant contention, especially
when used for generic (non-swap) purposes.

Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 12:45:40 -07:00
Naveen Jain 36e574fed5 Staging: ti-st: fix protocol counting
Older mechanism of counting the number of protocols
registered with ST was slow, in-efficient.
It used to check the protocol data for NULL for each
registration/unregistration.

With this change, counting protocols in maintained by
a single counter protos_registered.

Counting protocols is not just for debug purposes

Signed-off-by: Naveen Jain <naveen_jain@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 12:40:29 -07:00
Naveen Jain e2a5328285 Staging: ti-st: add version info to sysfs
Add version information to be available under the sysfs group
for kim.

Signed-off-by: Naveen Jain <naveen_jain@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 12:39:38 -07:00
Naveen Jain b38fc2d965 Staging: ti-st: cleanup sysfs code
Remove the older way of communicating with user-space
daemon UIM.
The older way involved creating of a new kobj and pid
sysfs file under it, and sending signal using that pid.

Now we communicate via rfkill to user-space UIM.

Background: UIM is the user-space daemon which upon
notification from ldisc driver, opens the tty, sets
default baud and then installs (tiocsetd) the ldisc.

Signed-off-by: Naveen Jain <naveen_jain@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 12:39:37 -07:00
Pavan Savoy 4f62e69b2b Staging: Update TI-ST's TODO
Update the TODO of TI-ST to make sure it reflects current list
of activities that need to be done.
Also point it out to the user-space app code relevant to it.

Signed-off-by: Pavan Savoy <pavan_savoy@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 12:37:57 -07:00
R.M. Thomas 702422bd2d Staging: easycap: add easycap driver
This adds the easycap USB video adapter driver to
the staging directory.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 12:34:42 -07:00
Greg Kroah-Hartman 178f16db8f Merge git://git.infradead.org/users/dwmw2/spectra-2.6 into work 2010-06-18 12:13:11 -07:00
Charles Clément 013a468c45 Staging: vt6655: struct pci_driver cleanup
Rename driver struct and callbacks to vt6655_* instead of device_* and add
__devinit/__devexit directives.

Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 10:42:07 -07:00
Uwe Kleine-König 0d74395177 Staging: vt665*: fix typos concerning "management"
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 10:42:07 -07:00
Timofey Trofimov 2555cd9f93 Staging: vt6656: fix coding style issues in 80211mgr.c
This is a patch to the 80211mgr.c file that fixes up warnings
found by the checkpatch.pl tool

Signed-off-by: Timofey Trofimov <tumoxep@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 10:39:56 -07:00
Otavio Salvador d500648ef6 Staging: vt6656: fix up built-in compilation together with rt2870
Fix this build error:

  drivers/staging/vt6656/built-in.o: In function `rotr1':
  (.text+0x1a878): multiple definition of `rotr1'
  drivers/staging/rt2870/built-in.o:(.text+0x106c2): first defined here
  drivers/staging/vt6656/built-in.o: In function `tkip_sbox':
  (.text+0x1a848): multiple definition of `tkip_sbox'
  drivers/staging/rt2870/built-in.o:(.text+0x10697): first defined here
  drivers/staging/vt6656/built-in.o: In function `xor_32':
  (.text+0x1ec24): multiple definition of `xor_32'
  drivers/staging/rt2870/built-in.o:(.text+0x111c4): first defined here
  drivers/staging/vt6656/built-in.o: In function `xor_128':
  (.text+0x1ec00): multiple definition of `xor_128'
  drivers/staging/rt2870/built-in.o:(.text+0x111dd): first defined here

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 10:37:48 -07:00
Andres More d9d1ccb51f Staging: vt6656: code cleanup, resolved checkpatch findings in headers
Resolved whitespace-related checkpatch findings in .h files

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 10:35:33 -07:00
Andres More 33d33e42b6 Staging: vt6656: code cleanup, fixed 'for' statements
Resolved checkpatch findings, but some long lines warnings.
	ERROR: space required before the open parenthesis '('
	ERROR: spaces required around that

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 10:34:59 -07:00
Greg Kroah-Hartman afb97d9a26 Staging: vt6655: fix up U32 conversion
Commit 902d241129 converted U32 to u32
which you would think would be just fine.  Unfortunatly, it seems that
VIA only builds their code on a 32bit processor (which makes sense if
you think about it), but this doesn't work on x86-64.  So fix up the few
places where this really wanted to be an unsigned long width.

Cc: Charles Clément <caratorn@gmail.com>
Cc: Forest Bond <forest@alittletooquiet.net>,
Cc: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 10:30:21 -07:00
Charles Clément cf160bc926 Staging: vt6655: include linux/ headers instead of asm/
Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 10:20:04 -07:00
Charles Clément 9d828c458f Staging: vt6655: remove PDWORD typedef
Use unsigned long * instead.

Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 10:20:03 -07:00
Charles Clément 15df6c2b92 Staging: vt6655: remove PWORD typedef
Use unsigned short * instead.

Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 10:20:03 -07:00
Charles Clément 2989e96f17 Staging: vt6655: remove PBYTE typedef
Use unsigned char * instead.

Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 10:20:03 -07:00
Charles Clément b2e876b608 Staging: vt6655: remove custom ULONGLONG typedef
Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 10:19:05 -07:00
Charles Clément e3fd16d081 Staging: vt6655: remove custom ULONG typedef
Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 10:19:04 -07:00
Charles Clément b6e95cd52a Staging: vt6655: remove custom UINT typedef
Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 10:18:45 -07:00
Charles Clément 800acdbdf8 Staging: vt6655: remove custom USHORT typedef
Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 10:18:32 -07:00
Charles Clément 5c9824e124 Staging: vt6655: remove custom UCHAR typedef
Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 10:14:00 -07:00
Charles Clément b83cc2ed46 Staging: vt6655: remove custom LONG typedef
Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 10:11:16 -07:00
Charles Clément 7ca3019525 Staging: vt6655: remove custom INT typedef
Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 10:11:16 -07:00
Charles Clément 0c93a98a0e Staging: vt6655: removed custom SHORT typedef
Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 10:11:15 -07:00
Charles Clément 5a4197bdda Staging: vt6655: removed custom CHAR typedef
Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 10:11:15 -07:00
Charles Clément 902d241129 Staging: vt6655: remove U32 custom macro
Remove custom macro for unsigned 32-bit integers, replace by u32.

Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 10:09:25 -07:00
Charles Clément c17ce8c21d Staging: vt6655: remove U16 custom macro
Remove custom macro for unsigned 16-bit integers.

Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 10:09:25 -07:00
Charles Clément 737c3d708c Staging: vt6655: remove U8 custom macro
Remove custom macro for unsigned 8-bit integers.

Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 10:09:24 -07:00
Charles Clément ec28c7fab4 Staging: vt6655: remove I8 custom macro
Remove custom macro for signed 8-bit integers.

Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 10:09:24 -07:00
Charles Clément 8fa5dd133e Staging: vt6655: remove unused OUT definition
Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 10:09:24 -07:00
Charles Clément 8fee12e4d1 Staging: vt6655: remove double definition of Calcu_LinkQual
Calcu_LinkQual is already defined a couple lines earlier.

Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 10:07:48 -07:00
Charles Clément 6b1e6b8f95 Staging: vt6655: remove unused argument in ChannelValid function
Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 10:07:48 -07:00
Charles Clément 2ef98c6065 Staging: vt6655: use compare_ether_addr instead of custom macro
Replace custom macro IS_ETH_ADDRESS_EQUAL by compare_ether_addr from
<linux/etherdevice.h>.

Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 10:06:53 -07:00
Charles Clément 8b0591e501 Staging: vt6655: use is_zero_ether_addr instead of custom macro
Replace custom macro IS_NULL_ADDRESS by is_zero_ether_addr from
<linux/etherdevice.h>.

Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 10:06:53 -07:00
Charles Clément ca9e12acda Staging: vt6655: use is_broadcast_ether_addr instead of custom macro
Replace custom macro IS_BROADCAST_ADDRESS by is_broadcast_ether_addr
from <linux/etherdevice.h>.

Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 10:06:53 -07:00
Charles Clément 670ea81ead Staging: vt6655: use is_multicast_ether_addr instead of custom macro
Replace custom macro IS_MULTICAST_ADDRESS by is_multicast_ether_addr
from <linux/etherdevice.h>.
Remove linux/if_ether.h include as it is included in
linux/etherdevice.h already.

Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 10:06:53 -07:00
Charles Clément c92069f3d7 Staging: vt6655: use ETH_ZLEN macro instead of custom one
Replace custom minimum packet lenght definition MIN_PACKET_LEN by
ETH_ZLEN from <linux/if_ether.h>.

Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 10:06:52 -07:00
Timofey Trofimov 3a4d1b9096 Staging: winbond: fix some checkpatch.pl issues in phy_calibration.c
This is a patch to the phy_calibration.c that fixes up almost all
warnings and errors (except 80 characters limit and lack of tabs errors)
found by the checkpatch.pl tool

Signed-off-by: Timofey Trofimov <tumoxep@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 10:01:31 -07:00
Adam Latham 07bbf35048 Staging: winbond: Fix for brace style, length and whitespace in mac_structures.h
This patch fixes line length, brace style and whitespace issues in the
mac_structures.h file found by the checkpatch.pl tool

Signed-off-by: Adam Latham <adam.latham@unisontorbay.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 10:00:40 -07:00
Adam Latham cb016cc48a Staging: winbond: Fix C99 Comment issues in mac_structures.h
This patch fixes the use of //C99 comments in the mac_structures.h found by
the checkpatch.pl tool

Signed-off-by: Adam Latham <adam.latham@unisontorbay.org.uk>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 10:00:09 -07:00
Tobias Klauser 15f0beb169 Staging: hv: Storage class should be before const qualifier
The C99 specification states in section 6.11.5:

The placement of a storage-class specifier other than at the beginning
of the declaration specifiers in a declaration is an obsolescent
feature.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 09:22:28 -07:00
Gustavo Silva 3cc544df93 Staging: comedi: drivers: fix coding style issues in pcl812.c
This is a patch to the pcl812.c file that fixes up the following
issues:

ERROR: code indent should use tabs where possible		   x 27
WARNING: line over 80 characters				   x 37
WARNING: please, no space before tabs				   x 13
WARNING: braces {} are not necessary for single statement blocks   x  2
WARNING: printk() should include KERN_ facility level		   x 22
WARNING: braces {} are not necessary for any arm of this statement x  5

Signed-off-by: Gustavo Silva <silvagustavo@users.sourceforge.net>
Acked-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 09:16:44 -07:00
Lars Lindley ba22a15ae8 Staging: et131x: Small format/style tidyups
I fixed indentation in one place and two long lines, a space and a brace
found by checkpatch.pl and fixed some long lines and whitespace around an =.

Signed-off-by: Lars Lindley <lindley@coyote.org>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17 16:08:45 -07:00
Ian Abbott 80370692f6 Staging: Comedi: drivers: Remove comment copied from skel.c
The dmm32at.c and comedi_bond.c comedi driver files contain an
instructional comment block copied over from skel.c about how to format
a driver comment block.  This comment was modified in skel.c by a
previous patch in this series to stop Comedi's 'dump_doc' script
treating it as an actual driver comment block.  There isn't any need to
repeat this comment block in the other source files, so rather than
modify it, this patch just removes it from those files.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17 16:03:59 -07:00
Ian Abbott 9a390f38b6 Staging: comedi: drivers: skel: Add whitespace to example comment block
The Comedi team have a script 'dump_doc' to extract text from the driver
comment block (starting with line 'Driver:') in (most of) the comedi
driver source files.  This was recently updated to allow and strip off a
" * " prefix at the start of each line (well actually, it uses the perl
substitution 's/^ ?\* ?//').

The skel.c file contains an instructional comment block about how to
format this driver comment block, but the updated 'dump_doc' script
mistakenly treats this as a valid driver comment block.  This patch adds
some extra whitespace to stop the instructional comment block being
treated as a valid driver comment block by Comedi's 'dump_doc' script.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17 16:03:58 -07:00
Ian Abbott 389cd417e3 Staging: comedi: drivers: das08: Add whitespace to driver comment block
Previous whitespace changes to das08.c removed some whitespace from a
"driver comment block" that the Comedi team would like to keep.  "Header
continuation lines" in this comment block should be indented with
whitespace.  (This is after the " * " at the start of each line.)

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17 16:03:58 -07:00
Gustavo Silva 3420f6b4c1 Staging: comedi: drivers: fix coding style issues in quatech_daqp_cs.c
This is a patch to the quatech_daqp_cs.c file that fixes up the following
issues:

ERROR: code indent should use tabs where possible		   x  1
WARNING: line over 80 characters				   x  1
WARNING: braces {} are not necessary for single statement blocks   x 10
WARNING: printk() should include KERN_ facility level		   x  6

Signed-off-by: Gustavo Silva <silvagustavo@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17 15:54:24 -07:00
Gustavo Silva 8b83e005d1 Staging: comedi: drivers: fix coding style issues in pcmda12.c
This is a patch to the pcmda12.c file that fixes up five printk() warning issues

Signed-off-by: Gustavo Silva <silvagustavo@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17 15:54:24 -07:00
Gustavo Silva 4c68fb42c2 Staging: comedi: drivers: fix coding style issues in pcl816.c
This is a patch to the pcl816.c file that fixes up the following
issues:

ERROR: code indent should use tabs where possible		   x  2
WARNING: line over 80 characters				   x 34
WARNING: please, no space before tabs				   x  1
WARNING: braces {} are not necessary for single statement blocks   x  6
WARNING: printk() should include KERN_ facility level		   x 15
WARNING: braces {} are not necessary for any arm of this statement x  1

Signed-off-by: Gustavo Silva <silvagustavo@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17 15:54:24 -07:00
Gustavo Silva 8f4e80af3a Staging: comedi: drivers: Fix coding style issues in pcl711.c
This is a patch to the pcl711.c file that fixes up printk()
warning issues.

Signed-off-by: Gustavo Silva <silvagustavo@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17 15:54:12 -07:00
Gustavo Silva b6241fda0a Staging: comedi: drivers: fix coding style issues in me4000.c
This is a patch to the me4000.c file that fixes up the following
issues:

ERROR: space required after that close brace '}' 		   x 13
ERROR: spaces required around that ':' (ctx:VxV) 		   x  3
WARNING: line over 80 characters                 		   x 96
WARNING: braces {} are not necessary for any arm of this statement x  2

Signed-off-by: Gustavo Silva <silvagustavo@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17 15:54:12 -07:00
Arun Thomas 56b8421cee Staging: comedi: Remove typedefs
Remove all remaining typedefs from comedi drivers

Signed-off-by: Arun Thomas <arun.thomas@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17 13:49:07 -07:00
Arun Thomas 727b286b44 Staging: comedi: Remove COMEDI_PCI_INITCLEANUP macro
Move the PCI devinit/devexit routines to the respective C source files
instead of calling COMEDI_PCI_INITCLEANUP

Signed-off-by: Arun Thomas <arun.thomas@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17 13:48:12 -07:00
Arun Thomas 7114a28011 Staging: comedi: Remove COMEDI_INITCLEANUP macro
Move the init/exit routines to the respective C source files
instead of calling COMEDI_INITCLEANUP

Signed-off-by: Arun Thomas <arun.thomas@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17 13:47:00 -07:00
Arun Thomas 90f703d30d Staging: comedi: Remove COMEDI_MODULES_MACRO
Add MODULE_AUTHOR, MODULE_LICENSE, and MODULE_DESCRIPTION calls
to the respective C source files instead of calling COMEDI_MODULES_MACRO

Signed-off-by: Arun Thomas <arun.thomas@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17 13:45:47 -07:00
Maurice Dawson 88d8ed4b64 Staging: comedi: fix printk() coding style issue in ni_labpc.c
This is a patch to the ni_labpc.c file that fixes all, printk() should
include KERN-facility level, warnings found by the checkpatch.pl tool

Signed-off-by: Maurice Dawson <mauricedawson2699@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17 13:44:15 -07:00
Bob Beattie 0c55484dca Staging: comedi: drivers: fix space coding style in am9513.h
This is a patch to the file am9513.h that fixes missing space warnings
found by the checkpatch.pl tool.

Signed-off-by: Bob Beattie <bob.beattie@ntlworld.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17 13:43:12 -07:00
John Sheehan daca497d80 Staging: comedi: fix code warnings in s626.c
A patch for s626.c to fix some of the warnings
reported by the checkpatch.pl tool, namely,
printk() should include KERN_ facility level
unnecessary whitespace before a quoted newline

Signed-off-by: John Sheehan <john.d.sheehan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17 13:36:34 -07:00
John Sheehan 6fd071cccf Staging: comedi: fix code style errors in unioxx5.c
A patch for unioxx5.c which fixes "trailing statements
should be on next line" errors raised by the
chechpatch.pl tool

Signed-off-by: John Sheehan <john.d.sheehan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17 13:36:34 -07:00
Mark Rankilor 4c67da06f0 Staging: comedi: Fixed long lines in gsc_hpdi.c
This patch fixes some long line lengths in gsc_hpdi.c as found by the
checkpatch.pl tool

Signed-off-by: Mark Rankilor <reodge@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17 13:36:34 -07:00
Mark Rankilor 2f6df34cd3 Staging: comedi: Checkpatch cleanups in adl_pci9111.c
This patch cleans up some various warnings generated from checkpatch.pl

Signed-off-by: Mark Rankilor <reodge@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17 13:36:33 -07:00
Dan Carpenter f25bd6bfdf Staging: comedi: cleanup: remove unneeded null checks
These checks are obviously pointless because kfree() can handle null
dereferences.

But really the main problem is that if the pointers were null that would
cause problems on the ealier lines.  The dereferences would cause an
oops and the _release() functions use ->priv to determine which IRQ to
free.  I looked into it and quite a few of the detach functions assume
link->priv is non-null.  It seems like we can remove these checks.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17 13:36:33 -07:00
Ian Abbott c5da20905c Staging: comedi: serial2002: Use NULL instead of 0 for pointers
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17 13:28:57 -07:00
Ian Abbott 668f272e57 Staging: comedi: serial2002: Reduce stack usage on 'open'
Reduce stack usage in serial_2002_open() by allocating dig_in_config,
dig_out_config, chan_in_config, and chan_out_config temporary arrays
using kcalloc() and freeing them when done with.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17 13:28:57 -07:00
Ian Abbott fa3b5d9ab0 Staging: comedi: serial2002: Fix memory leak on detach
The comedi device 'detach' method for the serial2002 driver has an
off-by-one error in its loop for freeing data belonging to its
subdevices.  Fix it.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17 13:28:56 -07:00
Ian Abbott 9e7f225688 Staging: comedi: serial2002: handle allocation failures on 'open'
The comedi device 'open' method for the serial2002 driver frees any old
'maxdata_list' and 'range_table_list' arrays belonging to a subdevice
and allocates them again, but was missing checks for allocation failure.

If an allocation fails, free the 'maxdata_list' and 'range_table_list'
arrays for all subdevices and return an error.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17 13:28:56 -07:00
Ian Abbott 3c17ba0743 Staging: comedi: Allow 'open' driver method to fail
Some comedi drivers should return an error from their 'open' method when
something goes wrong.  Change the prototype of the 'open' method in
'struct comedi_device' to allow this, and change the drivers that use it.
Propagate any error to the 'open' file operation.

The corresponding 'close' method won't be called when the 'open' method
fails, so drivers failing the 'open' need to clean up any mess they
created.

The dt9812 and serial2002 drivers can now return an error on 'open'.
The jr3_pci driver also uses the 'open' method but doesn't fail it.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17 13:28:56 -07:00
Cody Harmon 3d34023a99 Staging: comedi: ni_tio: fixed brace coding style issues and a few errors
Fixed code style and placed KERN_ERR in printk statement.

Signed-off-by: Cody Harmon <harmonco@engr.orst.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17 11:42:58 -07:00
Samuel Richardson 091b4242eb Staging: comedi: fixed brace coding style issue in ni_tio.c
This is a patch to the ni_tio.c file that fixes a brace warning found by
the checkpatch.pl tool

Signed-off-by: Samuel Richardson <sam.j.richardson@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17 11:41:36 -07:00
David Woodhouse bf46b9a92e spectra: Rename config options
This is the Spectra driver, so use CONFIG_SPECTRA.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2010-06-08 18:28:24 +01:00
David Woodhouse 8ae4f63623 spectra: Move to drivers/staging
It'll take some work before this is really shippable.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2010-06-08 18:08:32 +01:00
Linus Torvalds e620d1e39a Merge branch 'v4l_for_2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'v4l_for_2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (87 commits)
  V4L/DVB: ivtv: Timing tweaks and code re-order to try and improve stability
  V4L/DVB: ivtv: Avoid accidental video standard change
  V4L/DVB: ivtvfb : Module load / unload fixes
  V4L/DVB: cx2341x: Report correct temporal setting for log-status
  V4L/DVB: cx18, cx23885, v4l2 doc, MAINTAINERS: Update Andy Walls' email address
  V4L/DVB: drivers/media: Eliminate a NULL pointer dereference
  V4L/DVB: dvb-core: Fix ULE decapsulation bug
  V4L/DVB: Bug fix: make IR work again for dm1105
  V4L/DVB: media/IR: nec-decoder needs to select BITREV
  V4L/DVB: video/saa7134: change dprintk() to i2cdprintk()
  V4L/DVB: video/saa7134: remove duplicate break
  V4L/DVB: IR/imon: add auto-config for 0xffdc rf device
  V4L/DVB: IR/imon: clean up usage of bools
  V4L/DVB: em28xx: remove unneeded null checks
  V4L/DVB: ngene: remove unused #include <linux/version.h>
  V4L/DVB: ak881x needs slab.h
  V4L/DVB: FusionHDTV: Use quick reads for I2C IR device probing
  V4L/DVB: Technotrend S2-3200 ships with a TT 1500 remote
  V4L/DVB: drivers/media: Use kzalloc
  V4L/DVB: m920x: Select simple tuner
  ...
2010-06-04 15:38:12 -07:00
Dan Carpenter 640f7dcfe0 Staging: sep: return -EFAULT on copy_to_user errors
copy_to_user() returns the number of bytes remaining but we want to
return a negative error code here.  These functions are used in the
ioctl handler and the error code gets returned to userspace.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-04 13:38:58 -07:00
Dan Carpenter 2d98bb22c3 Staging: rc2860: return -EFAULT on copy_to_user errors
copy_to_user() returns the number of bytes remaining but we want to
return a negative error code.  This is in the ioctl handler and the
error code gets passed to userspace.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-04 13:38:58 -07:00
Julia Lawall c60e55f30a Staging: Eliminate a NULL pointer dereference
Eliminate a NULL or near NULL pointer dereference.

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

// <smpl>
@r exists@
expression E,E1;
identifier f;
statement S1,S2,S3;
@@

if ((E == NULL && ...) || ...)
{
  ... when != if (...) S1 else S2
      when != E = E1
* E->f
  ... when any
  return ...;
}
else S3
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-04 13:38:57 -07:00
Julia Lawall 0aa3f139cd staging: Use GFP_ATOMIC when a lock is held
In each case, the containing function is only called from one place, where
a spin lock is held.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@gfp exists@
identifier fn;
position p;
@@

fn(...) {
... when != spin_unlock
    when any
  GFP_KERNEL@p
 ... when any
}

@locked@
identifier gfp.fn;
@@

spin_lock(...)
... when != spin_unlock
fn(...)

@depends on locked@
position gfp.p;
@@

- GFP_KERNEL@p
+ GFP_ATOMIC
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: Jonathan Cameron <jic23@cam.ac.uk>
Cc: Marek Lindner <lindner_marek@yahoo.de>
Cc: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-04 13:38:57 -07:00
Martin Homuth-Rosemann ebe8622342 Staging: comedi - correct parameter gainlkup for DAQCard-6024E in driver ni_mio_cs.c
Correct at least one of the incorrect specs for a national instrument
data acquisition card DAQCard-6024E. This card has only four different
gain settings (+-10V, +-5V, +-0.5V, +-0.05V).

Signed-off-by: Martin Homuth-Rosemann <homuth-rosemann@gmx.net>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-04 13:38:57 -07:00
Alexander Kurz 7f00b36e9e Staging: comedi: fixing ni_labpc to mite dependancy
the dependancy of ni_labpc on mite was missing,

Signed-off-by: Alexander Kurz <linux@kbdbabel.org>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

index 0aa2b0d..79f5f2e 100644
2010-06-04 13:38:57 -07:00
Henk de Groot f502cb6eb2 Staging: wlags49_h2, wlags49_h25: fixed Kconfig dependencies
Fixes Kconfig so the wlags49_h2 and wlags49_h25 drivers can be
selected from menuconfig without having to select another WLAN
driver first. Before it could only be selected when another driver
already selected WIRELESS_EXT. Also adds WEXT_PRIV on which
the driver also depends.

Align help text in Kconfig.

Signed-off-by: Henk de Groot <pe1dnn@amsat.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-04 13:38:57 -07:00
Randy Dunlap c28040e515 Staging: phison: depends on ATA_BMDMA
phison uses interfaces and data that are built only when
ATA_BMDMA is enabled, so it should depend on that symbol.

drivers/staging/phison/phison.c:43: error: implicit declaration of function 'ATA_BMDMA_SHT'
drivers/staging/phison/phison.c:43: error: initializer element is not constant
drivers/staging/phison/phison.c:43: error: (near initialization for 'phison_sht.module')
drivers/staging/phison/phison.c:47: error: 'ata_bmdma_port_ops' undeclared here (not in a function)

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: evan_ko@phison.com
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-04 13:38:57 -07:00
Barry Song b6ee30a27f Staging: iio-utils: fix memory overflow for dynamically allocateded memory to hold filename
Signed-off-by: Barry Song <21cnbao@gmail.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-04 13:38:57 -07:00
Mike Frysinger c3dee74f52 Staging: adis16255: add proper section markings to hotplug funcs
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-04 13:38:57 -07:00
Mike Frysinger 08a16d9f0e Staging: adis16255: fix typo in Kconfig
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-04 13:38:57 -07:00
Sven Eckelmann 0375fc4d27 Staging: batman-adv: Don't allocate icmp packet with GFP_KERNEL
A new buffer for a packet is created when a icmp packet is received.
This happens in a context with disabled irq. Thus we are not allowed to
sleep or call function which might sleep. kmalloc must be called with
GFP_ATOMIC instead of GFP_KERNEL to ensure that it does not sleep.

Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-04 13:38:56 -07:00
Sven Eckelmann 3d9b235893 Staging: batman-adv: Don't call free_netdev twice
Free_netdev is registered as destructor in interface_setup for every
soft_device. This destructor is automatically called from
unregister_netdev and we must not call it again for the freed
net_device.

Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-04 13:38:56 -07:00
Sven Eckelmann 20c8a44b7c Staging: batman-adv: Call unregister_netdev on failures to get rtnl lock
We must call unregister_netdev when we couldn't initialise the
batman-adv module and the soft_device was registered. There are two
version of the function which we can use:
 * unregister_netdevice - removes device
 * unregister_netdev - takes rtnl semaphore and remove device

We don't hold the semaphore in an error situation. So we must use
unregister_netdev.

Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-04 13:38:55 -07:00
Marek Lindner 5f411a90ee Staging: batman-adv: fix rogue packets on shutdown
On module shutdown batman-adv would purge the internal packet
queue by sending all remaining packets which could confuse
other nodes. Now, the packets are silently discarded.

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-04 13:38:55 -07:00
Stepan Moskovchenko 9d20015391 Staging: add MSM framebuffer driver
Qualcomm development of the MSM SOC framebuffer driver has
diverged significantly from the driver used by Android. This
is a snapshot of our current driver, in all it's agony. We are
putting this in staging to help with the process of converging
the two drivers.

At this point, the driver has been tested only in dumb
framebuffer mode.

Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
[dwalker@codeaurora.org: added a small compile fix and TODO.]
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-04 13:38:54 -07:00
Alexander Kurz 34ef545aa8 Staging: comedi: fixing ni_tio to mite PCI dependancy
On Wed, 19 May 2010, Randy Dunlap wrote:
> linux-next of 2010-0519:
> when CONFIG_PCI is not enabled:
> 
> drivers/staging/comedi/drivers/mite.c: In function 'mite_init':
> drivers/staging/comedi/drivers/mite.c:89: error: implicit declaration of function 'pci_dev_get'
> drivers/staging/comedi/drivers/mite.c:89: warning: assignment makes pointer from integer without a cast
> make[5]: *** [drivers/staging/comedi/drivers/mite.o] Error 1

This patch fixes the problem.

Signed-off-by: Alexander Kurz <linux@kbdbabel.org>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-04 13:38:54 -07:00
Alexander Kurz 824196248c Staging: comedi: fix 8255 and DAS08 Kconfig dependancies.
Both drivers support directly or indirectly multiple bus types,
hence both are listed independent of bus types.

Signed-off-by: Alexander Kurz <linux@kbdbabel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-04 13:38:54 -07:00
Ian Abbott 53fa827e29 Staging: comedi: For COMEDI_BUFINFO, check access to command
Don't allow COMEDI_BUFINFO ioctl if some other file object has locked
the subdevice or has an active command.  If there is no active command,
just report back the last buffer position.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-04 13:38:53 -07:00
Ian Abbott 4772c018e3 Staging: comedi: COMEDI_BUFINFO with no async - report no bytes read or written
When the COMEDI_BUFINFO ioctl is used on a subdevice without
asynchronous streaming command support, set 'bytes_read = 0' and
'bytes_written = 0' in the buffer info returned back to the user.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-04 13:38:53 -07:00
Ian Abbott d261154057 Staging: comedi: don't write to buffer if command finished
For write(), any data copied to the data buffer after the previously
set up streaming acquisition command has finished won't be used, but a
non-empty write() does not currently return 0 (or -EPIPE on error) after
the command has finished until the data buffer has been filled up.
Change this behavior to return 0 (or -EPIPE) any time after the command
has finished, without bothering to fill up the buffer with more useless
data.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-04 13:38:53 -07:00
Ian Abbott ee4063fa6b Staging: comedi: amplc_dio200: Protect counter subdevice with spinlock
The internal state of an 82C54 counter timer chip will get messed up if
several threads read, write, configure, or check the status of the chip
simultaneously.  Protect the register access sequences with a spin lock.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-04 13:38:53 -07:00
Ian Abbott d4da77a73c Staging: comedi: adv_pci_dio: Support Advantech PCI-1735U
Add support for the Advantech PCI-1735U card, including support for a
counter subdevice (based on an 82C54 counter timer chip).

The counter subdevice needs more testing, as the only person I know who
tried it couldn't get it to work!

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-04 13:38:52 -07:00