OSDN Git Service

uclinux-h8/linux.git
10 years agostaging: rtl8188eu:Remove function with empty defination odm_DynamicPrimaryCCA()
navin patidar [Sun, 18 May 2014 15:19:21 +0000 (20:49 +0530)]
staging: rtl8188eu:Remove function with empty defination odm_DynamicPrimaryCCA()

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: Remove unused function ODM_DynamicPrimaryCCA_DupRTS()
navin patidar [Sun, 18 May 2014 15:19:20 +0000 (20:49 +0530)]
staging: rtl8188eu: Remove unused function ODM_DynamicPrimaryCCA_DupRTS()

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: Remove unused function DM_DIG_LowerBound_88E()
navin patidar [Sun, 18 May 2014 15:19:19 +0000 (20:49 +0530)]
staging: rtl8188eu: Remove unused function DM_DIG_LowerBound_88E()

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: Remove function with empty defination ODM_CheckPowerStatus()
navin patidar [Sun, 18 May 2014 15:19:18 +0000 (20:49 +0530)]
staging: rtl8188eu: Remove function with empty defination ODM_CheckPowerStatus()

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: Remove unused function ConvertTo_dB()
navin patidar [Sun, 18 May 2014 15:19:17 +0000 (20:49 +0530)]
staging: rtl8188eu: Remove unused function ConvertTo_dB()

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: Remove unused function odm_SwAntDivChkAntSwitchCallback()
navin patidar [Sun, 18 May 2014 15:19:16 +0000 (20:49 +0530)]
staging: rtl8188eu: Remove unused function odm_SwAntDivChkAntSwitchCallback()

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: Remove unused funtion odm_DynamicTxPowerNIC()
navin patidar [Sun, 18 May 2014 15:19:15 +0000 (20:49 +0530)]
staging: rtl8188eu: Remove unused funtion odm_DynamicTxPowerNIC()

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: Remove unused function odm_RefreshRateAdaptiveMaskAPADSL()
navin patidar [Sun, 18 May 2014 15:19:14 +0000 (20:49 +0530)]
staging: rtl8188eu: Remove unused function odm_RefreshRateAdaptiveMaskAPADSL()

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: Remove unused function odm_RefreshRateAdaptiveMaskMP()
navin patidar [Sun, 18 May 2014 15:19:13 +0000 (20:49 +0530)]
staging: rtl8188eu: Remove unused function odm_RefreshRateAdaptiveMaskMP()

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging:rtl8188eu: Remove unused function iodm_1R_CCA()
navin patidar [Sun, 18 May 2014 15:19:12 +0000 (20:49 +0530)]
staging:rtl8188eu: Remove unused function iodm_1R_CCA()

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: Remove unused function odm_DynamicBBPowerSavingInit()
navin patidar [Sun, 18 May 2014 15:19:11 +0000 (20:49 +0530)]
staging: rtl8188eu: Remove unused function odm_DynamicBBPowerSavingInit()

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: Remove function odm_DynamicBBPowerSaving()
navin patidar [Sun, 18 May 2014 15:19:10 +0000 (20:49 +0530)]
staging: rtl8188eu: Remove function odm_DynamicBBPowerSaving()

odm_DynamicBBPowerSaving() has empty defination.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: Remove unused function odm_DIGbyRSSI_LPS()
navin patidar [Sun, 18 May 2014 15:19:09 +0000 (20:49 +0530)]
staging: rtl8188eu: Remove unused function odm_DIGbyRSSI_LPS()

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: Remove unused function rtl8188e_RF_ChangeTxPath()
navin patidar [Sun, 18 May 2014 15:19:08 +0000 (20:49 +0530)]
staging: rtl8188eu: Remove unused function rtl8188e_RF_ChangeTxPath()

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: Remove unused structure rf_shadow
navin patidar [Sun, 18 May 2014 15:19:07 +0000 (20:49 +0530)]
staging: rtl8188eu: Remove unused structure rf_shadow

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: Remove unused funtion PHY_ScanOperationBackup8188E()
navin patidar [Sun, 18 May 2014 15:32:18 +0000 (21:02 +0530)]
staging: rtl8188eu: Remove unused funtion PHY_ScanOperationBackup8188E()

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: Remove unused funtion phy_TxPwrIdxToDbm()
navin patidar [Sun, 18 May 2014 15:19:05 +0000 (20:49 +0530)]
staging: rtl8188eu: Remove unused funtion phy_TxPwrIdxToDbm()

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: Remove unused funtion PHY_GetTxPowerLevel8188E()
navin patidar [Sun, 18 May 2014 15:19:04 +0000 (20:49 +0530)]
staging: rtl8188eu: Remove unused funtion PHY_GetTxPowerLevel8188E()

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging:rtl8188eu: Remove unused function phy_DbmToTxPwrIdx()
navin patidar [Sun, 18 May 2014 15:19:03 +0000 (20:49 +0530)]
staging:rtl8188eu: Remove unused function phy_DbmToTxPwrIdx()

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: Remove unused function PHY_UpdateTxPowerDbm8188E()
navin patidar [Sun, 18 May 2014 15:19:02 +0000 (20:49 +0530)]
staging: rtl8188eu: Remove unused function PHY_UpdateTxPowerDbm8188E()

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: Remove unused function rtl8192c_PHY_GetHWRegOriginalValue()
navin patidar [Sun, 18 May 2014 15:19:01 +0000 (20:49 +0530)]
staging: rtl8188eu: Remove unused function rtl8192c_PHY_GetHWRegOriginalValue()

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: Remove unused function rtl8188e_PHY_ConfigRFWithParaFile()
navin patidar [Sun, 18 May 2014 15:19:00 +0000 (20:49 +0530)]
staging: rtl8188eu: Remove unused function rtl8188e_PHY_ConfigRFWithParaFile()

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging:rtl8188eu:Remove funtion Hal_CustomizeByCustomerID_8188EU()
navin patidar [Sun, 18 May 2014 15:18:59 +0000 (20:48 +0530)]
staging:rtl8188eu:Remove funtion Hal_CustomizeByCustomerID_8188EU()

