Commit Graph

4809 Commits

Author SHA1 Message Date
Marek Lindner 037dafa867 Staging: batman-adv: Introduce update_primary_addr to update mac address
set_primary_if is currently misused to update the mac address in vis
packets. This unneeded and introduces overhead due to other operations
which must be done when updating the primary interface.

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-09-20 16:29:51 -07:00
Sven Eckelmann 7e8158b341 Staging: batman-adv: Track references of batman_if in set_primary_if
set_primary_if exchanges the current primary interfaces with a new one.
This is a new reference and thus we have to count it and decrease the
count of the old primary interface.

Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20 16:29:50 -07:00
Sven Eckelmann 399fb5b445 Staging: batman-adv: count batman_if list queries as reference
The return of get_batman_if_by_netdev and get_active_batman_if leaks a
pointer from the rcu protected list of interfaces. We must protect it to
prevent a too early release of the memory. Those functions must increase
the reference counter before rcu_read_unlock or it may be to late to
prevent a free.

hardif_add_interface must also increase the reference count for the
returned batman_if to make the behaviour consistent.

Reported-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20 16:29:50 -07:00
Sven Eckelmann 47f621dddc Staging: batman-adv: Use refcnt to track usage count of batman_if
get_batman_if_by_netdev and get_active_batman_if may leak data from the
rcu protected list of interfaces. The rcu protected list of all gateway
nodes leaks the actual data outside the read-side critical area. This is
not valid as we may free the data using a call_rcu created callback
after we unlock using rcu_read_unlock. A workaround is to provide a
reference count to be sure that the memory isn't freed to early.

It is currently only to implement the already existing functionality and
doesn't provide the full tracking of all usage cases.

Additionally, we must hardif_hold inside the
rcu_read_lock()..rcu_read_unlock() before we attach to the structure
which "leaks" it. When another function now removed it from its usage
context (primary_if, usage on stack, ...) then we must hardif_put it. If
it is decremented to zero then we can issue the call_rcu to the freeing
function. So "put" is not allowed inside an rcu_read_lock.

Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20 16:29:50 -07:00
Sven Eckelmann 16f9530e99 Staging: batman-adv: Use synchronize_rcu instead of call_rcu
It is recommended [1] to use synchronize_rcu to simplify the code -
especially when otherwise extra locking is needed to protect other code
from picking stale elements. It also protects us for emitting to many
callbacks which may results in OOM conditions.

The only reason not to use it, would be in performance critical sections
or when we are not allowed to block.

[1] Documentation/RCU/checklist.txt

Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20 16:29:49 -07:00
Sven Eckelmann 952c699c06 Staging: batman-adv: Remove unneeded rcu_read_lock
Regions which do not use rcu functions don't need to protected by
rcu_read_lock. If we want to protect data from being freed than it must
be covered by the same read-side critical section or otherwise the grace
period may already ended and freed the memory before we called
rcu_read_lock again.

Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20 16:29:49 -07:00
Sven Eckelmann 2250840111 Staging: batman-adv: Always protect list_for_each_entry_rcu with RCU
receive_bat_packet is not called with rcu_read_lock so we must ensure by
ourself that we protect list_for_each_entry_rcu using the correct RCU
locks.

Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20 16:29:49 -07:00
Sven Eckelmann af2ac7bfec Staging: batman-adv: Introduce if_list_lock to protect if_list
The update critical sections of if_list must be protected by a locking
primitive other than RCU. The iterator must also be protected by the
chosen locking mechanism.

The rtnl_lock in hardif_remove_interfaces must also be moved outside the
iterator primitive to ensure that we don't deadlock the kernel due to
differently nested locks in hardif_remove_interfaces and hard_if_event.

Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20 16:29:49 -07:00
Sven Eckelmann 67c3b70593 Staging: batman-adv: wait for call_rcu before unloading module
synchronize_rcu respective synchronize_net only waits for the rcu grace
period to elapse and we may fail to finish the calls which were made to
call_rcu in that time. In result the module could be unloaded during the
execution of the RCU callbacks.

rcu_barrier[1] will now wait for all outstanding RCU callbacks to finish
before continuing.

[1] Documentation/RCU/rcubarrier.txt

Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20 16:29:48 -07:00
Sven Eckelmann 2d77bb592f Staging: batman-adv: Mark debugfs files as nonseekable
We don't allow to seek in the debugfs socket and log files. Thus we
should mark the file descriptor as nonseekable.

Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20 16:29:48 -07:00
Sven Eckelmann 93b3d9d578 Staging: batman-adv: Move mailing list address to .org
The official mailing list is run on lists.open-mesh.org and it should be
avoided to sent them to lists.open-mesh.net to reduce the number of
receipents and double posts.

Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20 16:29:48 -07:00
Sven Eckelmann 1612ae996e Staging: batman-adv: checkpatch cleanup of comments
checkpatch now detects the start of a comment and warns about usage of
multiple spaces at the beginning of a line. We have to replace the '   '
in multiple lines comments by ' * ' to fix it.

Checkpatch also wants a comment after a definition of a spinlock_t which
describes what it protects. It is currently not possible to add it
before the actual struct which includes the spinlock.

Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20 16:29:47 -07:00
Haiyang Zhang 430a8e9a33 staging: hv: Remove camel cases of vmbus packet buffer structures
Remove camel cases of vmbus packet buffer structures
 Remove camel cases of:
 struct VMBUS_CHANNEL_PACKET_PAGE_BUFFER
 struct VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20 16:22:40 -07:00
