Commit Graph

19633 Commits

Author SHA1 Message Date
Malcolm Priestley 13fe62ae6a staging: vt6656: rxtx s_vFillRTSHead create union of vnt_rts*/vnt_cts* structures.
Only one of vnt_rts*/vnt_cts* structures are accessed at any one time.

Join these structures in to a single union.

These will eventually form the tail structure of vnt_tx_buffer and
include structures vnt_tx_datahead*

Structures in s_vFillCTSHead will join in next patch series.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-26 06:26:47 -07:00
Malcolm Priestley 9d2578c170 staging: vt6656: rxtx.c s_vFillRTSHead Parse out struct vnt_rts_a_fb to new function.
Parse out vnt_rts_a_fb code to new function vnt_rxtx_rts_a_fb_head.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-26 06:26:47 -07:00
Malcolm Priestley 1712633d72 staging: vt6656: rxtx.c s_vFillRTSHead Parse out struct vnt_rts_ab to new function.
Parse out vnt_rts_ab code to new function vnt_rxtx_rts_ab_head.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-26 06:26:47 -07:00
Malcolm Priestley ec91713a29 staging: vt6656: rxtx.c s_vFillRTSHead Parse out struct vnt_rts_g_fb to new function.
Parse out vnt_rts_g_fb code to new function vnt_rxtx_rts_g_fb_head.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-26 06:26:46 -07:00
Malcolm Priestley 5e67ee4956 staging: vt6656: rxtx.c s_vFillRTSHead Parse out struct vnt_rts_g to new functions.
Parse out vnt_rts_g code to new function vnt_rxtx_rts_g_head.

Also create a new common calling function vnt_fill_ieee80211_rts
to fill the ieee80211_rts structure.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-26 06:26:46 -07:00
Malcolm Priestley 2dc22d5a22 staging: vt6656: s_vGenerateTxParameter pvRrvTime should never be NULL
If pvRrvTime is NULL the whole structure is NULL, so
remove if statements and consolidate to single return.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-26 06:25:34 -07:00
Malcolm Priestley b6c416ce68 staging: vt6656: s_vGenerateTxParameter dead code bDisCRC
As result of patch
vt6656: rxtx.c s_vFillCTSHead remove dead code bDisCRC

bDisCRC is unused.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-26 06:25:34 -07:00
Malcolm Priestley 09bd0f3563 staging: vt6656: rxtx.c s_vFillCTSHead remove dead code bDisCRC
As result of patch
vt6656: device.h Remove dead code bSoftwareGenCrcErr.

dDiscCRC is unused.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-26 06:25:34 -07:00
Malcolm Priestley fedbfe7eb8 staging: vt6656: rxtx.c s_vFillRTSHead remove dead bDiscCRC
As result of patch
vt6656: device.h Remove dead code bSoftwareGenCrcErr.

dDiscCRC is unused.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-26 06:25:33 -07:00
Malcolm Priestley 4235f72fbc staging: vt6656: device.h Remove dead code bSoftwareGenCrcErr.
Probably an error in earlier firmware is never enabled so remove.

bPacketToWirelessUsb remove dead if/else and variables.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-26 06:25:33 -07:00
Larry Finger d33b128ea9 staging: r8188eu: Fix build errors for allyesconfig
This driver has some global names that are the same as found in
driver r8712. Fix the allyesconfig build errors by changing the
names of those routines.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-25 10:21:01 -07:00
Larry Finger 57f1d4d39e staging: gdm724x: Remove tests of KERNELVERSION
Kernel code need not test for KERNELVERSION. Besides being unnecessary
for an in-kernel driver, these lines will cause a build failure for any
source tree with a stale include/linux/version.h.

This patch is only compile tested.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-25 09:58:36 -07:00
Greg Kroah-Hartman e7c8a7e350 staging: line6: use default sysfs attribute macros
Move to use the DEVICE_ATTR_RW/RO macros, making it easier to audit the
sysfs file permissions, and get rid of the "empty" callback for
read-only files, saving lines of code.

Cc: Stefan Hajnoczi <stefanha@gmail.com>
Cc: Laurent Navet <laurent.navet@gmail.com>
Cc: Johannes Thumshirn <morbidrsa@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-24 10:36:49 -07:00
Greg Kroah-Hartman 3b7cf04f87 staging: quickstart: fix up sysfs file permissions
Use the default DEVICE_ATTR_RO/RW macros to specify the file permissions
better, and make them easier to audit.

And did we really want any user to be able to write to this file, I kind
of doubt it...

Cc: Jiang Liu <jiang.liu@huawei.com>
Cc: Toshi Kani <toshi.kani@hp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-24 10:34:53 -07:00
Greg Kroah-Hartman 00009615c3 staging: keucr: be explicit to the sysfs file permissions
Use the DEVICE_ATTR_RW() macro to be clearer as to the permissions for
the sysfs file, making it easier to audit the code.

Cc: Al Cho <acho@novell.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-24 10:33:07 -07:00
Greg Kroah-Hartman 89dcefb5af staging: frontier: use better DEVICE_ATTR_ macros
Use the DEVICE_ATTR_RO/RW macros to better describe the permissions on
the file, and make them easier to audit.

Cc: David Täht <d@teklibre.com>
Cc: Sara Bird <sara.bird.iar@gmail.com>
Cc: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-24 10:30:28 -07:00
Greg Kroah-Hartman 9d3ab80174 staging: android: timed_output: fix sysfs file creation race
The sysfs file for the driver was being created _after_ the device was
announced to userspace, causing a race with any tools looking for sysfs
files.

Fix the race by using the default attribute group for the class.

Cc: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-24 10:27:29 -07:00
Greg Kroah-Hartman 76e1f486b2 staging: wlags49_h2: remove sysfs file
The sysfs file in this driver is showing a raft of debugging values,
none of which belong in sysfs, let alone in a single sysfs file.  If
these really need to be described somewhere, they should go into
debugfs.

For now, just delete the sysfs file, which removes a bunch of files from
the tree.