Function has empty defination.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: Remove unused function _ps_close_RF()
navin patidar [Sun, 18 May 2014 15:18:57 +0000 (20:48 +0530)]
staging: rtl8188eu: Remove unused function _ps_close_RF()

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: Remove function with empty definition _ps_open_RF()
navin patidar [Sun, 18 May 2014 15:18:56 +0000 (20:48 +0530)]
staging: rtl8188eu: Remove function with empty definition _ps_open_RF()

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: Remove function with empty definition _InitOperationMode()
navin patidar [Sun, 18 May 2014 15:18:55 +0000 (20:48 +0530)]
staging: rtl8188eu: Remove function with empty definition _InitOperationMode()

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: Remove function with empty definition _InitBeaconMaxError().
navin patidar [Sun, 18 May 2014 15:18:54 +0000 (20:48 +0530)]
staging: rtl8188eu: Remove function with empty definition _InitBeaconMaxError().

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: remove dead code in rtw_drv_init()
Christian Engelmayer [Sat, 17 May 2014 10:38:58 +0000 (12:38 +0200)]
staging: rtl8188eu: remove dead code in rtw_drv_init()

(status != _SUCCESS) immediately after 'status = _SUCCESS' will never evaluate
true. Thus remove the logically dead code. Detected by Coverity - CID 1077553.

Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: fix usage of uninit scalar in rtw_drv_init()
Christian Engelmayer [Sat, 17 May 2014 10:38:57 +0000 (12:38 +0200)]
staging: rtl8188eu: fix usage of uninit scalar in rtw_drv_init()

Function rtw_drv_init() is written in a way that assumes 'status' != _SUCCESS
as long as not explicitly set. Thus initialize 'status' to FAIL, in order to
prevent undefined behaviour if going through the exit paths. Detected by
Coverity - CID 1077832.

Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: fix potential leak in rtw_set_key()
Christian Engelmayer [Wed, 7 May 2014 19:39:02 +0000 (21:39 +0200)]
staging: rtl8188eu: fix potential leak in rtw_set_key()

Fix a potential leak in the error path of rtw_set_key(). In case the requested
algorithm is not supported by the driver, the function returns without
enqueuing or freeing the already allocated command and parameter structs. Use
a centralized exit path and make sure that all memory is freed correctly.
Detected by Coverity - CID 10777161077717.

Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: fix potential leak in update_bcn_wps_ie()
Christian Engelmayer [Wed, 7 May 2014 19:42:27 +0000 (21:42 +0200)]
staging: rtl8188eu: fix potential leak in update_bcn_wps_ie()

Fix a potential leak in the error path of function update_bcn_wps_ie().
Move the affected input verification to the beginning of the function so
that it may return directly without leaking already allocated memory.
Detected by Coverity - CID 1077718.

Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: fix potential leak in rtw_mp_pwrtrk()
Christian Engelmayer [Wed, 7 May 2014 19:34:37 +0000 (21:34 +0200)]
staging: rtl8188eu: fix potential leak in rtw_mp_pwrtrk()

Function rtw_mp_pwrtrk() dynamically allocates a temporary buffer that
is not freed in all error paths. Use a centralized exit path and make sure
that all memory is freed correctly. Detected by Coverity - 1077715.

Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: fix potential leak in rtw_mp_SetRFPath()
Christian Engelmayer [Wed, 7 May 2014 19:33:20 +0000 (21:33 +0200)]
staging: rtl8188eu: fix potential leak in rtw_mp_SetRFPath()

Function rtw_mp_SetRFPath() dynamically allocates a temporary buffer that
is not freed in all error paths. Use a centralized exit path and make sure
that all memory is freed correctly. Detected by Coverity - CID 1077714.

Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: fix potential leak in rtw_mp_QueryDrv()
Christian Engelmayer [Wed, 7 May 2014 19:32:30 +0000 (21:32 +0200)]
staging: rtl8188eu: fix potential leak in rtw_mp_QueryDrv()