Andy Shevchenko 369ae8be42 staging: octeon: '&pointer[0]' to 'pointer' fix
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20 16:10:57 -07:00
Andy Shevchenko a3cf4b42ce staging: rt2870: '&pointer[0]' to 'pointer' fix
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20 16:10:56 -07:00
Andy Shevchenko e7cde7b312 staging: vt6655: '&pointer[0]' to 'pointer' fix
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20 16:10:56 -07:00
Andy Shevchenko 97d2354518 staging: ath6kl: '&pointer[0]' to 'pointer' fix
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20 16:10:56 -07:00
Andy Shevchenko b01d467ddd staging: cxt1e1: '&pointer[0]' to 'pointer' fix
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20 16:10:56 -07:00
Andy Shevchenko cfd1015a7a staging: otus: '&pointer[0]' to 'pointer' fix
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20 16:10:56 -07:00
Andy Shevchenko a5ed57a3ec staging: rtl8712: '&pointer[0]' to 'pointer' fix
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20 16:10:56 -07:00
Andy Shevchenko db5c53d15b staging: wlags49_h2: '&pointer[0]' to 'pointer' fix
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20 16:10:55 -07:00
Andy Shevchenko 1c919d90e1 staging: rt2860: '&pointer[0]' to 'pointer' fix
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20 16:10:55 -07:00
Joe Perches 03a6cddbb8 staging: Use static const char * const where possible
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16 13:02:37 -07:00
Charles Clément a09eae8550 Staging: vt665x: remove unused DEF definition
Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16 13:02:36 -07:00
Pavan Savoy dfb7ef7d84 staging: ti-st: fix kim platform device id
Platform devices tend to have id as -1 when only 1 device exist and
a value >=0 when multiple devices exist, since we plan to store all
these platform devices if multiple exist, there was a requirement to
have id to be >=0.
The patch fixes this problem.

Signed-off-by: Pavan Savoy <pavan_savoy@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16 12:54:45 -07:00
Andy Shevchenko 48c51a8cf4 staging: brcm80211: use string native library
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16 12:51:56 -07:00
Andy Shevchenko 3fb4e3d1ff staging: brcm80211: use native ctype library
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16 12:51:56 -07:00
Agustin March a7b47b9bb2 staging: usbip: resolved a space in a comment
Removed a space in a comments lines at #459

Signed-off-by: Agustin March <agustin.march@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16 12:37:36 -07:00
Joe Perches 3760c621fd staging: msm: Remove pr_<level> uses of KERN_<level>
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16 12:37:36 -07:00
Al Cho a871869245 staging: keucr: fix keucr lost disconnect
keucr lost the disconnect,
so keucr crash when plug-in and then plug-out SD-card quickly.

unmark the part of usb disconnect

Signed-off-by: Al Cho <acho@novell.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16 12:37:35 -07:00
Clelia V. Korol b411f12174 staging: vt6656: Fixed indentation with spaces
Fixed the last 5 lines, indented with spaces, replacing spaces with tabs.

Signed-off-by: Clelia V. Korol <cvkorol@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16 12:37:35 -07:00
Ema Cuevas c3aca01be6 staging: vt6656: removed dummy errors like extra spaces
As reported by checkpatch.

Signed-off-by: Ema Cuevas <emacupk@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16 12:37:35 -07:00
matias cd74ea33e3 staging: vt6656: delete some parenthesis
I remove parenthesis for a return variable, and also delete a space and tab the code line

Signed-off-by: matias <munozmatiasn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16 12:37:35 -07:00
Emanuel Mariano Ravera 357bcdfb45 staging: vt6656: Space Added after definition of Variable MSG_LEVEL_INFO
Added an space after the definition of the variable MSG_LEVEL_INFO on line 43

Signed-off-by: Emanuel Mariano Ravera <ravera.emanuel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16 12:37:35 -07:00
Diego H. Iglesias b168ae4d4b staging: vt6656: removed not required parentheses.
Removed not required parentheses in return statements.

Signed-off-by: Diego H. Iglesias <diegohi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16 12:37:34 -07:00
Vasiliy Kulikov 2503a26554 staging: comedi: fix signess bug
ai_count and ao_counter are unsigned, check for < 0 doesn't make sense.
Cast them to int.

Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16 12:37:34 -07:00
Vasiliy Kulikov cae16a1742 staging: crystalhd: fix signed bug
chd_dec_major is unsigned, so check chd_dec_major < 0 doesn't make sense.
Since it is used as signed, declare it as int.

Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16 12:37:34 -07:00
Vasiliy Kulikov 3850a8ae43 staging: solo6010: fix signess bug
video_nr is unsigned, so check video_nr >= 0 doesn't make sense.
The only "negative" value may be -1, so explicitly check for it.

Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16 12:37:33 -07:00
Randy Dunlap 2427924cb0 staging: ST_BT depends on RFKILL
Fix kconfig unmet dependency warning:

