summaryrefslogtreecommitdiff
path: root/drivers/staging/vt6656
AgeCommit message (Collapse)Author
2011-05-17drivers/staging/vt6656/main_usb.c: Delete unnecessary call to usb_kill_urbJulia Lawall
Since in each case nothing has been done with the recently allocated urb, it is not necessary to kill it before freeing it. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r exists@ expression urb; statement S; position p1,p2; @@ urb = usb_alloc_urb@p1(...); ... when != urb if (urb == NULL) S ... when != urb usb_kill_urb@p2(urb); @other exists@ position r.p1,r.p2; @@ ... when != usb_alloc_urb@p1(...) usb_kill_urb@p2(...); @depends on !other exists@ expression urb; position r.p1,r.p2; @@ urb = usb_alloc_urb@p1(...); ... ( -usb_kill_urb@p2(urb); +usb_free_urb(urb); ... when != urb | -usb_kill_urb@p2(urb); ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-25staging: Remove unnecessary semicolons when switch (foo) {...};Joe Perches
Done via perl script: $ cat remove_semi_switch.pl my $match_balanced_parentheses = qr/(\((?:[^\(\)]++|(?-1))*\))/; my $match_balanced_braces = qr/(\{(?:[^\{\}]++|(?-1))*\})/; foreach my $file (@ARGV) { my $f; my $text; my $oldtext; next if ((-d $file)); open($f, '<', $file) or die "$P: Can't open $file for read\n"; $oldtext = do { local($/) ; <$f> }; close($f); next if ($oldtext eq ""); $text = $oldtext; my $count = 0; do { $count = 0; $count += $text =~ s@\b(switch\s*${match_balanced_parentheses}\s*)${match_balanced_braces}\s*;@"$1$3"@egx; } while ($count > 0); if ($text ne $oldtext) { my $newfile = $file; open($f, '>', $newfile) or die "$P: Can't open $newfile for write\n"; print $f $text; close($f); } } $ Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-25staging: Remove unnecessary semicolons when for (foo) {...};Joe Perches
Done via perl script: $ cat remove_semi_for.pl my $match_balanced_parentheses = qr/(\((?:[^\(\)]++|(?-1))*\))/; my $match_balanced_braces = qr/(\{(?:[^\{\}]++|(?-1))*\})/; foreach my $file (@ARGV) { my $f; my $text; my $oldtext; next if ((-d $file)); open($f, '<', $file) or die "$P: Can't open $file for read\n"; $oldtext = do { local($/) ; <$f> }; close($f); next if ($oldtext eq ""); $text = $oldtext; my $count = 0; do { $count = 0; $count += $text =~ s@\b(for\s*${match_balanced_parentheses}\s*)${match_balanced_braces}\s*;@"$1$3"@egx; } while ($count > 0); if ($text ne $oldtext) { my $newfile = $file; open($f, '>', $newfile) or die "$P: Can't open $newfile for write\n"; print $f $text; close($f); } } $ Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-25staging: Remove unnecessary semicolons when if (foo) {...};Joe Perches
Done via perl script: $ cat remove_semi_if.pl my $match_balanced_parentheses = qr/(\((?:[^\(\)]++|(?-1))*\))/; my $match_balanced_braces = qr/(\{(?:[^\{\}]++|(?-1))*\})/; foreach my $file (@ARGV) { my $f; my $text; my $oldtext; next if ((-d $file)); open($f, '<', $file) or die "$P: Can't open $file for read\n"; $oldtext = do { local($/) ; <$f> }; close($f); next if ($oldtext eq ""); $text = $oldtext; my $count = 0; do { $count = 0; $count += $text =~ s@\b(if\s*${match_balanced_parentheses}\s*)${match_balanced_braces}\s*;@"$1$3"@egx; } while ($count > 0); if ($text ne $oldtext) { my $newfile = $file; open($f, '>', $newfile) or die "$P: Can't open $newfile for write\n"; print $f $text; close($f); } } $ Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-07Merge branch 'staging-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 * 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (28 commits) staging: usbip: bugfix for isochronous packets and optimization staging: usbip: bugfix add number of packets for isochronous frames staging: usbip: bugfixes related to kthread conversion staging: usbip: fix shutdown problems. staging: hv: Fix GARP not sent after Quick Migration staging: IIO: IMU: ADIS16400: Avoid using printk facility directly staging: IIO: IMU: ADIS16400: Fix product ID check, skip embedded revision number staging: IIO: IMU: ADIS16400: Make sure only enabled scan_elements are pushed into the ring staging: IIO: IMU: ADIS16400: Fix addresses of GYRO and ACCEL calibration offset staging: IIO: IMU: ADIS16400: Add delay after self test staging: IIO: IMU: ADIS16400: Fix up SPI messages cs_change behavior staging/rtl81*: build as loadable modules only staging: brcm80211: removed 'is_amsdu causing toss' log spam staging: brcm80211: fix for 'Short CCK' log spam staging: brcm80211: fix for 'AC_BE txop..' logs spammed problem staging: memrar: remove driver from tree staging: sep: remove last memrar remnants staging: fix hv_mouse build, needs delay.h staging: fix olpc_dcon build errors staging: sm7xx: fixed defines ... Fix up trivial conflict in drivers/staging/memrar/memrar_handler.c (deleted vs trivial spelling fixes)
2011-04-04Staging: vt665?: prevent modules from being built into the kernel.Greg Kroah-Hartman
It causes lots of linking errors when both of these modules are built into the kernel directly due to their global symbol mess. Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-31Fix common misspellingsLucas De Marchi
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-14staging: vt6656: Remove NULL check before kfreeIlia Mirkin
This patch was generated by the following semantic patch: // <smpl> @@ expression E; @@ - if (E != NULL) { kfree(E); } + kfree(E); @@ expression E; @@ - if (E != NULL) { kfree(E); E = NULL; } + kfree(E); + E = NULL; // </smpl> Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-02Staging: vt6656: Clean up switching to power saving mode.Philip Worrall
When switching to power saving mode we only need to notify the receiver when in infrastructure mode. Signed-off-by: Philip Worrall <philip.worrall@googlemail.com> Reviewed-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-02Staging: vt6656: Ensure power.c uses proper tabbing.Philip Worrall
Simplify setting of power state in power.c when sending power state notifications to the access point. Signed-off-by: Philip Worrall <philip.worrall at googlemail.com> Reviewed-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-02Staging: vt6656: Clean up spaces around parenthesized expressionsPhilip Worrall
Clean up a number of places where unneeded spaces are used around expressions. Signed-off-by: Philip Worrall <philip.worrall@googlemail.com> Reviewed-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-02Staging: vt6656: Clean up return from sending power state notificationsPhilip Worrall
Clean up power.c so that unnecessary final return statements are not used when sending power state notifications to the access point. Signed-off-by: Philip Worrall <philip.worrall@googlemail.com> Reviewed-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-02Staging: vt6656: Clean up unneccessary braces in power.cPhilip Worrall
Clean up some unnecessary braces for conditional statements where a single statement will do. Signed-off-by: Philip Worrall <philip.worrall@googlemail.com> Reviewed-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-02Staging: vt6656: Use C89 comments in power.cPhilip Worrall
Reformat the comments in power.c to use the C89 commenting style instead of the C99 commenting style. Signed-off-by: Philip Worrall <philip.worrall@googlemail.com> Reviewed-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-02Staging: vt6656: Ensure power.c uses proper tabbing.Philip Worrall
Cleanup power.c to use proper tabbing as per coding standards. Signed-off-by: Philip Worrall <philip.worrall@googlemail.com> Reviewed-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28staging: vt6656: main_usb.c remove one to many l's in the word.Justin P. Mattock
The patch below removes an extra "l" in the word. Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-21vt6656: Use request_firmware() to load firmwareBen Hutchings
The file added to linux-firmware is a copy of the current array which does not have a recognisable header, so no validation is done. Change the firmware version check to accept newer versions. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-16drivers/staging: Remove unnecessary semicolonsJoe Perches
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-16Staging: Merge 2.6.37-rc2 into staging-nextGreg Kroah-Hartman
This was necessary in order to resolve some conflicts that happened between -rc1 and -rc2 with the following files: drivers/staging/bcm/Bcmchar.c drivers/staging/intel_sst/intel_sst_app_interface.c All should be resolved now. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09staging: vt6656: resolved checkpatch findingFelipe Andres Besoain Pino
removed spaces at the start of a lines. Signed-off-by: Felipe Andres Besoain Pino <fbesoain@gnome.cl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09staging: vt6656 resolved parenthesis not spacesAriel Savini
removes before parenthesis Signed-off-by: Ariel Savini <arielsavini@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09staging: vt6656: resolved checkpatch findingMariano Reingart
removed a C99 '//' comment and added a space around '=' Signed-off-by: Mariano Reingart <reingart@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09staging: vt6656: resolved checkpatch findingMatias De la Puente
removed parentesis and spaces at the start of a line of a return Signed-off-by: Matias De la Puente <mfpuente.ar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09staging: vt6656: implement missing bracketsVasiliy Kulikov
Identation says that copy_to_user() should be called only iff wrq->u.essid.pointer is not zero. Also it is useless to call copy_to_user(0, ...). Signed-off-by: Vasiliy Kulikov <segooon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-05Staging: vt6656: Makefile: cleaned up Makefile cflag linesTracey Dent
Changed to use the proper ccflags-y option Signed-off-by: Tracey Dent <tdent48227@gmail.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16Staging: vt665x: remove unused DEF definitionCharles Clément
Signed-off-by: Charles Clément <caratorn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16staging: vt6656: Fixed indentation with spacesClelia V. Korol
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-16staging: vt6656: removed dummy errors like extra spacesEma Cuevas
As reported by checkpatch. Signed-off-by: Ema Cuevas <emacupk@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16staging: vt6656: delete some parenthesismatias
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-16staging: vt6656: Space Added after definition of Variable MSG_LEVEL_INFOEmanuel Mariano Ravera
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-16staging: vt6656: removed not required parentheses.Diego H. Iglesias
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-08Staging: vt6656: use ARRAY_SIZE macro in channel.cNikitas Angelinas
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-08-31staging: Use available error codesJulia Lawall
An error code is stored in a variable, but 0 is returned instead. Use the variable instead of 0. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r@ local idexpression x; constant C; @@ if (...) { ... x = -C ... when != x ( return <+...x...+>; | return NULL; | return; | * return ...; ) } // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-31Staging: vt6656: problems in error handlingDan Carpenter
The first kfree(pDevice) is pointless because pDevice is NULL. The second kfree(pDevice) is a double free because pDevice is the driver's private data and that is already freed by free_netdev(netdev). Also the free_netdev() error path doesn't call usb_put_dev(). Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-31staging: vt6656: resolved checkpatch findingLuis Bosch
Added spaces in for loop arguments. Signed-off-by: Luis Bosch <luis.bosch@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-31staging: vt6656: removed extra spacesVictor Rosales
Removed spaces between functions name and parenthesis. Signed-off-by: Victor Rosales <victorhrosales@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-31staging: vt6656: changed comments convention and removed spaces before tabAlejandro Emanuel Paredes
resolved checkpatch finding Signed-off-by: Alejandro Emanuel Paredes <aleparedes@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-31staging: vt6656: removed macro to test bitsAndres More
Removed custom macro used to test bits. Signed-off-by: Andres More <more.andres@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-31staging: vt6656: removed NDIS_STATUS int redefinitionAndres More
Removed int redefinition for function results. Signed-off-by: Andres More <more.andres@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-31staging: vt6656: removed custom definitions of Ethernet packet typesAndres More
Removed some unused definitions of Ethernet packet types, also replaced two of them with in-kernel counterparts from include/linux/if_ether.h Signed-off-by: Andres More <more.andres@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-31staging: vt6656: removed not useful commentsAndres More
Removed comments about who changed/added lines, they do not seem useful. Signed-off-by: Andres More <more.andres@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-31staging: vt6656: added spaces around '||'Andres More
Cleared checkpatch ERROR: spaces required around that '||' Signed-off-by: Andres More <more.andres@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-02staging: vt6656: removed NTSTATUS definitionAndres More
Replaced NTSTATUS with int, as defined in a couple of places. Signed-off-by: Andres More <more.andres@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-02staging: vt6656: simplified tests involving both multi/broad-castsAndres More
By definition the broadcast address is also a multicast address. Lindented the modified section as required by checkpatch.pl. Signed-off-by: Andres More <more.andres@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-02Staging: vt6656: Remove PUINT from ttype.hRoel Van Nyen
Remove PUINT from ttype.h Signed-off-by: Roel Van Nyen <roel.vannyen@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-22staging: vt6656: code cleanup in device_netdev_ops' device_xmit()Andres More
Lindented, cleared checkpatch findings and simplified error handling. Signed-off-by: Andres More <more.andres@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-22staging: vt6656: replaced MAX_PACKET_LEN with ETH_FRAME_LENAndres More
Replaced custom macro with one from include/linux/if_ether.h. Also removed MAX_LOOKAHEAD_SIZE as it is not used elsewhere. Signed-off-by: Andres More <more.andres@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-22staging: vt6656: replaced MIN_PACKET_LEN with ETH_ZLENAndres More
Removed custom macro with one from include/linux/if_ether.h. Also removed MIN_DATA_LEN as it is not used elsewhere. Signed-off-by: Andres More <more.andres@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-22staging: vt6656: replaced MAX_DATA_LEN with ETH_DATA_LENAndres More
Removed custom macro with one from include/linux/if_ether.h. Signed-off-by: Andres More <more.andres@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-22staging: vt6656: replaced U_CRC_LEN with ETH_FCS_LENAndres More
Removed custom macro with one from include/linux/if_ether.h. FCS is an Ethernet field that holds the CRC value. Signed-off-by: Andres More <more.andres@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>