Function rtw_mp_QueryDrv() dynamically allocates a temporary buffer that
is not freed in all error paths. Use a centralized exit path and make sure
that all memory is freed correctly. Detected by Coverity - CID 1077713.

Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: fix potential leak in rtw_wx_set_enc_ext()
Christian Engelmayer [Wed, 7 May 2014 19:31:20 +0000 (21:31 +0200)]
staging: rtl8188eu: fix potential leak in rtw_wx_set_enc_ext()

Function rtw_wx_set_enc_ext() dynamically allocates a temporary buffer that
is not freed in all error paths. Use a centralized exit path and make sure
that all memory is freed correctly. Detected by Coverity - CID 1077712.

Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: fix potential leak in rtw_wx_read32()
Christian Engelmayer [Wed, 7 May 2014 19:30:23 +0000 (21:30 +0200)]
staging: rtl8188eu: fix potential leak in rtw_wx_read32()

Function rtw_wx_read32() dynamically allocates a temporary buffer that is not
freed in all error paths. Use a centralized exit path and make sure that all
memory is freed correctly. Detected by Coverity - CID 1077711.

Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: Remove 'u8 fragcnt' from struct recv_frame
navin patidar [Wed, 7 May 2014 04:01:18 +0000 (09:31 +0530)]
staging: rtl8188eu: Remove 'u8 fragcnt' from struct recv_frame

Remove unused variable 'u8 fragcnt'.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: Remove 'int frame_tag' from struct recv_frame
navin patidar [Wed, 7 May 2014 04:01:17 +0000 (09:31 +0530)]
staging: rtl8188eu: Remove 'int frame_tag' from struct recv_frame

Remove unused variable 'int frame_tag'.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: Remove 'void *precvbuf' from struct recv_frame
navin patidar [Wed, 7 May 2014 04:01:16 +0000 (09:31 +0530)]
staging: rtl8188eu: Remove 'void *precvbuf' from struct recv_frame

Remove unused variable 'void *precvbuf'.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: Remove unused inline function get_rx_status()
navin patidar [Wed, 7 May 2014 04:01:15 +0000 (09:31 +0530)]
staging: rtl8188eu: Remove unused inline function get_rx_status()

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: Remove unused inline function recvframe_push()
navin patidar [Wed, 7 May 2014 04:01:14 +0000 (09:31 +0530)]
staging: rtl8188eu: Remove unused inline function recvframe_push()

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: Remove function rtw_os_recvbuf_resource_free()
navin patidar [Wed, 7 May 2014 03:57:31 +0000 (09:27 +0530)]
staging: rtl8188eu: Remove function rtw_os_recvbuf_resource_free()

Use usb_free_urb() instead of rtw_os_recvbuf_resource_free() to free URB.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: Remove function rtw_hostapd_mlme_rx()
navin patidar [Wed, 7 May 2014 03:57:30 +0000 (09:27 +0530)]
staging: rtl8188eu: Remove function rtw_hostapd_mlme_rx()

rtw_hostapd_mlme_rx() has empty defination, so we can remove it.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: Remove function rtw_os_recv_resource_free()
navin patidar [Wed, 7 May 2014 03:57:29 +0000 (09:27 +0530)]
staging: rtl8188eu: Remove function rtw_os_recv_resource_free()

rtw_os_recv_resource_free() has empty defination, so we can remove it.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: Remove function rtw_os_recv_resource_init()
navin patidar [Wed, 7 May 2014 03:57:28 +0000 (09:27 +0530)]
staging: rtl8188eu: Remove function rtw_os_recv_resource_init()

rtw_os_recv_resource_init() has empty defination, so we can remove it.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: Remove struct zero_bulkout_context
navin patidar [Wed, 7 May 2014 03:57:27 +0000 (09:27 +0530)]
staging: rtl8188eu: Remove struct zero_bulkout_context

Remove unused struct zero_bulkout_context.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: Remove 'spinlock_t lock' from struct recv_priv
navin patidar [Wed, 7 May 2014 03:57:26 +0000 (09:27 +0530)]
staging: rtl8188eu: Remove 'spinlock_t lock' from struct recv_priv

Remove unused variable 'spinlock_t lock'.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: Remove unused member variables of struct recv_priv
navin patidar [Wed, 7 May 2014 03:57:25 +0000 (09:27 +0530)]
staging: rtl8188eu: Remove unused member variables of struct recv_priv

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: Remove 'semaphore allrxreturnevt' from struct recv_priv
navin patidar [Wed, 7 May 2014 03:57:24 +0000 (09:27 +0530)]
staging: rtl8188eu: Remove 'semaphore allrxreturnevt' from struct recv_priv

