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

128 Commits

Author SHA1 Message Date
Ilia Mirkin 6403bb7dc1 staging: vt6655: Remove NULL check before kfree
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-14 11:57:37 -07:00
Justin P. Mattock 0ffa3db994 staging: vt6655: device_main.c remove one to many l's in the word.
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-02-28 18:24:49 -08:00
Peter Huewe 34381c22b0 staging/vt6655: fix sparse warning "obsolete struct initializer"
This patch fixes the sparse warnings
"obsolete struct initializer, use C99 syntax" in vt6655/device_main.c
by converting the struct to C99 syntax

KernelVersion: linux-next-20110110

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-21 12:31:16 -08:00
Joe Perches 859171ca92 drivers/staging: Remove unnecessary semicolons
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-16 12:06:47 -08:00
Greg Kroah-Hartman e4c5bf8e3d Merge 'staging-next' to Linus's tree
This merges the staging-next tree to Linus's tree and resolves
some conflicts that were present due to changes in other trees that were
affected by files here.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-28 09:44:56 -07:00
Tracey Dent a1ecc6a3fe Staging: vt6655: Makefile: cleaned up Makefile cflag lines
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-10-05 11:56:38 -07:00
Charles Clément 4f10d883be Staging: vt6655: remove unused update_BssList definition
Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20 17:01:24 -07:00
Dan Carpenter dd173abfea Staging: vt6655: fix buffer overflow
"param->u.wpa_associate.wpa_ie_len" comes from the user.  We should
check it so that the copy_from_user() doesn't overflow the buffer.

Also further down in the function, we assume that if
"param->u.wpa_associate.wpa_ie_len" is set then "abyWPAIE[0]" is
initialized.  To make that work, I changed the test here to say that if
"wpa_ie_len" is set then "wpa_ie" has to be a valid pointer or we return
-EINVAL.

Oddly, we only use the first element of the abyWPAIE[] array.  So I
suspect there may be some other issues in this function.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20 16:31:54 -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
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
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
Julia Lawall 4d9db977f9 staging: Use available error codes
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-31 15:05:12 -07:00
Kulikov Vasiliy 13b631a599 staging: vt6655: do not use PCI resources before pci_enable_device()
IRQ and resource[] may not have correct values until
after PCI hotplug setup occurs at pci_enable_device() time.

The semantic match that finds this problem is as follows:

// <smpl>
@@
identifier x;
identifier request ~= "pci_request.*|pci_resource.*";
@@

(
* x->irq
|
* x->resource
|
* request(x, ...)
)
 ...
*pci_enable_device(x)
// </smpl>

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-31 11:13:57 -07:00
Charles Clément 7b6a001313 Staging: vt6655: replace BOOL with in kernel bool
Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-02 18:17:57 -07:00
Charles Clément 5a5a2a6ad4 Staging: vt6655: replace FALSE with in kernel false
Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-02 18:17:38 -07:00
Charles Clément 1b12068a80 Staging: vt6655: replace TRUE with in kernel true
Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-02 18:17:12 -07:00
Kulikov Vasiliy 5bddefad3e Staging: vt6655: use for_each_pci_dev()
Use for_each_pci_dev() to simplify the code.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-08 13:03:28 -07:00
Charles Clément 388bf2e8fe Staging: vt6655: simplify broadcast and multicast ethernet address test
A broadcast address is also a multicast address so simplify test cases where
possible.

As suggested by Joe Perches.

Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-08 13:02:56 -07:00
Charles Clément 5e95efecb5 Staging: vt6655: Add TODO entries on x86-64 pointers and .data size
As suggested by Jiri Slaby.

Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-25 11:11:22 -07:00
Charles Clément fe4f34bde2 Staging: vt6655: remove PUINT typedef
Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-25 11:11:21 -07:00
Charles Clément 3fc9b584c2 Staging: vt6655: remove BYTE typedef
Replace all occurrences with unsigned char type.

Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-24 14:23:18 -07:00
Charles Clément 2986db5fd3 Staging: vt6655: remove WORD typedef
Replace all occurrences with unsigned short type.

Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-24 14:23:17 -07:00
Charles Clément 0f4c60d61e Staging: vt6655: remove DWORD typedef
Replace all occurrences with unsigned long type, except for pointer fields that
should be u32 in packed structures and 8-byte-aligned 8 byte long structure
QWORD.

Thanks to Jiri Slaby for pointing out that simply replacing by unsigned long is
wrong on x86-64 arch.

Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-24 14:23:17 -07:00
Charles Clément 412b2d08b9 Staging: vt6655: remove DWORD_PTR pointer typedef
Use unsigned long instead.

Signed-off-by: Charles Clément <caratorn@gmail.com>
2010-06-22 15:43:08 -07:00
Charles Clément dec572cbe6 Staging: vt6655: remove ULONG_PTR typedef
Signed-off-by: Charles Clément <caratorn@gmail.com>
2010-06-22 15:43:08 -07:00
Charles Clément 79566eb2df Staging: vt6655: move channel mapping code from card.c to channel.c
Move functions managing the channel mapping to a new channel.c file, as done in
the staging VT6656 driver. The function names contained in card.c were prefixed
with CARD followed by the first letter of the return code, remove this and use
more coherent function names.

The following functions moved and were renamed:

ChannelValid			-> is_channel_valid
CARDbSetChannel			-> set_channel
CARDvInitChannelTable		-> init_channel_table
CARDbyGetChannelMapping 	-> get_channel_mapping
CARDvSetCountryInfo		-> set_country_info
CARDbySetSupportChannels 	-> set_support_channels
CARDbChannelGetList		-> channel_get_list
CARDvSetCountryIE		-> set_country_IE
CARDbGetChannelMapInfo		-> get_channel_map_info
CARDvSetChannelMapInfo		-> set_channel_map_info
CARDvClearChannelMapInfo	-> clear_channel_map_info
CARDbyAutoChannelSelect		-> auto_channel_select
CARDbyGetChannelNumber		-> get_channel_number

Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-22 15:39:58 -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
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