warning: (ST_BT && STAGING && !STAGING_EXCLUDE_BUILD && BT) selects TI_ST which has unmet direct dependencies (RFKILL)

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16 12:29:32 -07:00
Randy Dunlap 5fe1f1edb9 staging/bcm: fix build for CONFIG_PM not enabled
Handle build case of CONFIG_PM not being enabled.

drivers/staging/bcm/InterfaceInit.c:280: error: 'struct usb_device' has no member named 'autosuspend_delay'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16 12:29:32 -07:00
Randy Dunlap 3e8acee461 staging/bcm: fix printk format warnings
Fix lots of printk format warnings in bcm.  Here is a sample of them:

drivers/staging/bcm/CmHost.c:1955: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'long unsigned int'
drivers/staging/bcm/CmHost.c:1955: warning: format '%x' expects type 'unsigned int', but argument 2 has type 'long unsigned int'
drivers/staging/bcm/CmHost.c:1955: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'long unsigned int'
drivers/staging/bcm/LeakyBucket.c:85: warning: format '%d' expects type 'int', but argument 4 has type 'long int'
drivers/staging/bcm/LeakyBucket.c:85: warning: format '%d' expects type 'int', but argument 3 has type 'long int'
drivers/staging/bcm/LeakyBucket.c:85: warning: format '%d' expects type 'int', but argument 4 has type 'long int'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16 12:29:32 -07:00
Randy Dunlap e23f773ee4 staging/keucr: fix build when CONFIG_PM is not enabled
keucr driver has a build error when CONFIG_PM is not enabled, so fix that.

drivers/staging/keucr/usb.c:42: error: 'struct us_data' has no member named 'suspend_resume_hook'
drivers/staging/keucr/usb.c:43: error: 'struct us_data' has no member named 'suspend_resume_hook'
drivers/staging/keucr/usb.c:64: error: 'struct us_data' has no member named 'suspend_resume_hook'
drivers/staging/keucr/usb.c:65: error: 'struct us_data' has no member named 'suspend_resume_hook'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Al Cho <acho@novell.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16 12:29:31 -07:00
Randy Dunlap 7311530035 staging/keucr: update TODO list and ask question about it
Update keucr TODO with additional work items.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Al Cho <acho@novell.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16 12:29:31 -07:00
Andy Shevchenko fa1ae16c97 staging: ath6kl: use '%pM' format to print MAC address
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16 12:26:13 -07:00
Andy Shevchenko d225eef71c staging: octeon: use '%pM' format to print MAC address
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16 12:26:13 -07:00
Andy Shevchenko 28dc55bc9a staging: otus: use '%pM' format to print MAC address
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16 12:26:12 -07:00
Andy Shevchenko ada543b76a staging: rt2870: use '%pM' format to print MAC address
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16 12:26:12 -07:00
Andy Shevchenko 0ce53f3d15 staging: rtl8712: use '%pM' format to print MAC address
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16 12:26:11 -07:00
Andy Shevchenko ff5cb20b7b staging: cxt1e1: use '%pMF' format to print MAC address
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16 12:26:11 -07:00
Andy Shevchenko 3c02dc22a2 staging: vt6655: use '%pM' format to print MAC address
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16 12:26:11 -07:00
Andy Shevchenko ce3d824031 staging: wlags49_h2: use '%pM' format to print MAC address
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16 12:26:11 -07:00
Andy Shevchenko aa4d282cba staging: rt2860: change plain format of mac address to %pM in *printf()
There are many locations where MAC or BSSID is printed. The plain format
is used in such places. *printf() in kernel recognizes
%pM, %pMF and %pm format parameters to print out 6-byte array as MAC
address. This patch changes plain format to custom %pM which is widely
used in kernel.

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16 12:26:10 -07:00
David Cross ef6c3c6e53 staging: west bridge: pnand hal fixes
This patch includes changing some defines, necessary for compilation
with the linux-next tree.

Signed-off-by: David Cross <david.cross@cypress.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-14 16:52:47 -07:00
David Cross 4c404487aa staging: west bridge: cyasgadget, remove file system / vfs calls
This patch remove file system specific (fat_get_block) and vfs calls
from the cyasgadget driver. The current implementation expects user
space to write the file (open, seek to end, 1 byte write), followed by a
call to clear the dirty pages from the the page cache.

Signed-off-by: David Cross <david.cross@cypress.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-14 16:52:47 -07:00
David Cross 72bbd9bce4 Staging: west bridge: block driver api fix
This patch contains an update for cyasblkdev_queue.c which is needed for
the kernel update from 2.6.35 to 2.6.36.

Signed-off-by: David Cross <david.cross@cypress.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-14 16:52:46 -07:00
David Cross 4ecea3c51b Staging: west bridge: Kconfig fix
This patch fixes the currently broken Kconfig for west bridge by
introducing a dependency on a valid HAL Layer for the driver build.

Signed-off-by: David Cross <david.cross@cypress.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-14 16:52:46 -07:00
Maurice Dawson 8be11ffcf5 Staging: comedi: fix macro coding style issue in adl_pci9111.c
This is a patch that fixes up, macros with multiple statements should be enclosed in a do - while loop, coding style issue in the adl_pci9111.c file found by the checkpatch.pl tool

