summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* staging: keucr: check kmalloc() return valueVasiliy Kulikov2010-09-213-0/+10
| | | | | | | kmalloc() may fail, if so return error code. Signed-off-by: Vasiliy Kulikov <segooon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: ti-st: mv headers to ti_wilink_stPavan Savoy2010-09-2110-486/+417Star
| | | | | | | | | | | move all the header information to ti_wilink_st.h. This header would then not only serve the local modules like the st_core.c, st_kim.c and st_ll.c but also the external modules/protocol drivers that are dependent on the shared transport driver. Modify the source files to include the new header ti_wilink_st.h, Signed-off-by: Pavan Savoy <pavan_savoy@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: ti-st: set right the data typesPavan Savoy2010-09-212-21/+21
| | | | | | | | | replace uint and family by a much more proper u8/u16 types. This is required specifically for data members of structures coming in from the chip and data members parsed from the binary firmware file. Signed-off-by: Pavan Savoy <pavan_savoy@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: ath6kl: Fixing a race condition during initializationVipin Mehta2010-09-211-2/+4
| | | | | | | | | | | | | The commit fixes a race condition in the initialization portion of the driver. The problem was observed while testing with the kernel in the staging-next tree. The wait on the ready event is signalled prematurely before setting the arVersion.wlan_ver and arVersion.abi_ver. The code waiting on this semaphore checks for the validity of these values and hence may proceed with an un-updated values of these fields. The wakeup signal is now sent after these values are set. Signed-off-by: Vipin Mehta <vmehta@atheros.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: ath6kl: Fixing a compile errorVipin Mehta2010-09-211-1/+1
| | | | | | | | | | | | The commit fixes a compilation error that was encountered while using a specific kernel configuration file. The problem was the use of some functions defined in <linux/semaphore.h> without including the header file explicitly. It was probably working before because of the dependency getting implicitly satisfied via some other header file. Reported-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Vipin Mehta <vmehta@atheros.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: ath6kl: Removing duplicate includesVipin Mehta2010-09-214-16/+0Star
| | | | | | | | | Eliminating the inclusion of the same header file more than once. The files being removed are already included by osapi_linux.h. Reported-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Vipin Mehta <vmehta@atheros.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: comedi: fix printk() coding style issue in adl_pci9111.cMaurice Dawson2010-09-211-7/+10
| | | | | | | | This is a patch to the adl_pci9111.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>
* Staging: vt6655: remove unused update_BssList definitionCharles Clément2010-09-211-7/+0Star
| | | | | Signed-off-by: Charles Clément <caratorn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: batman-adv: Introduce update_primary_addr to update mac addressMarek Lindner2010-09-211-8/+14
| | | | | | | | | | 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>
* Staging: batman-adv: Track references of batman_if in set_primary_ifSven Eckelmann2010-09-211-0/+8
| | | | | | | | | 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>
* Staging: batman-adv: count batman_if list queries as referenceSven Eckelmann2010-09-213-19/+56
| | | | | | | | | | | | | | | 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>
* Staging: batman-adv: Use refcnt to track usage count of batman_ifSven Eckelmann2010-09-213-2/+17
| | | | | | | | | | | | | | | | | | | | | | 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>
* Staging: batman-adv: Use synchronize_rcu instead of call_rcuSven Eckelmann2010-09-213-10/+2Star
| | | | | | | | | | | | | | | 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>
* Staging: batman-adv: Remove unneeded rcu_read_lockSven Eckelmann2010-09-211-2/+0Star
| | | | | | | | | | | 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>
* Staging: batman-adv: Always protect list_for_each_entry_rcu with RCUSven Eckelmann2010-09-211-0/+2
| | | | | | | | | 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>
* Staging: batman-adv: Introduce if_list_lock to protect if_listSven Eckelmann2010-09-211-2/+15
| | | | | | | | | | | | | 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>
* Staging: batman-adv: wait for call_rcu before unloading moduleSven Eckelmann2010-09-211-1/+1
| | | | | | | | | | | | | | | 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>
* Staging: batman-adv: Mark debugfs files as nonseekableSven Eckelmann2010-09-212-0/+5
| | | | | | | | | 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>
* Staging: batman-adv: Move mailing list address to .orgSven Eckelmann2010-09-212-3/+4
| | | | | | | | | 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>
* Staging: batman-adv: checkpatch cleanup of commentsSven Eckelmann2010-09-213-18/+19
| | | | | | | | | | | | | 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>
* staging: hv: Remove camel cases of vmbus packet buffer structuresHaiyang Zhang2010-09-215-47/+47
| | | | | | | | | | | 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>
* staging: octeon: '&pointer[0]' to 'pointer' fixAndy Shevchenko2010-09-211-1/+1
| | | | | Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: rt2870: '&pointer[0]' to 'pointer' fixAndy Shevchenko2010-09-211-1/+1
| | | | | Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: vt6655: '&pointer[0]' to 'pointer' fixAndy Shevchenko2010-09-212-3/+2Star
| | | | | Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: ath6kl: '&pointer[0]' to 'pointer' fixAndy Shevchenko2010-09-213-5/+5
| | | | | Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: cxt1e1: '&pointer[0]' to 'pointer' fixAndy Shevchenko2010-09-211-1/+1
| | | | | Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: otus: '&pointer[0]' to 'pointer' fixAndy Shevchenko2010-09-211-1/+1
| | | | | Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: rtl8712: '&pointer[0]' to 'pointer' fixAndy Shevchenko2010-09-211-1/+1
| | | | | Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: wlags49_h2: '&pointer[0]' to 'pointer' fixAndy Shevchenko2010-09-211-1/+1
| | | | | Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: rt2860: '&pointer[0]' to 'pointer' fixAndy Shevchenko2010-09-219-15/+14Star
| | | | | Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: Use static const char * const where possibleJoe Perches2010-09-162-9/+10
| | | | | Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: vt665x: remove unused DEF definitionCharles Clément2010-09-162-8/+0Star
| | | | | Signed-off-by: Charles Clément <caratorn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: ti-st: fix kim platform device idPavan Savoy2010-09-161-1/+8
| | | | | | | | | | | 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>
* staging: brcm80211: use string native libraryAndy Shevchenko2010-09-169-292/+23Star
| | | | | Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: brcm80211: use native ctype libraryAndy Shevchenko2010-09-164-79/+11Star
| | | | | Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: usbip: resolved a space in a commentAgustin March2010-09-161-1/+1
| | | | | | | 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>
* staging: msm: Remove pr_<level> uses of KERN_<level>Joe Perches2010-09-161-1/+1
| | | | | Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: keucr: fix keucr lost disconnectAl Cho2010-09-161-12/+11Star
| | | | | | | | | | 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>
* staging: vt6656: Fixed indentation with spacesClelia V. Korol2010-09-161-6/+6
| | | | | | | 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>
* staging: vt6656: removed dummy errors like extra spacesEma Cuevas2010-09-161-4/+3Star
| | | | | | | As reported by checkpatch. Signed-off-by: Ema Cuevas <emacupk@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: vt6656: delete some parenthesismatias2010-09-161-1/+1
| | | | | | | 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>
* staging: vt6656: Space Added after definition of Variable MSG_LEVEL_INFOEmanuel Mariano Ravera2010-09-161-1/+1
| | | | | | | 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>
* staging: vt6656: removed not required parentheses.Diego H. Iglesias2010-09-161-1/+1
| | | | | | | 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>
* staging: comedi: fix signess bugVasiliy Kulikov2010-09-162-2/+2
| | | | | | | | 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>
* staging: crystalhd: fix signed bugVasiliy Kulikov2010-09-161-1/+1
| | | | | | | | 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>
* staging: solo6010: fix signess bugVasiliy Kulikov2010-09-162-2/+2
| | | | | | | | 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>
* staging: ST_BT depends on RFKILLRandy Dunlap2010-09-161-1/+1
| | | | | | | | | 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>
* staging/bcm: fix build for CONFIG_PM not enabledRandy Dunlap2010-09-161-0/+2
| | | | | | | | | 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>
* staging/bcm: fix printk format warningsRandy Dunlap2010-09-162-12/+12
| | | | | | | | | | | | | | 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>
* staging/keucr: fix build when CONFIG_PM is not enabledRandy Dunlap2010-09-161-0/+9
| | | | | | | | | | | | | 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>