Remove unused variable 'semaphore allrxreturnevt'.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: rtl8188eu: Fixed prohibited spaces after open '('
Remi Pommarel [Tue, 6 May 2014 21:40:50 +0000 (23:40 +0200)]
Staging: rtl8188eu: Fixed prohibited spaces after open '('

This patch fixes all prohibited spaces  after open '(' checkpatch.pl errors
for rtl8188eu.

Signed-off-by: Remi Pommarel <repk@triplefau.lt>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lirc: Fix sparse warnings
Tuomas Tynkkynen [Thu, 8 May 2014 11:13:17 +0000 (14:13 +0300)]
staging: lirc: Fix sparse warnings

Fix sparse warnings by adding __user and __iomem annotations where
necessary and removing certain unnecessary casts. While at it,
also use u32 in place of __u32.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8192u: r8192U_core.c: Fix to remove null pointer checks that could never...
Rickard Strandqvist [Thu, 22 May 2014 20:25:06 +0000 (22:25 +0200)]
staging: rtl8192u: r8192U_core.c: Fix to remove null pointer checks that could never happen

Removal of null pointer checks that could never happen

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging/rtl8192u: Put EXPORT_SYMBOL just after the exported function
Benoit Taine [Fri, 16 May 2014 12:22:41 +0000 (14:22 +0200)]
staging/rtl8192u: Put EXPORT_SYMBOL just after the exported function

Export of symbols statement must be placed right after the definition to meet
kernel coding style guidelines. This issue was reported by checkpatch.