Signed-off-by: Maurice Dawson <mauricedawson2699@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-14 16:49:46 -07:00
Vasiliy Kulikov ff75f96bb0 Staging: batman-adv: check kmalloc() return value
kmalloc() may fail, if so drop current packet.

Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
[sven.eckelmann@gmx.de: Removed new introduced deadlock]
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-14 16:38:34 -07:00
Marek Lindner b001f71ed1 Staging: batman-adv: removing redundant assignment of skb->dev
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-09-14 16:38:33 -07:00
Sven Eckelmann 368b4f06c8 Staging: batman-adv: Add rcu TODO
Paul E. McKenney informed us that rcu is misused by leaking pointers to
rcu related elements outside read-side protected critical sections.

He also recommended that it should be checked against the rcu checklist.

Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-14 16:38:32 -07:00
Sven Eckelmann f73d8b4321 Staging: batman-adv: Remove currently unused gw_* datastructures
gw_list_lock, gw_list and curr_gw are currently unused members of struct
bat_priv. They will be readded when gateway support is really
implemented.

Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-14 16:38:32 -07:00
Linus Lüssing 09686b560f Staging: batman-adv: Always synchronize rcu's on module shutdown
During the module shutdown procedure in batman_exit(), a rcu callback is
being scheduled (batman_exit -> hardif_remove_interfaces ->
hardif_remove_interfae -> call_rcu). However, when the kernel unloads
the module, the rcu callback might not have been executed yet, resulting
in a "unable to handle kernel paging request" in __rcu_process_callback
afterwards, causing the kernel to freeze.

The synchronize_net and synchronize_rcu in mesh_free are currently
called before the call_rcu in hardif_remove_interface and have no real
effect on it.

Therefore, we should always flush all rcu callback functions scheduled
during the shutdown procedure using synchronize_net. The call to
synchronize_rcu can be omitted because synchronize_net already calls it.

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-09-14 16:38:32 -07:00
Manuel Stahl 6267ea655f staging: iio: sca3000 convert byte order of ring buffer data
Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-14 16:37:58 -07:00
Manuel Stahl b68d58a84b staging: iio: sca3000 fix sca3000_[show,store]_ring_bpse
Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-14 16:37:58 -07:00
Andrew Chew 3285aae1ed staging: iio: ak8975: Add ak8975 magnetometer sensor
This is for the Asahi Kasei AK8975 3-axis magnetometer.  It resides within
the magnetometer section of the IIO subsystem, and implements the raw
magn_x,y,z_raw attributes, as well as magn_x,y,z_scale attributes for
converting to Gauss.

Changed to use the magn_x,y,z_scale attributes, and made those attributes
give the scale factor to conert to Gauss.  Also applied more fixes from
feedback.

Keeping mode as an unsigned long.  I'm going to add proper power management
at some point anyway, which would deprecate this attribute.

Signed-off-by: Andrew Chew <achew@nvidia.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-14 16:37:11 -07:00
Andrew Chew 7223234ee0 staging: iio: Change GAIN macros to SCALE.
Per email exchange with Jonathan Cameron, GAIN should instead be SCALE, to
be consistent with documentation.

Resending, since this goes with the 2/2 patch.

Signed-off-by: Andrew Chew <achew@nvidia.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-14 16:37:10 -07:00
Haiyang Zhang 9e795a5232 staging: hv: Convert vmbus driver interface function pointer table to constant
Convert vmbus driver interface function pointer table to constant
The vmbus interface functions are assigned to a constant - vmbus_ops.

Because the vmbus interface function pointer table is converted to a
constant variable -- vmbus_ops, the function GetChannelInterface(),
VmbusGetChannelInterface() and pointer GetChannelInterface are no longer
in use. The deprecated function's work is done by the initialization of
the newly added constant variable vmbus_ops.