Cc: Henk de Groot <pe1dnn@amsat.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-24 10:24:40 -07:00
Mauro Carvalho Chehab 04e40bdd67 [media] msi3101: Fix compilation on i386
as reported by: kbuild test robot <fengguang.wu@intel.com>:
	[linuxtv-media:master 459/499] sdr-msi3101.c:undefined reference to `__umoddi3'

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-24 13:35:14 -03:00
Ian Abbott 3955dfa821 staging: comedi: bug-fix NULL pointer dereference on failed attach
Commit dcd7b8bd63 ("staging: comedi: put
module _after_ detach" by myself) reversed a couple of calls in
`comedi_device_attach()` when recovering from an error returned by the
low-level driver's 'attach' handler.  Unfortunately, that introduced a
NULL pointer dereference bug as `dev->driver` is NULL after the call to
`comedi_device_detach()`.   We still have a pointer to the low-level
comedi driver structure in the `driv` variable, so use that instead.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Cc: <stable@vger.kernel.org> # 3.10+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-23 10:31:47 -07:00
Geert Uytterhoeven 917ea9a3e1 staging: lustre: Use proper constant types for L*_POISON values
On 32-bit m68k, I get lots of warnings like:

    warning: integer constant is too large for ‘long’ type

Switch the L*_POISON definitions from too-large constants and casts
to the proper constant types to fix this.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-23 10:21:21 -07:00
Rupesh Gujare 4e7fb82977 staging: ozwpan: Fix Documentation style.
This patch fixes Kernel Documentation style.

Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-23 10:12:32 -07:00
Rupesh Gujare dfc065f19f staging: ozwpan: Fix wrong error check.
schedule_work() returns true if succeeded & false on failure,
error check was doing exactly reverse.
Also removes extra variable.

Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-23 10:12:32 -07:00
Rupesh Gujare 9efed32c22 staging: ozwpan: Remove memset
As we are initialising structure, we do not require
memset().

Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-23 10:12:32 -07:00
Malcolm Priestley ec37d8b67b staging: vt6656: rxtx.c s_vFillTxKey fill structure vnt_mic_hdr
Replace the pointer offsets with structure of mic_hdr with
endian conversion where needed.

Replace vFillTxKey argument u8 *pMICHDR with struct vnt_mic_hdr *mic_hdr
and fix type of calling functions.

An extra check that mic_hdr is not NULL

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-23 10:11:03 -07:00
Malcolm Priestley 5a5d6a80cf staging: vt6656: desc.h Remove typedef struct tagSMICHDRHead to new structure in rxtx.h
To new structure.
typedef struct tagSMICHDRHead -> struct vnt_mic_hdr

This is only needed by rxtc.c so moved to rxtx.h

The new structure is the same size as the old but
contains the members as pointer referenced in
rxtx.c s_vFillTxKey
u8 id
	*pMICHDR = 0x59;
u8 tx_priority;
	*((u8 *)(pMICHDR+1)) = 0; // TxPriority
u8 mic_addr2[6];
	memcpy(pMICHDR+2, &(pMACHeader->addr2[0]), 6);
__be32 tsc_47_16;
	pMICHDR+8 = HIBYTE(HIWORD(pTransmitKey->dwTSC47_16));
	pMICHDR+9 = LOBYTE(HIWORD(pTransmitKey->dwTSC47_16));
	pMICHDR+10 = HIBYTE(LOWORD(pTransmitKey->dwTSC47_16));
	pMICHDR+11 = LOBYTE(LOWORD(pTransmitKey->dwTSC47_16));
__be16 tsc_15_0;
	pMICHDR+12 = HIBYTE(pTransmitKey->wTSC15_0);
	pMICHDR+13 = LOBYTE(pTransmitKey->wTSC15_0);
__be16 payload_len;
	pMICHDR+14 = HIBYTE(wPayloadLen);
	pMICHDR+15 = LOBYTE(wPayloadLen);
__be16 hlen;
	pMICHDR+16 = 0; // HLEN[15:8]
	pMICHDR+17 = 28; // HLEN[7:0]
__le16 frame_control;
	memcpy(pMICHDR+18, (u8 *)&wValue, 2); // MSKFRACTL
u8 addr1[6];
	memcpy(pMICHDR+20, &(pMACHeader->addr1[0]), 6);
u8 addr2[6];
	memcpy(pMICHDR+26, &(pMACHeader->addr2[0]), 6);
u8 addr3[6];
	memcpy(pMICHDR+32, &(pMACHeader->addr3[0]), 6);
__le16 seq_ctrl;
	memcpy(pMICHDR+38, (u8 *)&wValue, 2); // MSKSEQCTL
u8 addr4[6];
	memcpy(pMICHDR+40, &(pMACHeader->addr4[0]), 6);
u16 packing; /* packing to 48 bytes */

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-23 10:11:02 -07:00
Malcolm Priestley f115e76aea staging: vt6656: rxtx.c endian correct wTimeStampOff
wTimeStampOff needs to be endian corrected

Create new function vnt_time_stamp_off to return little endian u16 value.

Private variable byPreambleType is common to all calling functions is included.

variable rate to set the desired rate.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-23 10:11:02 -07:00
Malcolm Priestley 9c3806d5a8 staging: vt6656: rxtx.c s_create new function to endian correct uGetTxRsvTime.
We can't endian correct uGetTxRsvTime because it is called by other functions.

Create new function to vnt_rxtx_rsvtime_le16 to return little endian u16
value.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-23 10:11:02 -07:00
Malcolm Priestley cfabe4b43c staging: vt6656: s_uGetRTSCTSRsvTime return u16 endian corrected value.
s_uGetRTSCTSRsvTime always needs to be corrected to u16 endian value.

Change function to return u16 endian corrected value.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-23 10:11:02 -07:00
Masanari Iida 26085a70b3 staging: gdm724x: Fix typo in comments
Correct spelling typo in comments within staging/gdm724x

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-23 10:01:43 -07:00
Masanari Iida 6abaf5803d staging: bcm: Fix typo in comments
Correct spelling typo in staging/bcm

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-23 10:01:43 -07:00
navin patidar 9fc0944a85 staging: rtl8187se: Remove pt_regs * irq handler parameter
struct pt_regs pointer is no longer passed as a irq handler
argument.

v2:
remove rtl8180_interrupt cast to (void *) .

Signed-off-by: navin patidar <navinp@cdac.in>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-23 10:01:43 -07:00
Anthony Foiani 92e11aef70 staging: usbip: fix up alignment in long options list
Re-align the option lists.

Signed-off-by: Anthony Foiani <anthony.foiani@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-23 09:54:27 -07:00
Anthony Foiani 5894af89f2 staging: usbip: properly handle "-l" / "--log" option
This option is in the long options list, and it's handled in the
option processing loop, but the optstring didn't include it.

Signed-off-by: Anthony Foiani <anthony.foiani@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-23 09:54:27 -07:00
Anthony Foiani 7182f8f81a staging: usbip: set usbipd server port via "-t" / "--tcp-port" option.
Add an option "-t" / "--tcp-port" to specify the TCP port to listen
on.  Downcase associated variables as they're no longer constants.

Signed-off-by: Anthony Foiani <anthony.foiani@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-23 09:54:26 -07:00
Anthony Foiani 9ead219b31 staging: usbip: add "-P" / "--pid" option to save usbipd process id
Introduce option "-P" / "--pid" to request that usbipd save its PID to
a file while running.

Signed-off-by: Anthony Foiani <anthony.foiani@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-23 09:54:26 -07:00
Lidza Louina f6f92a300e staging: dgap: removes proc.h
This patch removes the proc.h file and removes '#include
dgap_proc.h' from headers in the driver.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-23 09:52:02 -07:00
Lidza Louina 13db3befdb staging: dgap: removes proc.c
This patch removes proc.c. This code isn't needed anymore because
a previous patch removed references to it and because the kernel
uses sysfs instead of proc.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-23 09:52:02 -07:00
Lidza Louina cbe0ffb520 staging: dgap: removes references to proc code
This patch removes references to proc functions and
structs in the code. The kernel uses sysfs instead
of proc now.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-23 09:51:19 -07:00
Lidza Louina 07b96937cf staging: dgap: removes mgmt.h
This patch removes mgmt.h and the headers that include
it of files in dgap. This file isn't needed for the
driver to work with the kernel.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-23 09:50:23 -07:00
Lidza Louina 6dacb8b687 staging: dgap: removes mgmt.c
This patch removes mgmt.c. This file isn't needed for the
driver to work with the kernel.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-23 09:50:00 -07:00
Lidza Louina 37351073d8 staging: dgap: removes references to mgmt code
This patch removes references to mgmt functions from
the code. The files mgmt.c and mgmt.h will be
removed in the patches that follow.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-23 09:49:19 -07:00
Wolfram Sang 687b81d083 i2c: move OF helpers into the core
I2C of helpers used to live in of_i2c.c but experience (from SPI) shows
that it is much cleaner to have this in the core. This also removes a
circular dependency between the helpers and the core, and so we can
finally register child nodes in the core instead of doing this manually
in each driver. So, fix the drivers and documentation, too.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2013-08-23 10:22:20 +02:00
Lidza Louina 8287ac00dd staging: dgnc: driver.c: removes dgnc_mbuf function
This patch removes the dgnc_mbuf function. This function was causing the
errors:

drivers/staging/dgnc/dgnc_driver.c: In function 'dgnc_mbuf.constprop.0':
drivers/staging/dgnc/dgnc_driver.c:945:1: warning: the frame size of 1032
bytes is larger than 1024 bytes [-Wframe-larger-than=]

drivers/staging/dgnc/dgnc_tty.c: In function 'dgnc_sniff_nowait_nolock':
drivers/staging/dgnc/dgnc_tty.c:614:1: warning: the frame size of 1056
bytes is larger than 1024 bytes [-Wframe-larger-than=]

This patch removes it so the kernel won't be making noise when its
device is found on the system.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 12:35:26 -07:00
Lidza Louina b3cc872c1b staging: dgap: adds driver to kernel build
This patch adds the dgap driver to the kernel build process.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:47:53 -07:00
Larry Finger b63c05394f staging: r8188eu: Turn on build of new driver
This commit modifies drivers/staging/Makefile, and adds the
drivers/staging/rtl8188eu/Makefile.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:31 -07:00
Larry Finger 9a60271187 staging: r8188eu: Add files for new driver - part 31
This commit adds files include/sta_info.h, include/usb_hal.h,
include/usb_ops.h, include/usb_ops_linux.h, include/usb_osintf.h,
include/usb_vendor_req.h, include/wifi.h, include/wlan_bssdef.h,
and include/xmit_osdep.h.

The commit also deleted include/autoconf.h, which is no longer needed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:31 -07:00
Larry Finger 6ddfa35a4a staging: r8188eu: Insert Kconfig files for new driver
The configuration options include those to add code needed for
AP mode, and peer-to-peer mode.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:31 -07:00
Larry Finger 7f8a0fba8c staging: r8188eu: Add files for new driver - part 30
This commit adds files include/rtw_security.h, include/rtw_sreset.h,
include/rtw_version.h, and include/rtw_xmit.h.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:13 -07:00
Larry Finger fff3340fc0 staging: r8188eu: Add files for new driver - part 29
This commit adds files include/rtw_p2p.h, include/rtw_pwrctrl.h,
include/rtw_qos.h, include/rtw_recv.h, and include/rtw_rf.h.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:12 -07:00
Larry Finger 4218e5be86 staging: r8188eu: Add files for new driver - part 28
This commit adds files include/rtw_mlme.h, include/rtw_mlme_ext.h,
include/rtw_mp.h, include/rtw_mp_ioctl.h, and include/rtw_mp_phy_regdef.h.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:12 -07:00
Larry Finger 93dc9cc661 staging: r8188eu: Add files for new driver - part 27
This commit adds files include/rtw_ht.h, include/rtw_io.h,
include/rtw_ioctl.h, include/rtw_ioctl_rtl.h, include/rtw_ioctl_set.h,
include/rtw_iol.h, and include/rtw_led.h.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:12 -07:00
Larry Finger 475b922e84 staging: r8188eu: Add files for new driver - part 26
This commit adds files include/rtw_android.h, include/rtw_ap.h,
include/rtw_br_ext.h, include/rtw_cmd.h, include/rtw_debug.h,
include/rtw_eeprom.h, include/rtw_efuse.h, and include/rtw_event.h.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:12 -07:00
Larry Finger 58c434013a staging: r8188eu: Add files for new driver - part 25
This commit adds files include/recv_osdep.h, include/rtl8188e_cmd.h,
include/rtl8188e_dm.h, include/rtl8188e_hal.h, include/rtl8188e_led.h,
include/rtl8188e_recv.h, include/rtl8188e_rf.h, include/rtl8188e_spec.h,
include/rtl8188e_sreset.h, and include/rtl8188e_xmit.h.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:12 -07:00
Larry Finger f9f08d70b0 staging: r8188eu: Add files for new driver - part 24
This commit adds files include/odm.h, include/odm_HWConfig.h,
include/odm_RTL8188E.h, include/odm_RegConfig8188E.h, include/odm_RegDefine11AC.h,
include/odm_RegDefine11N.h, include/odm_debug.h, include/odm_interface.h,
include/odm_precomp.h, include/odm_reg.h, include/odm_types.h,
include/osdep_intf.h, and include/osdep_service.h.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:12 -07:00
Larry Finger fe223017c4 staging: r8188eu: Add files for new driver - part 23
This commit adds files include/ieee80211.h, include/ieee80211_ext.h,
include/if_ether.h, include/ioctl_cfg80211.h, include/ip.h,
include/mlme_osdep.h, include/mp_custom_oid.h, and include/nic_spec.h.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:11 -07:00
Larry Finger b1da99bbf2 staging: r8188eu: Add files for new driver - part 22
This commit adds files include/Hal8188EFWImg_CE.h, include/Hal8188EPhyCfg.h,
include/Hal8188EPhyReg.h, include/Hal8188EPwrSeq.h, include/Hal8188ERateAdaptive.h,
include/Hal8188EReg.h, include/HalHWImg8188E_BB.h, include/HalHWImg8188E_FW.h,
include/HalHWImg8188E_MAC.h, include/HalHWImg8188E_RF.h, include/HalPhyRf.h,
include/HalPhyRf_8188e.h, include/HalPwrSeqCmd.h, and include/HalVerDef.h.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:11 -07:00
Larry Finger a7c947b7f3 staging: r8188eu: Add files for new driver - part 21
This commit adds files include/autoconf.h, include/basic_types.h,
include/cmd_osdep.h, include/drv_types.h, include/drv_types_linux.h,
include/ethernet.h. include/h2clbk.h, include/hal_com.h, and include/hal_intf.h.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:11 -07:00
Larry Finger c2478d3907 staging: r8188eu: Add files for new driver - part 20
This commit adds files os_dep/usb_intf.c, os_dep/usb_ops_linux.c,
and os_dep/xmit_linux.c.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:11 -07:00
Larry Finger 5adef66acf staging: r8188eu: Add files for new driver - part 19
This commit adds files os_dep/os_intfs.c, os_dep/recv_linux.c,
and os_dep/rtw_android.c.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:11 -07:00
Larry Finger d3f4b8280a staging: r8188eu: Add files for new driver - part 18
This commit adds files hal/usb_halinit.c and hal/usb_ops_linux.c.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:11 -07:00
Larry Finger 7bc88639ad staging: r8188eu: Add files for new driver - part 17
This commit adds files hal/rtl8188eu_led.c, hal/rtl8188eu_recv.c,
and hal/rtl8188eu_xmit.c.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:10 -07:00
Larry Finger a2c60d42d9 staging: r8188eu: Add files for new driver - part 16
This commit adds files os_dep/ioctl_linux.c, os_dep/mlme_linux.c, and
os_dep/osdep_service.c.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:06 -07:00
Larry Finger fc324b6a93 staging: r8188eu: Add files for new driver - part 15
This commit adds files hal/rtl8188e_rxdesc.c, hal/rtl8188e_sreset.c, and
hal/rtl8188e_xmit.c.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:01 -07:00
Larry Finger 615a4d12e5 staging: r8188eu: Add files for new driver - part 14
This commit adds files hal/rtl8188e_hal_init.c, hal/rtl8188e_mp.c,
hal/rtl8188e_phycfg.c, and hal/rtl8188e_rf6052.c.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:01 -07:00
Larry Finger 7ef8ded0cf staging: r8188eu: Add files for new driver - part 13
This commit adds files hal/odm_RTL8188E.c, hal/odm_RegConfig8188E.c,
hal/rtl8188e_cmd.c, and hal/rtl8188e_dm.c.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:01 -07:00
Larry Finger 6c984c81fe staging: r8188eu: Add files for new driver - part 12
This commit adds files odm_HWConfig.c and odm_interface.c.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:01 -07:00
Larry Finger 18b0950e02 staging: r8188eu: Add files for new driver - part 11
This commit adds files hal/HalPwrSeqCmd.c, hal/odm.c, and hal/odm_debug.c.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:01 -07:00
Larry Finger 8ccfdd440e staging: r8188eu: Add files for new driver - part 10
This commit adds files hal/HalPhyRf.c, hal/HalPhyRf_8188e.c, and hal/hal_intf.c.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:01 -07:00
Larry Finger c59c7267a2 staging: r8188eu: Add files for new driver - part 9
This commit adds files hal/HalHWImg8188E_BB.c, hal/HalHWImg8188E_MAC.c, hal/HalHWImg8188E_RF.c, and
hal/hal_com.c.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:00 -07:00
Larry Finger a0da203b14 staging: r8188eu: Add files for new driver - part 8
This commit adds files hal/Hal8188EFWImg_CE.c, hal/Hal8188EPwrSeq.c, and hal/Hal8188ERateAdaptive.c.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:00 -07:00
Larry Finger d6846af679 staging: r8188eu: Add files for new driver - part 7
This commit adds core/rtw_wlan_util.c and core/rtw_xmit.c

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:00 -07:00
Larry Finger 1b509caf5c staging: r8188eu: Add files for new driver - part 6
This commit adds core/rtw_security.c, core/rtw_sreset.c, and core/rtw_sta_mgt.c.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:00 -07:00
Larry Finger 1cc18a22b9 staging: r8188eu: Add files for new driver - part 5
This commit adds core/rtw_pwrctrl.c, core/rtw_recv.c, and core/rtw_rf.c

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:00 -07:00
Larry Finger 7b464c9fa5 staging: r8188eu: Add files for new driver - part 4
This commit adds files core/rtw_led.c, core/rtw_mlme.c, core/rtw_mlme_ext.c,
core/rtw_mp.c, core/rtw_mp_ioctl.c, and core/rtw_p2p.c

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:00 -07:00
Larry Finger 105981e601 staging: r8188eu: Add files for new driver - part 3
This commit adds core/rtw_io.c, core/rtw_ioctl_set.c, and core/rtw_iol.c

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:19:59 -07:00
Larry Finger 06a0588468 staging: r8188eu: Add files for new driver - part 2
This commit adds core/rtw_debug.c, core/rtw_efuse.c, and core/rtw_ieee80211.c

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:19:59 -07:00
Larry Finger 9a7fe54ddc staging: r8188eu: Add source files for new driver - part 1
This commit adds core/rtw_ap.c, core/rtw_br_ext.c, and core/rtw_cmd.c

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:19:59 -07:00
Rupesh Gujare 6af4762239 staging: ozwpan: Create deferred work to destroy PD object.
Currently we call oz_pd_destroy() from softirq context, where we
try to destroy relevant data structures, as well we kill a tasklet
which always result in following kernel warning.

[12279.262194] Attempt to kill tasklet from interrupt
[12279.262202] Attempt to kill tasklet from interrupt

This patch defers deallocation of data structures to work queue.

Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:15:55 -07:00
Rupesh Gujare b75d7d45f2 staging: ozwpan: Increment reference counter.
Increment PD reference counter, on every timer event so that
we do not loose PD object by mistake.

Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:15:55 -07:00
Rupesh Gujare d236dc11a1 staging: ozwpan: Check error condition before creating endpoint.
Check if interface number is correct before creating an end point.

Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:15:55 -07:00
Rupesh Gujare 0a7bfbffbd staging: ozwpan: Fix crash for race condition.
Do not allocate a port to new device or process URB when its status is
yet to be read. This avoids race condition when USB core read hub
status a bit late, while new device tries to acquire port.

Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:15:55 -07:00
Lidza Louina acb8d4056a staging: dgap: ifdef HAVE_UNLOCKED_IOCTL conditionals
This patch removes the HAVE_UNLOCKED_IOCTL conditional
statements from driver.c, mgmt.c and mgmt.h. This was
used to support older kernels. It isn't needed now.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:12:43 -07:00
Lidza Louina 6c2f9ab53c staging: dgap: mgmt.c: removes unused variable
This patch removes the unused variable page
in mgmt.c.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:12:43 -07:00
Lidza Louina 038bc7ac70 staging: dgap: tty.c: fixes incompatible type error
This patch fixes the error: incompatible types when
assigning to type ‘struct ktermios *’ from type
‘struct ktermios’

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:12:43 -07:00
Lidza Louina acccb45473 staging: dgap: tty.c: fixes ioctl param list
The declaration for the ioctl function has changed. The previous version
of this declaration took struct file *file as a parameter and the new
one does not. This patch removes that parameter.

It also removes cases for the commands TIOCGETP
TCGETS and TCGETA.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:12:43 -07:00
Lidza Louina fd2ada8db8 staging: dgap: tty.c: removes read_cnt, real_raw and rawreadok
This patch removes the use of read_cnt, real_raw and rawreadok.
These variables don't exist in the new API. Reading the data
raw is no longer supported by the tty layer.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:12:43 -07:00
Lidza Louina c3dc9dc57d staging: dgap: tty.c: fixes termios error
This patch fixes this error: invalid type
argument of ‘->’ (have ‘struct ktermios’).

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:12:43 -07:00
Lidza Louina 17c82bce16 staging: dgap: tty.c: fixes errors with tty function calls
This patch fixes errors with the tty function calls
tty_buffer_request_room, tty_insert_flip_string_flags,
tty_insert_flip_string and tty_flip_buffer_push.

They now take struct tty_port as a parameter instead
of tty_struct.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:12:42 -07:00
Lidza Louina bb9ebe7073 staging: dgap: fep5.c: fixes errors with tty function calls
This patch fixes errors with the tty function calls
tty_buffer_request_room, tty_insert_flip_char and
tty_flip_buffer_push. They now take struct tty_port
as a parameter instead of tty_struct.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:12:42 -07:00
Lidza Louina 1c2aa15ae4 staging: dgap: removes references to proc code
This patch removes references to proc code in this
driver. It still has proc.c, proc.h and a board
state called NEEDS_PROC_CREATION. All three of
these will be removed in another patch.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:12:42 -07:00
Lidza Louina fc5a89904c staging: dgap: fixes incompatible type error
This patch fixes the error: incompatible types
when assigning to type ‘struct ktermios *’ from
type ‘struct ktermios’

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:12:42 -07:00
Scott_Kilau@digi.com c84b8b503e staging: dgap: adds dgap driver to staging
This patch adds the dgap driver to staging. This is
a TTY serial port driver for the EPCA PCI based
product line by Digi International <www.digi.com>.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:10:00 -07:00
Malcolm Priestley 6b5ad9d269 staging: vt6656: rxtx.c: s_uGetDataDuration Drop argument byDurType.
When byDurType == DATADUR_B then byPktType == PK_TYPE_11B

Drop argument byDurType and filter on byPktType == PK_TYPE_11B.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:07:50 -07:00
Malcolm Priestley d500595516 staging: vt6656: rxtx.c s_uGetDataDuration return endian corrected u16.
The return always be u16 endian corrected. For the
large part this is missing.

Fix uGetDataDuration to return u16 endian corrected.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:07:50 -07:00
Ian Abbott 2fd2bdfcca staging: comedi: pcmuio: fix possible NULL deref on detach
pcmuio_detach() is called by the comedi core even if pcmuio_attach()
returned an error, so `dev->private` might be `NULL`.  Check for that
before dereferencing it.

Also, as pointed out by Dan Carpenter, there is no need to check the
pointer passed to `kfree()` is non-NULL, so remove that check.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:07:49 -07:00
Ian Abbott b88e75bb65 staging: comedi: pcmmio: remove unneeded checks on detach
As pointed out by Dan carpenter for the similar pcmuio driver, there is
no need to check the pointer passed to `kfree()`, so remove that check
from `pcmmio_detach()`.

Also, check the `devpriv` (`dev->private`) pointer once, outside the
`for` loop.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:07:49 -07:00
Sachin Kamat aac6b82e89 staging: xillybus: Remove duplicate inclusion of list.h
list.h header file was included twice.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:07:49 -07:00
Tushar Behera 68a5a5f38c staging: dgnc: driver.c: Need to include slab.h
With 'allyesconfig', we get following error without this.

drivers/staging/dgnc/dgnc_driver.c: In function ‘dgnc_cleanup_board’:
drivers/staging/dgnc/dgnc_driver.c:459:3: error: implicit declaration of function ‘kfree’ [-Werror=implicit-function-declaration]
   kfree(brd->msgbuf_head);
   ^
drivers/staging/dgnc/dgnc_driver.c: In function ‘dgnc_driver_kzmalloc’:
drivers/staging/dgnc/dgnc_driver.c:905:2: error: implicit declaration of function ‘kmalloc’ [-Werror=implicit-function-declaration]
  void *p = kmalloc(size, priority);

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Cc: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:03:37 -07:00
Lidza Louina 90d2a47152 staging: dgnc: tty.c: fixes code indent error
This patch fixes the error "code indent should use
tabs where possible" in dgnc_tty.c.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 10:49:47 -07:00
Lidza Louina 0a60eb3313 staging: dgnc: sysfs.c: fixes code indent error
This patch fixes the error "code indent should use
tabs where possible" in dgnc_sysfs.c.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 10:49:47 -07:00
Lidza Louina 00804f773b staging: dgnc: neo.c: fixes code indent error
This patch fixes the error "code indent should use
tabs where possible" in dgnc_neo.c.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 10:49:47 -07:00
Lidza Louina 5a62025d4b staging: dgnc: driver.h: fixes code indent error
This patch fixes the error "code indent should use
tabs where possible" in dgnc_driver.h.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 10:49:47 -07:00
Lidza Louina eae9842a5f staging: dgnc: driver.c: fixes code indent error
This patch fixes the error "code indent should use
tabs where possible" in dgnc_driver.c.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 10:49:46 -07:00
Lidza Louina ba48f61b13 staging: dgnc: fixes struct declaration
This patch fixes the error: open brace '{'
following struct go on the same line.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 10:48:40 -07:00
Lidza Louina 58b905b39f staging: dgnc: tty.c: fixes pointer syntax
This patch fixes the error: "foo* bar" should be "foo *bar".

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 10:48:40 -07:00
Lidza Louina 4cfa73097f staging: dgnc: removes CVS code from files
This patch removes the code supporting CVS
from its files.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 10:48:40 -07:00
Malcolm Priestley aed387c78d staging: vt6656: baseband.c BBvCalculateParameter create structure for pwPhyLen, pbyPhySrv and pbyPhySgn
Create single packed structure vnt_phy_field for rxtx.h structures.

In card.c CARDvSetRSPINF a vnt_phy_field replaces abyServ,
abySignal, awLen variables.

In rxtx.c point BBvCalculateParameter to relevant field.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 10:13:27 -07:00
Malcolm Priestley 4ac306e0d4 staging: vt6656: baseband.c BBvCalculateParameter pwPhyLen return endian corrected.
In rxtx.c many calls to BBvCaculateParameter are not endian
corrected all calls here need to be endian corrected.

Correct the endian in BBvCaculateParameter.

In card.c: CARDvSetRSPINF pwPhyLen points to awLen and is
manually applied to abyData.  Because it is now endian
corrected put_unaligned is needed to correct it.

In rxtx.c remove were endian is corrected.

This allows to merge  BBvCalculateParameter *pwPhyLen,*pbyPhySrv
and *pbyPhySgn to singles structure for tx buffers.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 10:10:36 -07:00
Dan Carpenter df2da9a3fc staging: drm/imx: ipu-dc: signedness bug in ipu_dc_init_sync()
"map" needs to be signed for the error handling to work.  In the success
case then it holds a small non-negative value.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 10:07:18 -07:00
Dan Carpenter 234ad18249 staging: gdm7240: fix error handling of probe()
The error handling is messy and not in kernel style.  On some paths it
frees "mux_dev" twice.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 10:07:17 -07:00
Dan Carpenter 35b7b91ab9 staging: comedi: pcl812: missing break statement
Smatch complains that there is a missing break statement here.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 10:07:17 -07:00
Dan Carpenter 2c4283ca7c staging: comedi: dt282x: dt282x_ai_insn_read() always fails
In dt282x_ai_insn_read() we call this macro like:
wait_for(!mux_busy(), comedi_error(dev, "timeout\n"); return -ETIME;);
Because the if statement doesn't have curly braces it means we always
return -ETIME and the function never succeeds.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Ian Abbott <abbotti@mev.co.uk>
Cc: stable <stable@vger.kernel.org> # 2.6.36+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 10:07:17 -07:00
Dan Carpenter ded82ef91e staging: comedi: usbdux: allocating too much data
We only need to allocate enough space for a pointer.  We allocate the
space for the urbs themselves with the call to usb_alloc_urb() a few
lines later.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 10:07:17 -07:00
Masanari Iida 253d50ebda staging: lustre: Fix typo in lustre/include
Fix spelling typo in comments within lustre/include/linux.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 10:02:29 -07:00
Malcolm Priestley c921cc8c1a staging: vt6656: rxtx.c dead code TYPE_ATIMDMA/TYPE_BEACONDMA
Both TYPE_ATIMDMA/TYPE_BEACONDMA are not used in driver for the value of uDMAIdx.

Remove dead code.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 10:02:29 -07:00
Mark Einon 23ebe1e0c6 staging: et131x: Remove frame error TODO item
After prolonged testing for a few days of normal use with new et131x
hardware, I've concluded that this was a hardware issue with the older
hardware I had. Removing this item from the TODO.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 10:02:28 -07:00
Jens Frederich 1a04eac93d Staging: olpc_dcon: Removed more completed TODO entries
1. Console event notifier support: No one I've asked knows what this
all about.
2. Audit code for unnecessary code: This is done.
3. Verify sane i2cAPI usage: This is also done.

Signed-off-by: Jens Frederich <jfrederich@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 10:02:28 -07:00
Masanari Iida d60019a948 staging: tidspbridge: Fix typos in comments
Correct spelling typos in comments.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 10:02:28 -07:00
Masanari Iida 6ec16a4cc0 staging: usbip: Fix typo in comments within usbip
Correct spelling typo in comments

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 10:02:28 -07:00
Lidza Louina 0a0ba85174 staging: dgnc: dpacompat.h: removes trailing whitespace
This patch removes trailing whitespace in
the dpacompat.h file.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 09:44:05 -07:00
Lidza Louina b8f5472a69 staging: dgnc: digi.h: removes trailing whitespace
This patch removes trailing whitespace in
the digi.h file.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 09:44:00 -07:00
Lidza Louina 8b07d521c6 staging: dgnc: tty.c: removes trailing whitespace
This patch removes trailing whitespace in
the dgnc_tty.c file.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 09:43:54 -07:00
Lidza Louina cfa4ccc9ab staging: dgnc: trace.c: removes trailing whitespace
This patch removes trailing whitespace in
the dgnc_trace.c file.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 09:43:54 -07:00
Lidza Louina abbb82df2c staging: dgnc: sysfs.h: removes trailing whitespace
This patch removes trailing whitespace in
the dgnc_sysfs.h file.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 09:43:54 -07:00
Lidza Louina 7a97deb209 staging: dgnc: sysfs.c: removes trailing whitespace
This patch removes trailing whitespace in
the sysfs.c file.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 09:43:54 -07:00
Lidza Louina bae4f6886f staging: dgnc: neo.h: removes trailing whitespace
This patch removes trailing whitespace in
the neo.h file.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 09:43:54 -07:00
Lidza Louina 5ba5b89ab6 staging: dgnc: neo.c: removes trailing whitespace
This patch removes trailing whitespace in
the dgnc_neo.c file.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 09:43:53 -07:00
Lidza Louina 0986cda11e staging: dgnc: mgmt.c: removes trailing whitespace
This patch removes trailing whitespace in
the dgnc_mgmt.c file.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 09:43:53 -07:00
Lidza Louina 013c951d54 staging: dgnc: kcompat.h: removes trailing whitespace
This patch removes trailing whitespace in
the kcompat.h file.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 09:43:53 -07:00
Lidza Louina 4c1c56e62c staging: dgnc: driver.h: removes trailing whitespace
This patch removes trailing whitespace in
the driver.h file.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 09:43:53 -07:00
Lidza Louina 817b784716 staging: dgnc: driver.c: removes trailing whitespace
This patch removes trailing whitespace in
the dgnc_driver.c file.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 09:43:53 -07:00
Lidza Louina 1ef56a42e9 staging: dgnc: cls.h: removes trailing whitespace
This patch removes trailing whitespace in
the dgnc_cls.h file.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 09:43:53 -07:00
Lidza Louina 5ca46fd4c8 staging: dgnc: cls.c: removes trailing whitespace
This patch removes trailing whitespace in
the dgnc_cls.c file.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 09:43:52 -07:00
Lidza Louina 53c55fa228 staging: dgnc: add driver to kernel build
This patch adds the dgnc driver to the kernel build process.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 09:40:51 -07:00
Lidza Louina 62a86e50e7 staging: dgnc: removes ifdef HAVE_UNLOCKED_IOCTL conditionals
This patch removes the HAVE_UNLOCKED_IOCTL conditional
statements from driver.c, mgmt.c and mgmt.h. This was
used to support older kernels. It isn't needed now.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-20 16:28:40 -07:00
Lidza Louina f1900e78cf staging: dgnc: driver.c: fixes warning about assigning pointer
This patch fixes a warning associated with assigining
a pointer in the dgnc_mbuf function.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-20 16:28:40 -07:00
Antti Palosaari c59e6d5650 [media] msi3101: few improvements for RF tuner
* Fix AM_MODE. Now it could work at least in theory, cannot test.
* Use greatest common divisor algo to divide PLL fractional parts.
* Fix IF frequency mode.
* + some very minor "style" issues

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-20 16:09:04 -03:00
Antti Palosaari 0046079812 [media] msi3101: change stream format 384
After feeding different signal levels using RF generator and looking
GNU Radio FFT sink I made decision to change bit shift 3 to bit shift
2 as there was very (too) huge visible leap in FFT sink GUI. Now it
looks more natural.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-20 16:08:47 -03:00
Antti Palosaari 61198dfd08 [media] msi3101: implement stream format 504
That stream format carries 504 x I+Q samples per 1024 USB frame.
Sample resolution is 8-bit signed. Default it when sampling rate
is 9Msps or over.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-20 16:08:25 -03:00
Antti Palosaari 00e049b05a [media] msi3101: a lot of small cleanups
Add comments, remove useless code and so. House cleaning party.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-20 16:08:11 -03:00
Antti Palosaari 093cdc79a9 [media] msi3101: changes for tuner PLL freq limits
I made some tuner freq limit tests against RF signal generator.
Adjust some PLL limits according to these test results.
Here are the results, taken from two different devices.
Ranges are measured RF limits + calculated VCO limits.
Mirics MSi3101 SDR Dongle:
VHF_MODE  52 - 132  1664 - 4224
B3_MODE  103 - 263  1648 - 4208
B45_MODE 413 - 960  1652 - 3840
Hauppauge WinTV 133559 LF:
VHF_MODE  49 - 130  1568 - 4160
B3_MODE   98 - 259  1568 - 4144
B45_MODE 391 - 960  1564 - 3840

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-20 16:07:54 -03:00
Antti Palosaari 8e2efac7d2 [media] msi3101: add stream format 336 I+Q pairs per frame
That one seem to have 12-bit resolution. Use it for streams that
has sampling rate 6 <= rate (Msps) < 8, between 6 and 8Msps.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-20 16:07:29 -03:00
Antti Palosaari 35111f5bc9 [media] msi3101: fix overflow in freq setting
Higher frequencies were not possible to set correctly as that value
overflows.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-20 16:07:07 -03:00
Antti Palosaari c5a431d02c [media] msi3101: init bits 23:20 on PLL register
It is not sure what is meaning of that number, but it is better
to try do as Windows driver. It seems to have small effect for
signal when looking FM FFT.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-20 16:06:56 -03:00
Antti Palosaari 554cbfbe3b [media] msi3101: add support for stream format "252" I+Q per frame
That one seems to have 14-bit ADC resolution, wow!
It is now used when sampling rate is below 6 Msps.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-20 16:06:33 -03:00
Antti Palosaari 23df427e33 [media] msi3101: improve tuner synth calc step size
Allow stepless synthesizer configuration. With that change we lose
precision a little bit, as it is now between +-500Hz from the target.
It could be better but on that case calculation algorithm goes more
complex and atm there is more important things to do.
Two approach to improve which comes to my mind are:
1) select and use biggest suitable step
2) use greatest common divisor algo to find divisor for thresh & frac
when possible to avoid rounding errors, which is root of cause of
current +-500Hz inaccuracy.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-20 16:04:50 -03:00
Antti Palosaari 22ca680e02 [media] msi3101: correct ADC sampling rate calc a little bit
No need to compare numbers, we could just store that fractional
value MSB directly.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-20 16:01:52 -03:00
Antti Palosaari 6450e5091c [media] msi3101: add debug dump for unknown stream data
Dump all unknown 'garbage' data - maybe we will discover someday if there
is something rational...
Also fix comment in USB frame description.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-20 16:01:28 -03:00
Antti Palosaari 42fc5b4230 [media] msi3101: add 2040:d300 Hauppauge WinTV 133559 LF
It is based Mirics MSi3101 reference design and will just work
without any changes.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-20 16:01:09 -03:00
Antti Palosaari d0fadf4033 [media] msi3101: fix stream re-start halt
Restarting stream fails quite often. Small delay is between urb killing
and stream stop command - likely to give harware some time to process
killed urbs.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-20 15:59:18 -03:00
Antti Palosaari 020046812f [media] msi3101: enhance sampling results
It looks like there is some extra data carried to enhance sampling
results. When you tune to some some weak/empty channel those bits
are always zeroes. When you tune to some channel where is very
strong signals those bits are all zeroes.
Examining those 32-bits reveals shortly there is 16 pieces of 2-bit
numbers. Number seen are 0, 1 and 3 - for some reason 2 is not used.
I used that number to shift bits given amount to left, "increasing"
sampling resolution by 3-bits. It may be wrong, but after some testing
it still provides better signal.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-20 13:58:55 -03:00
Antti Palosaari 3673b35cfa [media] msi3101: add sampling mode control
Whilst Quadrature Sampling is most common sampling technique used in
radio technology there is others too. Add control user could select
sampling mode. We currently support only quadrature sampling.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-20 13:40:54 -03:00
Antti Palosaari b15208573d [media] msi3101: fix sampling rate calculation
These calculations seem to give 100% correct results. Calculation
formulas could be still a little bit wrong as I have no knowledge
what kind of dividers, multipliers and VCO limits there really is.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-20 13:33:46 -03:00
Antti Palosaari 34599b9b53 [media] msi3101: sample is correct term for sample
Just fix wrong term name. No functional changes.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-20 13:33:19 -03:00
Antti Palosaari 977e444f59 [media] Mirics MSi3101 SDR Dongle driver
It is first Kernel software defined radio receiver driver.
That device is sold as a digital television solution.
MSi3101 is reference design which consists of two chips:
1) MSi2500 USB ADC
2) MSi001 RF-tuner
Driver is put to staging as API is not ready.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-20 13:23:58 -03:00
Malcolm Priestley 1da4ee2050 staging: vt6656: desc.h remove typedef tagSTxDataHead_a_FB to new structure in rxtx.h
To new structure.
typedef struct tagSTxDataHead_a_FB -> struct vnt_tx_datahead_a_fb

This is only needed by rxtc.c so moved to rxtx.h visible to
vnt_rts* structures which it will eventually form part of
their structure.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:39:19 -07:00
Malcolm Priestley 558becf188 staging: vt6656: desc.h remove typedef tagSTxDataHead_ab to new structure in rxtx.h
To new structure.
typedef struct tagSTxDataHead_ab -> struct vnt_tx_datahead_ab

This is only needed by rxtc.c so moved to rxtx.h visible to
vnt_rts* structures which it will eventually form part of
their structure.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:39:19 -07:00
Malcolm Priestley 7c05c5451d staging: vt6656: desc.h remove typedef tagSTxDataHead_g_FB to new structure in rxtx.h
To new structure.
typedef struct tagSTxDataHead_g_FB -> struct vnt_tx_datahead_g_fb

This is only needed by rxtc.c so moved to rxtx.h visible to
vnt_rts*/vnt_cts* structures which it will eventually form part of
their structure.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:39:19 -07:00
Malcolm Priestley 7e60a3de27 staging: vt6656: desc.h: remove typedef struct tagSTxDataHead_g to new structure in rxtx.h
To new structure.
typedef struct tagSTxDataHead_g -> struct vnt_tx_datahead_g

This is only needed by rxtc.c so moved to rxtx.h visible to
vnt_rts*/vnt_cts* structures which it will eventually form part of
their structure.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:39:19 -07:00
Malcolm Priestley 57107d4364 staging: vt6656: desc.h remove dead code typedef struct tagSRrvTime_atim.
Remove dead structure tagSRrvTime_atim.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:39:19 -07:00
Malcolm Priestley 976467d3cb staging: vt6656: desc.h remove typedef SRrvTime_ab to new structure.
To new structure.
typedef struct tagSRrvTime_ab -> struct vnt_rrv_time_ab

This is only needed by rxtc.c so moved to rxtx.h and
will eventually form part of the structure of
struct vnt_tx_buffer.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:39:18 -07:00
Malcolm Priestley 4f990057bc staging: vt6656: desc.h: Move typedef struct tagSRrvTime_gCTS to new structure in rxtx.h
To new structure.
typedef struct tagSRrvTime_gCTS -> struct vnt_rrv_time_cts

This is only needed by rxtc.c so moved to rxtx.h and
will eventually form part of the structure of
struct vnt_tx_buffer.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:39:18 -07:00
Malcolm Priestley 6398a59bec staging: vt6656: desc.h: Move typedef tagSRrvTime_gRTS to new structure in rxtx.h
To new structure.
typedef struct tagSRrvTime_gRTS -> struct vnt_rrv_time_rts

This is only needed by rxtc.c so moved to rxtx.h and
will eventually form part of the structure of
struct vnt_tx_buffer.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:39:18 -07:00
Fabio Estevam ce9c1cef9b imx-drm: ipuv3-crtc: Add MODULE_ALIAS()
Add MODULE_ALIAS, so that auto module loading can work.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:38:03 -07:00
Fabio Estevam b2da05ff47 imx-drm: parallel-display: Add MODULE_ALIAS()
Add MODULE_ALIAS, so that auto module loading can work.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:38:03 -07:00
Fabio Estevam 52db752c3d imx-drm: imx-tve: Add MODULE_ALIAS()
Add MODULE_ALIAS, so that auto module loading can work.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:38:03 -07:00
Fabio Estevam bc627387a9 imx-drm: imx-ldb: Add MODULE_ALIAS()
Add MODULE_ALIAS, so that auto module loading can work.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:38:03 -07:00
Fabio Estevam 85d0b7809b imx-drm: ipu-di: Check the return value from clk_prepare_enable()
clk_prepare_enable() may fail, so let's check its return value and propagate it
in the case of error.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:38:02 -07:00
Masanari Iida 9379fd547e staging: xillybus: Fix typo in comment
Correct spelling typo in comments.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:31:58 -07:00
navin patidar ecc837acca staging: dgrp: add __init/__exit macros
add __init/__exit macros to related init/cleanup functions.

Signed-off-by: navin patidar <navinp@cdac.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:31:58 -07:00
Won Kang bf0373f1c6 staging: gdm7240: a TTY rewrite according to the latest TTY APIs
Fixed mis-use of mutex for gdm_table. gdm_table is refered to only
inside tty_install and port destrcut, and usb callbacks use internal
reference which was saved during urb submission

Signed-off-by: Won Kang <wonkang@gctsemi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:30:59 -07:00
Won Kang 7ee4c1b949 staging: gdm7240: a TTY rewrite according to the latest TTY APIs
Removed the old style reference countings and termios.
Renamed variables to meaninful ones.

Signed-off-by: Won Kang <wonkang@gctsemi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:30:59 -07:00
Jens Frederich 7d5b640dfa Staging: olpc_dcon: Already completed TODO entry removed
The TODO entry - drop global variables, use a proper olpc_dcon_priv
struct - is already finished. The driver has no global variables.
It uses the private structure 'dcon_priv'.

Signed-off-by: Jens Frederich <jfrederich@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:29:23 -07:00
Jens Frederich 9467d11b0d Staging: olpc_dcon: fix typo in olpc_dcon.h
The backlight brightness register (DCON_REG_BRIGHT) address is 0xa.

Signed-off-by: Jens Frederich <jfrederich@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:29:23 -07:00
Daniel Vetter b5dc0d108c drm/imx: kill firstopen callback
This thing seems to do some kind of delayed setup. Really, real kms
drivers shouldn't do that at all. Either stuff needs to be dynamically
hotplugged or the driver setup sequence needs to be fixed.

This patch here just moves the setup at the very end of the driver
load callback, with the locking adjusted accordingly.

v2: Also move the corresponding put from ->lastclose to ->unload.

Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-08-19 14:24:15 +10:00
Daniel Vetter b0e898ac55 drm: remove FASYNC support
So I've stumbled over drm_fasync and wondered what it does. Digging
that up is quite a story.

First I've had to read up on what this does and ended up being rather
bewildered why peopled loved signals so much back in the days that
they've created SIGIO just for that ...

Then I wondered how this ever works, and what that strange "No-op."
comment right above it should mean. After all calling the core fasync
helper is pretty obviously not a noop. After reading through the
kernels FASYNC implementation I've noticed that signals are only sent
out to the processes attached with FASYNC by calling kill_fasync.

No merged drm driver has ever done that.

After more digging I've found out that the only driver that ever used
this is the so called GAMMA driver. I've frankly never heard of such a
gpu brand ever before. Now FASYNC seems to not have been the only bad
thing with that driver, since Dave Airlie removed it from the drm
driver with prejudice:

commit 1430163b4bbf7b00367ea1066c1c5fe85dbeefed
Author: Dave Airlie <airlied@linux.ie>
Date:   Sun Aug 29 12:04:35 2004 +0000

    Drop GAMMA DRM from a great height ...

Long story short, the drm fasync support seems to be doing absolutely
nothing. And the only user of it was never merged into the upstream
kernel. And we don't need any fops->fasync callback since the fcntl
implementation in the kernel already implements the noop case
correctly.

So stop this particular cargo-cult and rip it all out.

v2: Kill drm_fasync assignments in rcar (newly added) and imx drivers
(somehow I've missed that one in staging). Also drop the reference in
the drm DocBook. ARM compile-fail reported by Rob Clark.

v3: Move the removal of dev->buf_asnyc assignment in drm_setup to this
patch here.

v4: Actually git add ... tsk.

Cc: Dave Airlie <airlied@linux.ie>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Rob Clark <robdclark@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-08-19 10:05:17 +10:00
Dave Airlie 1dda8d02ac Merge remote-tracking branch 'pfdo/drm-rcar-for-v3.12' into drm-next
Merge the rcar stable branch that is being shared with the arm-soc tree.

Signed-off-by: Dave Airlie <airlied@redhat.com>
* pfdo/drm-rcar-for-v3.12: (220 commits)
  drm/rcar-du: Add FBDEV emulation support
  drm/rcar-du: Add internal LVDS encoder support
  drm/rcar-du: Configure RGB output routing to DPAD0
  drm/rcar-du: Rework output routing support
  drm/rcar-du: Add support for DEFR8 register
  drm/rcar-du: Add support for multiple groups
  drm/rcar-du: Fix buffer pitch alignment for R8A7790 DU
  drm/rcar-du: Add support for the R8A7790 DU
  drm/rcar-du: Move output routing configuration to group
  drm/rcar-du: Remove register definitions for the second channel
  drm/rcar-du: Use dynamic number of CRTCs instead of CRTCs array size
  drm/rcar-du: Introduce CRTCs groups
  drm/rcar-du: Rename rcar_du_plane_(init|register) to rcar_du_planes_*
  drm/rcar-du: Create rcar_du_planes structure
  drm/rcar-du: Rename platform data fields to match what they describe
  drm/rcar-du: Merge LVDS and VGA encoder code
  drm/rcar-du: Split VGA encoder and connector
  drm/rcar-du: Split LVDS encoder and connector
  drm/rcar-du: Clarify comment regarding plane Y source coordinate
  drm/rcar-du: Support per-CRTC clock and IRQ
  ...

Conflicts:
	drivers/gpu/drm/i915/i915_dma.c
	drivers/gpu/drm/i915/intel_pm.c
	drivers/gpu/drm/qxl/qxl_release.c
2013-08-19 09:24:13 +10:00
Hector Palacios 1eb70a9745 iio: mxs-lradc: change the realbits to 12
The LRADC virtual channels have an 18 bit field to store the sum of up
to 2^5 accumulated samples. The read_raw function however only operates
over a single sample (12 bit resolution).
In order to use this field for scaling operations, we need it to be the
exact resolution value of the LRADC.
Besides, the driver was using an 18 bit mask (LRADC_CH_VALUE_MASK) to
report touch coordinates to userland. A 12 bit mask should be used instead
or else the touch libraries will expect a coordinates range between 0
and 0x3ffff (18 bits), instead of between 0 and 0xfff (12 bits).

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-17 15:50:57 +01:00
Sachin Kamat 1f5ac52798 iio: gyro: adis16060_core: Use devm_iio_device_alloc
Using devm_iio_device_alloc makes code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-17 15:50:56 +01:00
Yann Droneaud 9c6cd3b390 android/sync: use get_unused_fd_flags(O_CLOEXEC) instead of get_unused_fd()
Macro get_unused_fd() is used to allocate a file descriptor with
default flags. Those default flags (0) can be "unsafe":
O_CLOEXEC must be used by default to not leak file descriptor
across exec().

Instead of macro get_unused_fd(), functions anon_inode_getfd()
or get_unused_fd_flags() should be used with flags given by userspace.
If not possible, flags should be set to O_CLOEXEC to provide userspace
with a default safe behavor.

In a further patch, get_unused_fd() will be removed so that
new code start using anon_inode_getfd() or get_unused_fd_flags()
with correct flags.

This patch replaces calls to get_unused_fd() with call to
get_unused_fd_flags(O_CLOEXEC) following advice from Erik Gilling.

Signed-off-by: Yann Droneaud <ydroneaud@opteya.com>
Cc: Erik Gilling <konkers@android.com>
Cc: Colin Cross <ccross@google.com>
Link: http://lkml.kernel.org/r/CACSP8SjXGMk2_kX_+RgzqqQwqKernvF1Wt3K5tw991W5dfAnCA@mail.gmail.com
Link: http://lkml.kernel.org/r/cover.1376327678.git.ydroneaud@opteya.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-15 17:27:30 -07:00
Yann Droneaud 45acea5733 android/sw_sync: use get_unused_fd_flags(O_CLOEXEC) instead of get_unused_fd()
Macro get_unused_fd() is used to allocate a file descriptor with
default flags. Those default flags (0) can be "unsafe":
O_CLOEXEC must be used by default to not leak file descriptor
across exec().

Instead of macro get_unused_fd(), functions anon_inode_getfd()
or get_unused_fd_flags() should be used with flags given by userspace.
If not possible, flags should be set to O_CLOEXEC to provide userspace
with a default safe behavor.

In a further patch, get_unused_fd() will be removed so that
new code start using anon_inode_getfd() or get_unused_fd_flags()
with correct flags.

This patch replaces calls to get_unused_fd() with call to
get_unused_fd_flags(O_CLOEXEC) following advice from Erik Gilling.

Signed-off-by: Yann Droneaud <ydroneaud@opteya.com>
Cc: Erik Gilling <konkers@android.com>
Cc: Colin Cross <ccross@google.com>
Link: http://lkml.kernel.org/r/CACSP8SjZcpcpEtQHzcGYhf-MP7QGo0XpN7-uN7rmD=vNtopG=w@mail.gmail.com
Link: http://lkml.kernel.org/r/cover.1376327678.git.ydroneaud@opteya.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-15 17:26:44 -07:00
Malcolm Priestley f0c5ba2815 staging: vt6656: desc.h Move typedef struct tagSCTS* to new structures in rxtx.h
The new structures being
typedef struct tagSCTS -> struct vnt_cts
typedef struct tagSCTS_FB -> struct vnt_cts_fb

These are only needed by rxtc.c so moved to rxtx.h and
will eventually form part of the structure of
struct vnt_tx_buffer.

The linux/ieee80211.h in desc.h is no longer needed.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-15 17:24:22 -07:00
Malcolm Priestley c521cb5888 staging: vt6656: desc.h Remove typedef struct tagSRTS_* to new strutures in rxtx.h
The new structures being
typedef struct tagSRTS_g -> struct vnt_rts_g
typedef struct tagSRTS_g_FB -> struct vnt_rts_g_fb
typedef struct tagSRTS_ab -> struct vnt_rts_ab
typedef struct tagSRTS_a_FB -> struct vnt_rts_a_fb

These are only needed by rxtc.c so moved to rxtx.h and
will eventually form part of the structure of
struct vnt_tx_buffer.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-15 17:24:22 -07:00
Jens Frederich 24b7ed475e Staging: olpc_dcon: more big endian conformity
Using an int which is casted to unsigned char as inbuf is messy.
The code won't work on big endian systems.  The patch should fix
this.

Signed-off-by: Jens Frederich <jfrederich@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-15 17:23:16 -07:00
Jens Frederich 98d4f93c79 Staging: olpc_dcon: replace some magic numbers
This patch replace some magic numbers. I believe it makes
the driver more readable.

The magic number 0x26 is the XO system embedded controller
(EC) command 'DCON power enable/disable'.

Number 0x41, and 0x42 are special memory controller settings
register.  The 0x41 initialize bit sequence 0x101 means:
enable memory power down function and special SDRAM clock
delay for synchronize SDRAM output and clock signal.

The 0x42 initialize squence 0x101 is wrong.  According to
the specification Bit 8 is reserved, thus not in use.
I removed it.

Signed-off-by: Jens Frederich <jfrederich@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-15 17:22:27 -07:00
Malcolm Priestley 01f865ba4a staging: vt6656: rxtx.h : remove typedef struct tagSBEACON_BUFFER
Replace with struct vnt_beacon_buffer.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-15 17:20:54 -07:00
Malcolm Priestley d0a2b8fa76 staging: vt6656: rxtx.c : s_bPacketToWirelessUsb remove usbPacketBuf.
Move vnt_tx_buffer *pTxBufHead to argument u8 *usbPacketBuf position.

Fix the calling to s_bPacketToWirelessUsb so it attached to
the calling struct vnt_tx_buffer pTX_Buffer.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-15 17:20:54 -07:00
Malcolm Priestley f39c0d8e30 staging: vt6656: rxtx.c remove typdef PTX_BUFFER
Rename to vnt_tx_buffer.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-15 17:20:54 -07:00
Rupesh Gujare 83db51fe72 staging: ozwpan: Remove extra variable.
We should not use extra variable just to copy pointer value,
renaming parameter name serves pupose & removes extra variable.

Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-15 17:19:27 -07:00
Rupesh Gujare 3bc0d88243 staging: ozwpan: Remove unneeded variable initializer
We are assigning value to hport before returning, there is
no need to initialize it.

Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-15 17:19:27 -07:00
Lidza Louina 35cf904593 staging: dgnc: removes proc code
This patch removes the dgnc_proc.c and dgnc_proc.h files and all
references to proc functions in dgnc_driver.c. This also removes proc.h
from the include headers in driver.c, mgmt.c and sysfs.c and proc.o
from the Makefile.

Drivers now use sysfs instead of proc.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-15 10:14:29 -07:00
Andrew Morton 41506a9f83 drivers/staging/comedi/drivers/das16.c: needs slab.h
alpha allmodconfig:

drivers/staging/comedi/drivers/das16.c: In function 'das16_detach':
drivers/staging/comedi/drivers/das16.c🔢 error: implicit declaration of function 'kfree'

Cc: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-14 14:45:20 -07:00
Malcolm Priestley e34f9dbe86 staging: vt6656: rxtx.c s_uGetRTSCTSDuration return endian u16
The return value of uGetRTSCTSDuration always needs to be
corrected to a u16 little endian corrected value.

Some places the endian correction is done on the next line

Change uGetRTSCTSDuration return u16 little endian corrected value.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-14 14:42:59 -07:00
Malcolm Priestley b02ccd5957 staging: vt6656: rxtx.c s:_uGetDataDuration simplify structure.
A value is only returned when bNeedAck is true.

Only when byDurType == DATADUR_B is different.

Remove switch statement and simplify with if structure.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-14 14:42:59 -07:00
Malcolm Priestley 18ee00a6e1 staging: vt6656: rxtx.h dead code typedef union tagUTX_BUFFER_CONTAINER
This is part of the Remote NDIS message format with patch

vt6656: rxtx.c: s_vGetFreeContext use single tx memset.

there is not need for this structure and its members.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-14 14:16:18 -07:00
Malcolm Priestley 629a9e6573 staging: vt6656: rxtx.h always pack BEACON_BUFFER/TX_BUFFER
All structure members of BEACON_BUFFER/TX_BUFFER should be packed.

Only the first 4 members of these structures are live.

The forth member is referenced at run-time by packed structures.
typedef struct tagSTxBufHead
typedef struct tagSTxShortBufHead
in desc.h

If these structures are not packed the alignment of these members
will be wrong.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-14 14:16:18 -07:00
Dan Carpenter 95b20b8b06 staging: ozwpan: Separate success & failure case for oz_hcd_pd_arrived()
This patch separates success & failure block along with fixing
following issues:-

1. The way oz_hcd_pd_arrived() looks now it's easy to think we free "ep" but
actually we do this spaghetti thing of setting it to NULL on success.

2. It is hard to read it because there are unlocks scattered throughout.

3. Currently we set "ep" to NULL on the success path and then test it and or
free it. In current code you have to scroll to the start of the function
to read code.

Original patch was submitted by Dan here :-
http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2013-August/040113.html

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-14 14:15:40 -07:00
Rupesh Gujare 5f1f7b110f staging: ozwpan: Swap arguments of oz_ep_alloc() to match kmalloc()
Swap arguments of oz_ep_alloc() to match kmalloc() for better readability.

Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-14 14:15:40 -07:00
Rupesh Gujare a15e042e26 staging: ozwpan: Remove unneeded initializers
Remove variable initialization wherever it is not required.

Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-14 14:15:40 -07:00