A simplified version of the semantic patch that makes this change is as
follows (http://coccinelle.lip6.fr/):

// <smpl>

@ r @ identifier f; @@
- EXPORT_SYMBOL(f);

@@ identifier r.f; @@
  f(...) { ... }
+ EXPORT_SYMBOL(f);

// </smpl>

Signed-off-by: Benoit Taine <benoit.taine@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: Remove useless return variables
Peter Senna Tschudin [Tue, 20 May 2014 10:33:48 +0000 (12:33 +0200)]
staging: vt6655: Remove useless return variables

This patch remove variables that are initialized with a constant,
are never updated, and are only used as parameter of return.
Return the constant instead of using a variable.

Verified by compilation only.

The coccinelle script that find and fixes this issue is:
// <smpl>
@@
type T;
constant C;
identifier ret;
@@
- T ret = C;
... when != ret
- return ret;
+ return C;
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6656: dead code remove diversity code
Malcolm Priestley [Wed, 21 May 2014 20:09:44 +0000 (21:09 +0100)]
staging: vt6656: dead code remove diversity code

bDiversityRegCtlON is always false.

In later vendor driver code has been commented out.

Remove diversity timers and variables.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6656: remove dead code tcrc.c/h
Malcolm Priestley [Wed, 21 May 2014 20:09:43 +0000 (21:09 +0100)]
staging: vt6656: remove dead code tcrc.c/h

Functions are now dead and of no use.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6656: s_vSWencryption replace CRCdwGetCrc32Ex
Malcolm Priestley [Wed, 21 May 2014 20:09:42 +0000 (21:09 +0100)]
staging: vt6656: s_vSWencryption replace CRCdwGetCrc32Ex

Replace with ether_crc_le which gives the same result.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6656: ETHbIsBufferCrc32Ok replace CRCdwGetCrc32
Malcolm Priestley [Wed, 21 May 2014 20:09:41 +0000 (21:09 +0100)]
staging: vt6656: ETHbIsBufferCrc32Ok replace CRCdwGetCrc32

CRCdwGetCrc32 is a bitwise not of ether_crc_le.

Replace with ether_crc_le.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6656: iowpa.h removed dead code.
Malcolm Priestley [Wed, 21 May 2014 20:09:40 +0000 (21:09 +0100)]
staging: vt6656: iowpa.h removed dead code.

Remove dead strutures

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6656: iocmd.h remove dead code.
Malcolm Priestley [Wed, 21 May 2014 20:09:39 +0000 (21:09 +0100)]
staging: vt6656: iocmd.h remove dead code.

Remove dead strutures and macros.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging/rtl8821ae: avoid format string leak to thread name
Kees Cook [Thu, 22 May 2014 18:57:16 +0000 (11:57 -0700)]
staging/rtl8821ae: avoid format string leak to thread name

This makes sure the cfg->name can never accidentally be processed as a
format string in the worker thread name.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8821ae: fix not declared symbols should be static in sw.c
Konrad Zapalowicz [Sat, 17 May 2014 19:23:38 +0000 (21:23 +0200)]
staging: rtl8821ae: fix not declared symbols should be static in sw.c

This commit fixes the following sparse warnings:

drivers/staging/rtl8821ae/rtl8821ae/sw.c:
    - 48:6: warning: symbol 'rtl8821ae_init_aspm_vars' was not declared.
      Should it be static?
    - 228:5: warning: symbol 'rtl8812ae_rx_command_packet_handler' was
      not declared. Should it be static?
    - 263:20: warning: symbol 'rtl8821ae_hal_ops' was not declared.
      Should it be static?
    - 314:23: warning: symbol 'rtl8821ae_mod_params' was not declared.
      Should it be static?
    - 321:20: warning: symbol 'rtl8821ae_hal_cfg' was not declared.
      Should it be static?

All of this symbols are local, that is there are no references to them
in the other files from this driver.

Signed-off-by: Konrad Zapalowicz <bergo.torino@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8821ae: fix double const in sw.c
Konrad Zapalowicz [Sat, 17 May 2014 19:23:37 +0000 (21:23 +0200)]
staging: rtl8821ae: fix double const in sw.c

This commit fixes the following sparse warning:

drivers/staging/rtl8821ae/rtl8821ae/sw.c:
    - 449:14: warning: duplicate const

Signed-off-by: Konrad Zapalowicz <bergo.torino@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8821ae: fix pointer coding style
Levente Kurusa [Sat, 10 May 2014 11:39:32 +0000 (13:39 +0200)]
staging: rtl8821ae: fix pointer coding style

Found by checkpatch.

Signed-off-by: Levente Kurusa <levex@linux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: keucr: smilmain.c: cosmetic updates
Tair Rzayev [Sun, 4 May 2014 08:44:52 +0000 (11:44 +0300)]
staging: keucr: smilmain.c: cosmetic updates

* Move Check_D_MediaFmt() implementation up in smilmain.c to keep all the
  non-static functions at the top of the file;
* Remove unnecessary extern and newlines from "init.h";

Signed-off-by: Tair Rzayev <tair.rzayev@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_1564: move apci1564_do_insn_bits() to addi_apci_1564.c
Chase Southwood [Thu, 22 May 2014 00:41:15 +0000 (19:41 -0500)]
staging: comedi: addi_apci_1564: move apci1564_do_insn_bits() to addi_apci_1564.c

This function is already compliant with the comedi API and is behaving as
comedi core expects.  This patch moves it out of
addi-data/hwdrv_apci1564.c and into the driver proper since no further
work needs to be done on it.

Signed-off-by: Chase Southwood <chase.southwood@gmail.com>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_1564: move apci1564_di_insn_bits() to addi_apci_1564.c
Chase Southwood [Thu, 22 May 2014 00:40:09 +0000 (19:40 -0500)]
staging: comedi: addi_apci_1564: move apci1564_di_insn_bits() to addi_apci_1564.c

This function is already compliant with the comedi API and is behaving as
comedi core expects.  This patch moves it out of
addi-data/hwdrv_apci1564.c and into the driver proper since no further
work needs to be done on it.

Signed-off-by: Chase Southwood <chase.southwood@gmail.com>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: comedi: fixed warning shown by checkpatch tool on cb_das16_cs.c file
Raghavendra Ganiga [Mon, 19 May 2014 16:11:36 +0000 (21:41 +0530)]
Staging: comedi: fixed warning shown by checkpatch tool on cb_das16_cs.c file

This is a patch to fix the warnings shown by checkpatch tool on
file cb_das16_cs.c

Signed-off-by: Raghavendra Chandra Ganiga <ravi23ganiga@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: comedi: fixed warnings reported by checkpatch tool on comedi_test.c file
Raghavendra Ganiga [Mon, 19 May 2014 16:19:03 +0000 (21:49 +0530)]
Staging: comedi: fixed warnings reported by checkpatch tool on comedi_test.c file

This is a patch to remove warnings reported by checkpatch tool on
comedi_test.c file

Signed-off-by: Raghavendra Chandra Ganiga <ravi23ganiga@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: Fixes Coding Style Warning in file das08.h
Sheetal Tigadoli [Thu, 8 May 2014 10:13:37 +0000 (15:43 +0530)]
staging: comedi: Fixes Coding Style Warning in file das08.h

The Patch fixes following Warnings, found using checkpatch.pl, in file das08.h

./scripts/checkpatch.pl --file --terse drivers/staging/comedi/drivers/das08.h
drivers/staging/comedi/drivers/das08.h:43: WARNING: line over 80 characters
total: 0 errors, 1 warnings, 50 lines checked

Signed-off-by: Sheetal Tigadoli <sheetal.tigadoli@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ii_pci20kc: fix usage of uninit scalar in ii20k_attach()
Christian Engelmayer [Wed, 7 May 2014 19:45:52 +0000 (21:45 +0200)]
staging: comedi: ii_pci20kc: fix usage of uninit scalar in ii20k_attach()

This driver supports the PCI-20001C-1a and PCI-20001C-2a carrier boards.
The -2a version has 32 on-board DIO channels. In case this variant is
detected, local variable 'has_dio' is set accordingly. Otherwise it is
left uninitialized and the following subdevice instantiation depends on
the stack. Detected by Coverity - CID 1077830.

Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_1564: remove boardinfo
Chase Southwood [Wed, 7 May 2014 07:04:17 +0000 (02:04 -0500)]
staging: comedi: addi_apci_1564: remove boardinfo

This driver only supports a single board type.  Remove the boardinfo and
its use in the driver.

Signed-off-by: Chase Southwood <chase.southwood@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_1564: remove check for timer subdevice
Chase Southwood [Wed, 7 May 2014 07:03:32 +0000 (02:03 -0500)]
staging: comedi: addi_apci_1564: remove check for timer subdevice

The only board served by this driver always has a timer, so we can init
the timer subdevice without checking first.

The boardinfo about the timer can also be removed and the data used
directly.

Signed-off-by: Chase Southwood <chase.southwood@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: remove subdevice member of struct comedi_async
Ian Abbott [Tue, 6 May 2014 12:12:18 +0000 (13:12 +0100)]
staging: comedi: remove subdevice member of struct comedi_async

The `async` member of `struct comedi_subdevice` may point to a `struct
comedi_async` or may be NULL.  The `subdevice` member of `struct
comedi_async` points back to the `struct comedi_subdevice` associated
with it in a one-to-one relationship.

All uses of the `subdevice` member of `struct comedi_async` apart from
its initialization have now been removed (by passing around a pointer to
the subdevice instead of to the "async" structure), so get rid of it.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: mite: pass subdevice to mite_sync_output_dma()
Ian Abbott [Tue, 6 May 2014 12:12:17 +0000 (13:12 +0100)]
staging: comedi: mite: pass subdevice to mite_sync_output_dma()

`mite_sync_output_dma()` in the "mite" module currently takes a pointer
to a `struct comedi_async` and gets a pointer to the owning `struct
comedi_subdevice` from the `subdevice` member.  Change it to take a
pointer to a `struct comedi_subdevice` and use the `async` member.

The motivation for this is to eliminate the `subdevice` member of
`struct comedi_async`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: mite: pass subdevice to mite_sync_input_dma()
Ian Abbott [Tue, 6 May 2014 12:12:16 +0000 (13:12 +0100)]
staging: comedi: mite: pass subdevice to mite_sync_input_dma()

`mite_sync_input_dma()` in the "mite" module currently takes a pointer
to a `struct comedi_async` and gets a pointer to the owning `struct
comedi_subdevice` from the `subdevice` member.  Change it to take a
pointer to a `struct comedi_subdevice` and use the `async` member.

The motivation for this is to eliminate the `subdevice` member of
`struct comedi_async`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: mite: pass subdevice to mite_buf_change()
Ian Abbott [Tue, 6 May 2014 12:12:15 +0000 (13:12 +0100)]
staging: comedi: mite: pass subdevice to mite_buf_change()

`mite_buf_change()` in the "mite" module currently takes a pointer to a
`struct comedi_async` and gets a pointer to the owning `struct
comedi_subdevice` from the `subdevice` member.  Change it to take a
pointer to a `struct comedi_subdevice` and use the `async` member.

The motivation for this is to eliminate the `subdevice` member of
`struct comedi_async`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pass subdevice to comedi_buf_write_n_available()
Ian Abbott [Tue, 6 May 2014 12:12:14 +0000 (13:12 +0100)]
staging: comedi: pass subdevice to comedi_buf_write_n_available()

Local function `comedi_buf_write_n_available()` currently takes a
pointer to a `struct comedi_async`.  Change it to take a pointer to a
`struct comedi_subdevice` and use the `async` member for consistency
with the other comedi buffer handling functions.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pass subdevice to __comedi_buf_write_alloc()
Ian Abbott [Tue, 6 May 2014 12:12:13 +0000 (13:12 +0100)]
staging: comedi: pass subdevice to __comedi_buf_write_alloc()

Local function `__comedi_buf_write_alloc()` is called by
`comedi_buf_write_alloc()` and `comedi_buf_put()`.  It currently takes a
pointer to a `struct comedi_async`.  Change it to take a pointer to a
`struct comedi_subdevice` and use the `async` member for consistency
with other comedi buffer handling functions.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pass subdevice to comedi_buf_munge()
Ian Abbott [Tue, 6 May 2014 12:12:12 +0000 (13:12 +0100)]
staging: comedi: pass subdevice to comedi_buf_munge()

Local function `comedi_buf_munge()` is called by
`comedi_buf_write_free()` to modify (or "munge") the data copied from
a device into the buffer.

Currently, the function takes a pointer to a `struct comedi_async` and
gets a pointer to the comedi subdevice from the `subdevice` member.
Change it to take a pointer to a `struct comedi_subdevice` and get a
pointer to the "async" structure from the `async` member.

The main motivation for this is to elimate the `subdevice` member of
`struct comedi_async`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pass subdevice to comedi_buf_is_mmapped()
Ian Abbott [Tue, 6 May 2014 12:12:11 +0000 (13:12 +0100)]
staging: comedi: pass subdevice to comedi_buf_is_mmapped()

Change the parameters of `comedi_buf_is_mmapped()` to pass a pointer to
the comedi subdevice instead of a pointer to the "async" structure
belonging to the subdevice.

The main aim at the moment is to replace all the `struct comedi_async *`
parameters with `struct comedi_subdevice *` parameters in the comedi
driver API.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pass subdevice to comedi_buf_reset()
Ian Abbott [Tue, 6 May 2014 12:12:10 +0000 (13:12 +0100)]
staging: comedi: pass subdevice to comedi_buf_reset()

Change the parameters of `comedi_buf_reset()` to pass a pointer to the
comedi subdevice instead of a pointer to the "async" structure belonging
to the subdevice.

The main aim at the moment is to replace all the `struct comedi_async *`
parameters with `struct comedi_subdevice *` parameters in the comedi
driver API.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pass subdevice to comedi_buf_read_n_available()
Ian Abbott [Tue, 6 May 2014 12:12:09 +0000 (13:12 +0100)]
staging: comedi: pass subdevice to comedi_buf_read_n_available()

Change the parameters of `comedi_buf_read_n_available()` to pass a
pointer to the comedi subdevice instead of a pointer to the "async"
structure belonging to the subdevice.

The main aim at the moment is to replace all the `struct comedi_async *`
parameters with `struct comedi_subdevice *` parameters in the comedi
driver API.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pass subdevice to comedi_buf_read_free()
Ian Abbott [Tue, 6 May 2014 12:12:08 +0000 (13:12 +0100)]
staging: comedi: pass subdevice to comedi_buf_read_free()

Change the parameters of `comedi_buf_read_free()` to pass a pointer to
the comedi subdevice instead of a pointer to the "async" structure
belonging to the subdevice.

The main aim at the moment is to replace all the `struct comedi_async *`
parameters with `struct comedi_subdevice *` parameters in the comedi
driver API.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pass subdevice to comedi_buf_read_alloc()
Ian Abbott [Tue, 6 May 2014 12:12:07 +0000 (13:12 +0100)]
staging: comedi: pass subdevice to comedi_buf_read_alloc()

Change the parameters of `comedi_buf_read_alloc()` to pass a pointer to
the comedi subdevice instead of a pointer to the "async" structure
belonging to the subdevice.

The main aim at the moment is to replace all the `struct comedi_async *`
parameters with `struct comedi_subdevice *` parameters in the comedi
driver API.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pass subdevice to comedi_buf_write_n_allocated()
Ian Abbott [Tue, 6 May 2014 12:12:06 +0000 (13:12 +0100)]
staging: comedi: pass subdevice to comedi_buf_write_n_allocated()

Change the parameters of `comedi_buf_write_n_allocated()` to pass a
pointer to the comedi subdevice instead of a pointer to the "async"
structure belonging to the subdevice.

The main aim at the moment is to replace all the `struct comedi_async *`
parameters with `struct comedi_subdevice *` parameters in the comedi
driver API.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pass subdevice to comedi_buf_write_free()
Ian Abbott [Tue, 6 May 2014 12:12:05 +0000 (13:12 +0100)]
staging: comedi: pass subdevice to comedi_buf_write_free()

Change the parameters of `comedi_buf_write_free()` to pass a pointer to
the comedi subdevice instead of a pointer to the "async" structure
belonging to the subdevice.

The main aim at the moment is to replace all the `struct comedi_async *`
parameters with `struct comedi_subdevice *` parameters in the comedi
driver API.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pass subdevice to comedi_buf_write_alloc()
Ian Abbott [Tue, 6 May 2014 12:12:04 +0000 (13:12 +0100)]
staging: comedi: pass subdevice to comedi_buf_write_alloc()

Change the parameters of `comedi_buf_write_alloc()` to pass a pointer to
the comedi subdevice instead of a pointer to the "async" structure
belonging to the subdevice.

The main aim at the moment is to replace all the `struct comedi_async *`
parameters with `struct comedi_subdevice *` parameters in the comedi
driver API.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_tiocmd: pass subdevice to command setup functions
Ian Abbott [Tue, 6 May 2014 12:12:03 +0000 (13:12 +0100)]
staging: comedi: ni_tiocmd: pass subdevice to command setup functions

The `ni_tio_input_cmd()`, `ni_tio_output_cmd()` and `ni_tio_cmd_setup()`
functions are called from `ni_tio_cmd()` to set up a comedi command.
They currently get passed two parameters, a pointer to a `struct
ni_gpct` and a pointer to a `struct comedi_async`, but both of those
come from members of a `struct comedi_subdevice` (the former from the
`private` member).  Replace the parameters with a pointer to the `struct
comedi_subdevice`.

The main motive is to make the comedi subdevice more easily available to
the functions for the use of subsequent patches to remove the `struct
comedi_async *` parameters from the comedi buffer handling functions.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pass subdevice to comedi_buf_memcpy_from()
Ian Abbott [Tue, 6 May 2014 12:12:02 +0000 (13:12 +0100)]
staging: comedi: pass subdevice to comedi_buf_memcpy_from()

Change the parameters of `comedi_buf_memcpy_from()` to pass a pointer to
the comedi subdevice instead of a pointer to the "async" structure
belonging to the subdevice.

The main aim at the moment is to replace all the `struct comedi_async *`
parameters with `struct comedi_subdevice *` parameters in the comedi
driver API.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pass subdevice to comedi_buf_memcpy_to()
Ian Abbott [Tue, 6 May 2014 12:12:01 +0000 (13:12 +0100)]
staging: comedi: pass subdevice to comedi_buf_memcpy_to()

Change the parameters of `comedi_buf_memcpy_to()` to pass a pointer to
the comedi subdevice instead of a pointer to the "async" structure
belonging to the subdevice.

The main aim at the moment is to replace all the `struct comedi_async *`
parameters with `struct comedi_subdevice *` parameters in the comedi
driver API.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pass subdevice to comedi_buf_get()
Ian Abbott [Tue, 6 May 2014 12:12:00 +0000 (13:12 +0100)]
staging: comedi: pass subdevice to comedi_buf_get()

Change the parameters of `comedi_buf_get()` to pass a pointer to the
comedi subdevice instead of a pointer to the "async" structure belonging
to the subdevice.

The function gets a sample value from the comedi buffer, but currently
only deals with 16-bit sample types.  A future version could deal with
16 or 32-bit sample types depending on the value of the SDF_LSAMPL
subdevice flag.

The main aim at the moment is to replace all the `struct comedi_async *`
parameters with `struct comedi_subdevice *` parameters in the comedi
driver API.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pass subdevice to comedi_buf_put()
Ian Abbott [Tue, 6 May 2014 12:11:59 +0000 (13:11 +0100)]
staging: comedi: pass subdevice to comedi_buf_put()

Change the parameters of `comedi_buf_put()` to pass a pointer to the
comedi subdevice instead of a pointer to the "async" structure belonging
to the subdevice.

The function puts a sample value in the comedi buffer, but currently
only deals with 16-bit sample types.  A future version could deal with
16 or 32-bit sample types depending on the value of the SDF_LSAMPL
subdevice flag.

The main aim at the moment is to replace all the `struct comedi_async *`
parameters with `struct comedi_subdevice *` parameters in the comedi
driver API.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl730: add support for Diamond Systems PC/104 modules
H Hartley Sweeten [Tue, 6 May 2014 23:08:56 +0000 (16:08 -0700)]
staging: comedi: pcl730: add support for Diamond Systems PC/104 modules

The Diamond Systems OPMM-1616-XT board is a PC/104 module with 16
optoisolated inputs and 16 relay outputs.

The PEARL-MM-P board is a PC/104 module with 16 relay outputs.

Both of these boards can be supported by the pcl730 driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: amplc_pci224: use comedi_fc helpers to validate timer args
H Hartley Sweeten [Tue, 6 May 2014 19:26:04 +0000 (12:26 -0700)]
staging: comedi: amplc_pci224: use comedi_fc helpers to validate timer args

Use the comedi_fc helper cfc_check_trigger_arg_is() to validate the
scan_begin_arg when the scan_begin_src is TRIG_TIMER.

For aesthetics reasons, rename the local variable 'tmp' to 'arg'.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: amplc_dio200_common: remove 'continuous' from subdevice private...
H Hartley Sweeten [Tue, 6 May 2014 17:55:23 +0000 (10:55 -0700)]
staging: comedi: amplc_dio200_common: remove 'continuous' from subdevice private data

This member of the subdevice private data can be determined from the
cmd->stop_src. Do that instead.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: adl_pc19111: remove 'chanlist_len' from private data
H Hartley Sweeten [Mon, 5 May 2014 16:48:19 +0000 (09:48 -0700)]
staging: comedi: adl_pc19111: remove 'chanlist_len' from private data

This member of the private data is a copy of the cmd->chanlist_len. Use
that instead.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: adl_pc19111: rename 'async_cmd' variable in (*do_cmd)
H Hartley Sweeten [Mon, 5 May 2014 16:48:18 +0000 (09:48 -0700)]
staging: comedi: adl_pc19111: rename 'async_cmd' variable in (*do_cmd)

The comedi_cmd pointer is typically just called 'cmd'. Rename the local
variable in pci9111_ai_do_cmd().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: adl_pc19111: remove 'stop_is_none' from private data
H Hartley Sweeten [Mon, 5 May 2014 16:48:17 +0000 (09:48 -0700)]
staging: comedi: adl_pc19111: remove 'stop_is_none' from private data

This member of the private data can be determined by checking the
cmd->stop_src. Do that instead.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: adl_pci9118: remove 'dmabuf_samples' from private data
H Hartley Sweeten [Mon, 5 May 2014 16:35:48 +0000 (09:35 -0700)]
staging: comedi: adl_pci9118: remove 'dmabuf_samples' from private data

This member of the private data is set but never used. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>