I created the new constant variable vmbus_ops and removed the deprecated
function pointer GetChannelInterface in one patch.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-14 16:27:12 -07:00
Jason Cooper 5fee254098 staging: brcm80211: fix remaining checkpatch errors.
Remaining errors are due to the use of typedefs.  They should dissappear
once the typedefs get cleaned up.

Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-14 16:24:20 -07:00
Jason Cooper 92dfc7d18a staging: brcm80211: fix "ERROR: trailing whitespace."
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-14 16:24:19 -07:00
Jason Cooper fd64bcc48b staging: brcm80211: fix "ERROR: spaces required around that ..."
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-14 16:24:19 -07:00
Jason Cooper 2ae3b7ea9f staging: brcm80211: fix "ERROR: spaces prohibited around that ':' ..."
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-14 16:24:18 -07:00
Jason Cooper a0e5ccd340 staging: brcm80211: fix "ERROR: space required before that ..."
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-14 16:24:18 -07:00
Jason Cooper 914d69d6bc staging: brcm80211: fix "ERROR: space required after that ..."
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-14 16:24:18 -07:00
Jason Cooper 0eeca2f48d staging: brcm80211: fix "ERROR: space required after that close brace"
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-14 16:24:18 -07:00
Jason Cooper 5ebee113b6 staging: brcm80211: fix "ERROR: space prohibited before ...close square bracket"
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-14 16:24:17 -07:00
Jason Cooper 29c4275adb staging: brcm80211: fix "ERROR: space prohibited after that ..."
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-14 16:24:17 -07:00
Jason Cooper 198bd4d69d staging: brcm80211: fix "ERROR: need consistent spacing around '*'"
This patch fixes the real errors.  The rest are caused by typedefs
which will be fixed in a later patch.

Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-14 16:24:17 -07:00
Jason Cooper 39dcff3f45 staging: brcm80211: fix 'ERROR: "(foo*)" should be "(foo *)"'
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-14 16:23:41 -07:00
Jason Cooper c5fe41c339 staging: brcm80211: fix "ERROR: Macros w/ mult. statements ... do - while loop"
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-14 16:23:41 -07:00
Jason Cooper 0d706ef4f2 staging: brcm80211: fix "ERROR: Macros w/ complex values ... parenthesis"
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-14 16:23:41 -07:00
Jason Cooper 7e85c72969 staging: brcm80211: fix "ERROR: do not initialise statics to 0 or NULL"
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-14 16:23:40 -07:00
Jason Cooper e4e4d21fa3 staging: brcm80211: fix "ERROR: do not initialise globals to 0 or NULL"
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-14 16:23:40 -07:00
Jason Cooper 9b6562b1c3 staging: brcm80211: fix "ERROR: while should follow close brace '}'"
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-14 16:22:06 -07:00
Jason Cooper e5c4536fa4 staging: brcm80211: fix "ERROR: that open brace { ... prev line"
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-14 16:22:06 -07:00
Jason Cooper 6214582217 staging: brcm80211: fix "ERROR: trailing statements should be on next line"
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-14 16:22:05 -07:00
Jason Cooper ca8c1e5990 staging: brcm80211: fix "ERROR: do not use assignment in if condition"
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-14 09:04:07 -07:00
Jason Cooper 90ea22962c staging: brcm80211: fix "ERROR: return is not a function, paren..."
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-14 08:57:05 -07:00
Jason Cooper a2627bc065 staging: brcm80211: fix "ERROR: open brace '{' following function dec..."
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-14 08:45:53 -07:00
Jason Cooper 7cc4a4c029 staging: brcm80211: fix 'ERROR: "foo * bar" should be "foo *bar"'
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-14 08:28:59 -07:00
Henry Ptasinski 29f6465fc8 staging: brcm80211: Fix URLs for firmware files.
Signed-off-by: Henry Ptasinski <henryp@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-14 08:25:15 -07:00
Andy Shevchenko 8dab24ce3e staging: brcm80211: use '%pM' format to print MAC address
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Nohee Ko <noheek@broadcom.com>
Cc: linux-wireless@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-14 08:25:15 -07:00
Henry Ptasinski d30dc9a2f2 staging: brcm80211: Add contact info to TODO list.
Signed-off-by: Henry Ptasinski <henryp@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-14 08:15:52 -07:00
Ben Hutchings eb4764c300 staging: brcm80211: Fix some initialisation failure paths
Initialise wl_info::tasklet early so that it's safe to tasklet_kill()
it in wl_free().

Remove assertions from wl_free() that may not be true in case of
initialisation failure.

Call wl_release_fw() in case of failure after wl_request_fw().
Don't rely on wl_firmware::fw_cnt in wl_release_fw().

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Henry Ptasinski <henryp@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-14 08:15:51 -07:00
Greg Kroah-Hartman 6b5e073663 Staging: fix Makefile so broadcom driver will actually build.
It would be nice if people tested their patches before sending
them to me...

Cc: Henry Ptasinski <henryp@broadcom.com>
Cc: Brett Rudley <brudley@broadcom.com>
Cc: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-08 23:14:18 -07:00
Henry Ptasinski a9533e7ea3 Staging: Add initial release of brcm80211 - Broadcom 802.11n wireless LAN driver.
Signed-off-by: Henry Ptasinski <henryp@broadcom.com>
Cc: Brett Rudley <brudley@broadcom.com>
Cc: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-08 23:09:11 -07:00
Nikitas Angelinas baa5251e8c Staging: vt6656: use ARRAY_SIZE macro in channel.c
Replace (sizeof(ChannelRuleTab) / sizeof(ChannelRuleTab[0])) with
ARRAY_SIZE(ChannelRuleTab) in drivers/staging/vt6656/channel.c

Signed-off-by: Nikitas Angelinas <nikitasangelinas@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-08 21:31:25 -07:00
Maurice Dawson 842ec6ba3b Staging: comedi: fix space coding style issue in adl_pci9111.c
This is a patch to the adl_pci9111.c file that fixes up multiple please,
no space for starting a line 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-09-08 21:31:24 -07:00
Vipin Mehta fbc69d379c staging: ath6kl: Eliminating the symlink to 2.0 header files
Moving the AR6002 hw 2.0 specific register definitions files from
the hw.0 directory to a new directory, 'hw' within hw2.0.

Signed-off-by: Vipin Mehta <vmehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-08 21:26:41 -07:00
Mike McCormack 533d1ffe41 Staging: rtl8192e: Less verbose function headers
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-08 21:21:26 -07:00
Mike McCormack 7f440f49d1 Staging: rtl8192e: Fix indent in some places
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-08 21:21:25 -07:00
Mike McCormack 1dc4dbbf7b Staging: rtl8192e: Remove some redundant comments
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-08 21:21:25 -07:00
Mike McCormack 51ae5d558f Staging: rtl8192e: Remove extern and redundant declarations
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-08 21:21:24 -07:00
Mike McCormack 196bd68726 Staging: rtl8192e: Remove function with no effect
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-08 21:21:23 -07:00
Mike McCormack b6d5e884ab Staging: rtl8192e: Remove unused macros
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-08 21:21:22 -07:00
Mike McCormack f347140583 Staging: rtl8192e: Remove some commented out code
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-08 21:21:22 -07:00
Mike McCormack d5abdf72be Staging: rtl8192e: Remove function name comments at end of functions
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-08 21:21:21 -07:00
Mike McCormack 49e57f2fc0 Staging: rtl8192e: Remove some redundant code
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-08 21:21:20 -07:00
Stephen Hemminger f8942e07a3 staging: Beeceem USB Wimax driver
The Sprint 4G network uses a Wimax dongle with Beecem
chipset. The driver is typical of out of tree drivers, but
maybe useful for people, and the hardware is readily available.

Here is a staging ready version (i.e warts and all)

0. Started with Rel_5.2.7.3P1_USB from Sprint4GDeveloperPack-1.1
1. Consolidated files in staging
2. Remove Dos cr/lf
3. Remove unnecessary ioctl from usbbcm_fops

Applied patches that were in the developer pack, surprising
there were ones for 2.6.35 already.

This is compile tested only, see TODO for what still needs
to be done.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-08 21:15:06 -07:00
Greg Kroah-Hartman 2d2f03b022 Staging: keucr: fix up some coding style issues in the .h files
This resolves a few of the coding style issues in the .h files
for this driver.  It doesn't get all of them by far, but it's a
good start.

Cc: Al Cho <acho@novell.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-08 02:49:54 -07:00
Al Cho 126bb03b46 Staging: add USB ENE card reader driver
This driver is for the ENE card reader that can be found in many
different laptops.  It was written by ENE, but cleaned up to
work properly in the kernel tree by Novell.

Signed-off-by: Al Cho <acho@novell.com>
Cc: <yiyingc@ene.com.tw>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-08 02:49:39 -07:00
Javier Martinez Canillas 15b9e32769 staging: xgifb: Removes unnecesary log
This patch fixes a compile warning removing an unnecessary log message.
I redo the patch against today linux-next.

Thanks a lot

Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-08 02:07:12 -07:00
Javier Martinez Canillas 328f55baae staging : xgifb: Removes compilation conditionals
This patch fixes a compilation warning in today linux-next
removing some compilation conditionals.

Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-08 02:07:12 -07:00
Vipin Mehta b6c78757f9 staging: ath6kl: Fixing a compilation error introduced by commit ec53d6123b.
Signed-off-by: Vipin Mehta <vmehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-08 02:02:26 -07:00
Andy Shevchenko c8e7978ee4 staging: ath6kl: use native methods from kernel library
There are already implemented methods such hex_to_bin() or isxdigit() in
the kernel. Let's use them.

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Acked-by: Vipin Mehta <Vipin.Mehta@Atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-08 01:59:54 -07:00
Andy Shevchenko 91facdbe50 staging: rtl8712: throw away custom hex_to_bin()
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-08 01:59:53 -07:00
Greg Kroah-Hartman 51973d7fa0 Staging: xgifb: revert a warning fix and resolve it properly
Jiri pointed out that the previous compiler warning fix was incorrect as
the compiler was properly saying that the variable was not being set.
This was due to a #define commenting out all of the logic in the
function.

This patch reverts Javier's previous one, and properly fixes the issue
by making the function actually doing something.

Reported-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Javier Martinez Canillas <martinez.javier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-08 01:49:45 -07:00
Prashant P. Shah 675d6409ae Staging: otus: removes global variable initialization to 0 in wwrap.c
This is a patch to the wwrap.c file that removes the initialization
of global variable 'smp_kevent_Lock' to 0

Signed-off-by: Prashant P. Shah <pshah.mumbai@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-07 19:39:15 -07:00
Thomas Gleixner 0f0800f17a staging: Bulk convert the semaphore mess
init_MUTEX(_LOCKED) and DECLARE_MUTEX are going away. Bulk convert
staging users.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-07 19:31:32 -07:00
Javier Martinez Canillas d6835e8417 staging: xgifb: Initialize uninitialized variables
Current patch solves compilation warnings in staging/xgifb for using
possibly uninitialized variables.

Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-06 23:18:18 -07:00
Prashant P. Shah b654f878ba Staging: xgifb: fixed many style issues in XGI_main_26.c
This is a patch to the XGI_main_26 file that fixes many style
issues found by the checkpatch.pl tool.
- extra spaces
- invalid code indent
- extra braces
- invalid comment style

Signed-off-by: Prashant P. Shah <pshah.mumbai@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-06 19:43:01 -07:00
Greg Kroah-Hartman 30cb3e5fb5 Staging: rt2860: Fix brace coding style issue
This fixes a single brace issue in the rt_linux.c file.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-05 20:55:55 -07:00
Bernie Thompson 2685cffa9e staging: udlfb: fix checkpatch and style
Fix warnings detected by tools

Signed-off-by: Bernie Thompson <bernie@plugable.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-05 19:46:14 -07:00
Bernie Thompson 5bea1fbf94 staging: udlfb: fix incorrect fb_defio implementation for multiple framebuffers
Fix fb_defio bug in udlfb for multiple framebuffers

Previously when using fb_defio with multiple DisplayLink attached displays
udlfb incorrectly used a shared datastructure where it needed to have
one per fb_info struct. This was completely broken and caused all kinds of
problems, including rendering to one framebuffer affecting others.

Signed-off-by: Bernie Thompson <bernie@plugable.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-05 19:45:59 -07:00
Michael Prokop d5fa13361b Staging: cxt1e1: Kconfig: SBE_PMCC4_NCOMM can not be compiled as module, adjust help description
The Kconfig description for CONFIG_SBE_PMCC4_NCOMM says:

  If you have purchased this optional support you must say Y or M
  here to allow the driver to operate with the NCOMM product.

This is not correct as it can not be built as module,
this patch updates the description accordingly.

Signed-off-by: Michael Prokop <mika@grml.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-05 16:59:56 -07:00
Julia Lawall d6269644e1 Staging: comedi: Fix unsigned return type
In each case, the function has an unsigned return type, but returns a
negative constant to indicate an error condition.  For move_block_from_dma,
there is only one call and the return value is dropped, so it need not be
unsigned.  For labpc_eeprom_write, there is only one call and the result is
stored in a signed variable, so again the unsigned return type is not
necessary.

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

// <smpl>
@exists@
identifier f;
constant C;
@@

 unsigned f(...)
 { <+...
*  return -C;
 ...+> }
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-05 16:59:55 -07:00
Vasiliy Kulikov 7b1f6bfb03 staging: westbridge: improve error path
kmalloc() may fail, check for it.
Allocated memory is not freed.
Use IS_ERR() instead of strict checking.

Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Cc: David Cross <david.cross@cypress.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-05 16:59:54 -07:00
Vasiliy Kulikov ec53d6123b staging: ath6kl: check return code of get_user and put_user
Function get_user may fail. Check for it.

Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-05 16:59:53 -07:00
Vasiliy Kulikov 81604d43ad staging: comedi: check return code of put_user
Function put_user may fail. Check for it.

Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-05 16:59:51 -07:00
Vasiliy Kulikov b04462a143 staging: tidspbridge: check return code of get_user
Function get_user may fail. Check for it.

Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-05 16:59:50 -07:00
Vasiliy Kulikov 2fac6c290f staging: rtl8192u: improve error path
Functions alloc_ieee80211 and register_netdev may fail. Check for it.

Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-05 16:59:50 -07:00
Vasiliy Kulikov e5a7dc54ee staging: tidspbridge: check return code of kzalloc
Function kzalloc may fail. Check for it.

Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-05 16:59:49 -07:00
Bernie Thompson d5ed54322e staging: udlfb: add module options for console and fb_defio
Add module options for console and fb_defio

Convert fb_defio on/off switch to module option and add console option.

>From the command line, pass options to modprobe
modprobe udlfb defio=1 console=1

Or for permanent option, create file like /etc/modprobe.d/options with text
options udlfb defio=1 console=1

Accepted options:

fb_defio	Make use of the fb_defio (CONFIG_FB_DEFERRED_IO) kernel
		module to track changed areas of the framebuffer by page faults.
        	Standard fbdev applications that use mmap but that do not
		report damage, may be able to work with this enabled.
		Disabled by default because of overhead and other issues.

console		Allow fbcon to attach to udlfb provided framebuffers. This
		is disabled by default because fbcon will aggressively consume
		the first framebuffer it finds, which isn't usually what the
		user wants in the case of USB displays.

Signed-off-by: Bernie Thompson <bernie@plugable.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-05 16:50:22 -07:00
Bernie Thompson 8ef8cc4fca staging: udlfb: support for writing backup EDID to sysfs file
Support writing default/backup edid via /sys/class/graphics/fb?/edid

Writing a backup edid blob to the 'edid' file will cause udlfb to
attempt to re-read the edid from hardware.
If we still don't have a good edid, it will use the backup edid instead.
The intent is to 1) enable user-supplied edid
2) enable udev rules to backup the last known good edid
for a device, and then provide that edid as a backup for all future starts

Signed-off-by: Bernie Thompson <bernie@plugable.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-05 16:50:21 -07:00
Bernie Thompson 1572f91cff staging: udlfb: fix big endian rendering error
Fix big endian rendering bug (affects PowerPC)

Thanks to Christian Melki at Ericsson for finding and suggesting patch.

Signed-off-by: Bernie Thompson <bernie@plugable.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-05 16:50:20 -07:00
Bernie Thompson 18dffdf891 staging: udlfb: enhance EDID and mode handling support
Enhance EDID and mode table handling

* Adds support for lower-end DL chips on higher-end monitors
* Adds support for using fbdev standard EDID parsing and handling
* Adds support for more dynamic reallocation of framebuffer, based on new EDID

Queries EDID from hardware with several retries then
queries DisplayLink chip for max pixel area via vendor descriptor.
Uses existing fbdev mode handling service funcations to build mode list
of common modes between adapter and monitor.
This enables lower-end chips (e.g. DL-125) to successfully pick a compatible
mode on higher end monitors (e.g. whose default mode is over 1280x1024).
Reallocate framebuffer if necessary in response to new max mode.

Signed-off-by: Bernie Thompson <bernie@plugable.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-05 16:50:19 -07:00
Bernie Thompson 33077b8d30 staging: udlfb: revamp reference handling to insure successful shutdown
Revamp reference handling and synchronization for unload/shutdown

Udlfb is a "virtual" framebuffer device that really exists on
two separate stacks: at the bottom of the framebuffer interface,
and on top of USB.  During unload, there's no guarantee which
one will tear down first. So reference counting must be solid
to handle all possibilities and not access anything once its gone.

Signed-off-by: Bernie Thompson <bernie@plugable.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-05 16:50:18 -07:00
Bernie Thompson f11f4bc027 staging: udlfb: remove metrics_misc sysfs attribute
Remove metrics_misc sysfs attribute

Previously returned multiple values, which goes against sysfs guidelines.
Had been used for debugging to figure out which of the multiple
fbdev interfaces an app was using, but log file messages are sufficient.

Signed-off-by: Bernie Thompson <bernie@plugable.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-05 16:50:17 -07:00
Bernie Thompson 9825f70f5c staging: udlfb: add DPMS support
Add ability to power off monitor with standard blanking interface

Used by X servers and others to manage power of dislpay

Signed-off-by: Bernie Thompson <bernie@plugable.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-05 16:50:16 -07:00
Bernie Thompson d46ecb9f79 staging: udlfb: fbdev character read and write support
Restore fbdev character read and write support

Enables access to the framebuffer from simple reads and writes
to /dev/fb0 (or fb1, ...). Low performance, because of extra copy
and because udlfb must scan every pixel for changes. But very
useful for testing and simple image display, etc.

Signed-off-by: Bernie Thompson <bernie@plugable.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-05 16:50:15 -07:00
Bernie Thompson df9be302a2 staging: udlfb: Add intro udlfb documentation
Add documentation for the udlfb framebuffer driver for DisplayLink devices.

Signed-off-by: Bernie Thompson <bernie@plugable.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-05 16:50:14 -07:00
Joe Perches e0ac7da044 staging: lirc: Remove unnecessary casts of private_data
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-05 00:35:37 -07:00
Javier Martinez Canillas 430eb1baae staging: xgifb: Removes unused variable
Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-05 00:35:37 -07:00
Sven Eckelmann 07fd7364b3 Staging: batman-adv: Update mtu of bat device by changing mtu of slave device
We must reduce our own mtu when we reduce the mtu of any device we use
to transfer our packets. Otherwise we may accept to large packets which
gets dropped by the actual device.

Reported-by: Vasiliy Kulikov <segooon@gmail.com>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-05 00:29:50 -07:00
Sven Eckelmann 81abee4f18 Staging: batman-adv: Don't inform about dropped packets in nodebug
Information about dropped packets are usually only interesting for
debugging purposes and otherwise open the possibility to flood the logs
of the target machine with useless information.

pr_debug will not output those information on a nodebug kernel.

Reported-by: Vasiliy Kulikov <segooon@gmail.com>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-05 00:29:50 -07:00
Sven Eckelmann 57b7117af8 Staging: batman-adv: Remove duplicate of attached device name
batman_if has the name of the net_dev as extra string in its own
structure, but also holds a reference to the actual net_device structure
which always has the current name of the device. This makes it
unneccessary and also more complex because we must update the name in
situations when we receive a NETDEV_CHANGENAME event.

Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-05 00:29:50 -07:00
Marek Lindner 8c70f13832 Staging: batman-adv: multiple mesh clouds
This patch removes all remaining global variables and includes the
necessary bits into the bat_priv structure. It is the last
remaining piece to allow multiple concurrent mesh clouds on the
same device.
A few global variables have been rendered obsolete during the process
and have been removed entirely.

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-09-05 00:29:49 -07:00
Marek Lindner 6a0e9fa88d Staging: batman-adv: attach each hard-interface to a soft-interface
This patch replaces the static bat0 interface with a dynamic/abstracted
approach. It is now possible to create multiple batX interfaces by
assigning hard interfaces to them. Each batX interface acts as an
independent mesh network. A soft interface is removed once no hard
interface references it any longer.

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-09-05 00:29:49 -07:00
Sven Eckelmann bf3264f6d1 Staging: batman-adv: Provide full headers and packets as linear skb
We must ensure that all interesting data is linear and not paged out to
access all information in a header or a full batman-adv related packet.
Otherwise we may drop packets which have non-linear headers but which
hold valid data.

This doesn't affect non-linear skbs which have all headers in a linear
head unless we must process the whole packet like in ogms or vis
packets.

Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-05 00:29:48 -07:00
Sven Eckelmann aedbffc777 Staging: batman-adv: Create copy of skb with pre-allocated headroom
We can use skb_cow instead of a handwritten function to test and create
a writable skb buffer. This also allows us to pre-allocate headroom to
be able to send the data without re-allocating the buffer again to add
the ethernet header.

Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-05 00:29:48 -07:00
Sven Eckelmann b411d498ee Staging: batman-adv: Prepare vis packets directly inside a skb
The vis information structure is used in a way that it can be transfered
directly as packet. It still had to be copied into a skb because of an
extra buffer used for the actual preparation of the data. This is
unnecessary and can be replaced by a simple clone instead of an full
copy before each send.

This makes also the send_raw_packet function obsolete.

Reported-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-05 00:29:47 -07:00