platform/kernel/linux-rpi.git
10 years agostaging: vt6655: fifo & frag control remove big endian values
Malcolm Priestley [Wed, 29 Oct 2014 17:44:06 +0000 (17:44 +0000)]
staging: vt6655: fifo & frag control remove big endian values

Endian conversion now happens at run time only little endian
values are valid.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: baseband.c timers replace spin lock
Malcolm Priestley [Wed, 29 Oct 2014 17:44:05 +0000 (17:44 +0000)]
staging: vt6655: baseband.c timers replace spin lock

Use spin_lock_irqsave and spin_unlock_irqrestore

in functions TimerSQ3CallBack and TimerState1CallBack

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: device_init_registers replace spin lock
Malcolm Priestley [Wed, 29 Oct 2014 17:44:04 +0000 (17:44 +0000)]
staging: vt6655: device_init_registers replace spin lock

Use spin_lock_irqsave and spin_unlock_irqrestore.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: s_vGenerateTxParameter remove unused cbMACHdLen
Malcolm Priestley [Wed, 29 Oct 2014 17:44:03 +0000 (17:44 +0000)]
staging: vt6655: s_vGenerateTxParameter remove unused cbMACHdLen

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: baseband.c replace BIT0 with BIT(0)
Malcolm Priestley [Wed, 29 Oct 2014 17:44:02 +0000 (17:44 +0000)]
staging: vt6655: baseband.c replace BIT0 with BIT(0)

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: MACvSetDefaultKeyEntry replace WLAN_WEP104_KEYLEN
Malcolm Priestley [Wed, 29 Oct 2014 17:44:01 +0000 (17:44 +0000)]
staging: vt6655: MACvSetDefaultKeyEntry replace WLAN_WEP104_KEYLEN

with WLAN_KEY_LEN_WEP40

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: mac80211 conversion: PSbIsNextTBTTWakeUp convert to mac80211
Malcolm Priestley [Wed, 29 Oct 2014 17:44:00 +0000 (17:44 +0000)]
staging: vt6655: mac80211 conversion: PSbIsNextTBTTWakeUp convert to mac80211

Wake up to listen to next beacon when struct ieee80211_conf -> listen_interval == 1

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: vt6655_probe remove management pointers
Malcolm Priestley [Wed, 29 Oct 2014 17:43:59 +0000 (17:43 +0000)]
staging: vt6655: vt6655_probe remove management pointers

All these pointers are now dead.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: mac80211 conversion: device_error remove legacy functions
Malcolm Priestley [Wed, 29 Oct 2014 17:43:58 +0000 (17:43 +0000)]
staging: vt6655: mac80211 conversion: device_error remove legacy functions

Remove netif_stop_queue, bCmdRunning and timer functions

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: phy type same as bb type
Malcolm Priestley [Wed, 29 Oct 2014 17:43:57 +0000 (17:43 +0000)]
staging: vt6655: phy type same as bb type

To maintain functionality

typedef enum _CARD_PHY_TYPE should have the same values as
typedef enum _VIA_PKT_TYPE

TODO both these types need merging.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: switch driver over to mac80211
Malcolm Priestley [Wed, 29 Oct 2014 17:43:56 +0000 (17:43 +0000)]
staging: vt6655: switch driver over to mac80211

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: mac80211 conversion: device_free_info
Malcolm Priestley [Wed, 29 Oct 2014 17:43:55 +0000 (17:43 +0000)]
staging: vt6655: mac80211 conversion: device_free_info

Remove net device code and add mac80211 unregister code.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: mac80211 conversion: device_init_registers remove legacy code
Malcolm Priestley [Wed, 29 Oct 2014 17:43:54 +0000 (17:43 +0000)]
staging: vt6655: mac80211 conversion: device_init_registers remove legacy code

Remove pMgmt, byCurrentCh, VNTWIFIbConfigPhyMode, eEncryptionStatus and netif_stop_queue.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: CARDbSetPhyParameter replace s_vSetRSPINF with CARDvSetRSPINF
Malcolm Priestley [Wed, 29 Oct 2014 17:43:53 +0000 (17:43 +0000)]
staging: vt6655: CARDbSetPhyParameter replace s_vSetRSPINF with CARDvSetRSPINF

Removing s_vSetRSPINF

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: mac80211 conversion: card.c use basic_rates
Malcolm Priestley [Wed, 29 Oct 2014 17:43:52 +0000 (17:43 +0000)]
staging: vt6655: mac80211 conversion: card.c use basic_rates

Use basic_rates to find cck and ofdm rates.

wBasicRate will be removed later.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: mac80211 conversion: changes to CARDbSetPhyParameter
Malcolm Priestley [Wed, 29 Oct 2014 17:43:51 +0000 (17:43 +0000)]
staging: vt6655: mac80211 conversion: changes to CARDbSetPhyParameter

CARDbSetPhyParameter appears to use two different strutures to find supported
rates.

Remove PWLAN_IE_SUPP_RATES and use basic_rates to find rates supported.

mac80211 now sets bShortSlotTime, bBarkerPreambleMd and byPreambleType remove
these.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: mac80211 conversion: enable power saving
Malcolm Priestley [Wed, 29 Oct 2014 17:43:50 +0000 (17:43 +0000)]
staging: vt6655: mac80211 conversion: enable power saving

Convert PSvEnablePowerSaving and PSvEnablePowerSaving

Remove mgmt->wCurrAID and use pDevice->current_aid

We nolonger send the PSbSendNullPacket.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: mac80211 conversion: changes to set channel
Malcolm Priestley [Wed, 29 Oct 2014 17:43:49 +0000 (17:43 +0000)]
staging: vt6655: mac80211 conversion: changes to set channel

Remove call to sChannelTbl, the channel under mac80211 is always valid.

CARDbSetPhyParameter is nolonger set here.

RFbSetPower is now set on byBBType

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: mac80211 conversion: device_tx_srv tx and add report rates
Malcolm Priestley [Wed, 29 Oct 2014 17:43:48 +0000 (17:43 +0000)]
staging: vt6655: mac80211 conversion: device_tx_srv tx and add report rates

vnt_int_report_rate reports backs tx rate and is replacment for STAvUpdateTDStatCounter
and BSSvUpdateNodeTxCounter.

Replacing existing code.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: mac80211 conversion: changes to device_intr
Malcolm Priestley [Wed, 29 Oct 2014 17:43:47 +0000 (17:43 +0000)]
staging: vt6655: mac80211 conversion: changes to device_intr

Remove net device code.

Remove current measure code and function s_vCompleteCurrentMeasure
and switch code which are now handled by mac80211

Change beaconing to mac80211.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: mac80211 conversion: device_print_info remove netdevice.
Malcolm Priestley [Wed, 29 Oct 2014 17:43:46 +0000 (17:43 +0000)]
staging: vt6655: mac80211 conversion: device_print_info remove netdevice.

use dev_info for device name and pcid->irq for irq number.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: mac80211 conversion replace suspend resume functions
Malcolm Priestley [Wed, 29 Oct 2014 17:43:45 +0000 (17:43 +0000)]
staging: vt6655: mac80211 conversion replace suspend resume functions

add vt6655_suspend and vt6655_resume

remove viawget_suspend and viawget_resume.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: mac80211 conversion add channel bands
Malcolm Priestley [Wed, 29 Oct 2014 17:43:44 +0000 (17:43 +0000)]
staging: vt6655: mac80211 conversion add channel bands

Add rates and channels according to rf type for vnt_init_bands which is a
mac80211 replacement for init_channel_table.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: mac80211 conversion add main mac80211 functions
Malcolm Priestley [Wed, 29 Oct 2014 17:43:43 +0000 (17:43 +0000)]
staging: vt6655: mac80211 conversion add main mac80211 functions

Replace existing vt6655_probe with one converted to mac80211
with the following operations

vnt_tx_80211
vnt_start
vnt_stop
vnt_add_interface
vnt_remove_interface
vnt_config
vnt_bss_info_changed
vnt_prepare_multicast
vnt_configure
vnt_set_key
vnt_get_tsf
vnt_set_tsf
vnt_reset_tsf

The following variables are also added.
basic_rates
mc_list_count
mac_hw

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: mac80211 conversion: s_uFillDataHead add power saving poll
Malcolm Priestley [Wed, 29 Oct 2014 17:43:42 +0000 (17:43 +0000)]
staging: vt6655: mac80211 conversion: s_uFillDataHead add power saving poll

Replace variable wCurrentRate with is_pspoll.

add current_aid to structure vnt_private which is to be used by
mac80211 operations.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: mac80211 conversion: s_vFillRTSHead convert to using struct ieee8021...
Malcolm Priestley [Wed, 29 Oct 2014 17:43:41 +0000 (17:43 +0000)]
staging: vt6655: mac80211 conversion: s_vFillRTSHead convert to using struct ieee80211_hdr

Removing PSEthernetHeader

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: dead code remove s_vFillFragParameter.
Malcolm Priestley [Wed, 29 Oct 2014 17:43:40 +0000 (17:43 +0000)]
staging: vt6655: dead code remove s_vFillFragParameter.

s_vFillFragParameter is nolonger used.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: mac80211 conversion: s_cbFillTxBufHead
Malcolm Priestley [Wed, 29 Oct 2014 17:43:39 +0000 (17:43 +0000)]
staging: vt6655: mac80211 conversion: s_cbFillTxBufHead

Covert to handle mac80211 sk_buff data removing fragmentation processing
via s_vFillFragParameter and calls to vGenerateMACHeader and s_vSWencryption

fragmentation is now handled by mac80211.

There is still more todos with this function when legacy net device code
have been remove from driver.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: mac8021 conversion: add new tx functions
Malcolm Priestley [Wed, 29 Oct 2014 17:43:38 +0000 (17:43 +0000)]
staging: vt6655: mac8021 conversion: add new tx functions

vnt_fill_txkey a mac80211 repacement for s_vFillTxKey

vnt_generate_fifo_header mac80211 replacement for vGenerateFIFOHeader

vnt_beacon_make for making and despatching beacon.

vnt_beacon_enable to enabling beacon

struct vnt_tx_fifo_head is also added to replace typedef
struct tagSTxBufHead that will be removed later.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: mac80211 conversion: add new key functions
Malcolm Priestley [Wed, 29 Oct 2014 17:43:37 +0000 (17:43 +0000)]
staging: vt6655: mac80211 conversion: add new key functions

vnt_key_init_table to initialize the table

vnt_set_keys to set the keys

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: mac80211 conversion: add new rx functions
Malcolm Priestley [Wed, 29 Oct 2014 17:43:36 +0000 (17:43 +0000)]
staging: vt6655: mac80211 conversion: add new rx functions

vnt_receive_frame which replaces device_receive_frame

and vnt_rx_data which handles mac80211 rx data

structures ieee80211_hw, ieee80211_vif and variable rx_rate are added
in structure vnt_private

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: fix macro spacing in uisutils.h
Benjamin Romer [Tue, 28 Oct 2014 13:36:28 +0000 (09:36 -0400)]
staging: unisys: fix macro spacing in uisutils.h

Add some space between the macros in uisutils.h for readability.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: fix alignment in virtpci.h
Benjamin Romer [Mon, 27 Oct 2014 18:18:15 +0000 (14:18 -0400)]
staging: unisys: fix alignment in virtpci.h

Clean up misaligned indentation in virtpci.h.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: fix CamelCase members of virtpci_dev
Benjamin Romer [Mon, 27 Oct 2014 18:18:14 +0000 (14:18 -0400)]
staging: unisys: fix CamelCase members of virtpci_dev

Fix CamelCase names in this structure:

busNo => bus_no
deviceNo => device_no

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: get rid of typedef for VIRTPCI_DEV_TYPE
Benjamin Romer [Mon, 27 Oct 2014 18:18:13 +0000 (14:18 -0400)]
staging: unisys: get rid of typedef for VIRTPCI_DEV_TYPE

Remove the typedef and use enum virtpc_dev_type instead. Update references.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: fix CamelCase in net_adap_info
Benjamin Romer [Mon, 27 Oct 2014 18:18:12 +0000 (14:18 -0400)]
staging: unisys: fix CamelCase in net_adap_info

Fix the CamelCase member name in this structure:

zoneGuid => zone_uuid

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: ft1000: ft1000-pcmcia: Fix whitespace issues
Nicky Chorley [Sun, 26 Oct 2014 06:21:04 +0000 (06:21 +0000)]
Staging: ft1000: ft1000-pcmcia: Fix whitespace issues

This patch fixes the following errors and warnings
identified by checkpatch.pl:

WARNING: please, no spaces at the start of a line
814: FILE: ft1000_hw.c:814:
    tempword = ft1000_read_reg(dev, FT1000_REG_DOORBELL);$

WARNING: please, no spaces at the start of a line
815: FILE: ft1000_hw.c:815:
    i=0;$

ERROR: spaces required around that '=' (ctx:VxV)
815: FILE: ft1000_hw.c:815:
    i=0;

WARNING: please, no spaces at the start of a line
816: FILE: ft1000_hw.c:816:
    while (tempword & FT1000_DB_DPRAM_TX) {$

ERROR: code indent should use tabs where possible
817: FILE: ft1000_hw.c:817:
        mdelay(10);$

WARNING: please, no spaces at the start of a line
817: FILE: ft1000_hw.c:817:
        mdelay(10);$

ERROR: code indent should use tabs where possible
818: FILE: ft1000_hw.c:818:
        i++;$

WARNING: please, no spaces at the start of a line
818: FILE: ft1000_hw.c:818:
        i++;$

ERROR: code indent should use tabs where possible
819: FILE: ft1000_hw.c:819:
        if (i==10) {$

WARNING: please, no spaces at the start of a line
819: FILE: ft1000_hw.c:819:
        if (i==10) {$

WARNING: suspect code indent for conditional statements (8, 12)
819: FILE: ft1000_hw.c:819:
        if (i==10) {
            spin_unlock_irqrestore(&info->dpram_lock, flags);

ERROR: spaces required around that '==' (ctx:VxV)
819: FILE: ft1000_hw.c:819:
        if (i==10) {

ERROR: code indent should use tabs where possible
820: FILE: ft1000_hw.c:820:
            spin_unlock_irqrestore(&info->dpram_lock, flags);$

WARNING: please, no spaces at the start of a line
820: FILE: ft1000_hw.c:820:
            spin_unlock_irqrestore(&info->dpram_lock, flags);$

ERROR: code indent should use tabs where possible
821: FILE: ft1000_hw.c:821:
            return;$

WARNING: please, no spaces at the start of a line
821: FILE: ft1000_hw.c:821:
            return;$

ERROR: code indent should use tabs where possible
822: FILE: ft1000_hw.c:822:
        }$

WARNING: please, no spaces at the start of a line
822: FILE: ft1000_hw.c:822:
        }$

ERROR: code indent should use tabs where possible
823: FILE: ft1000_hw.c:823:
        tempword = ft1000_read_reg(dev, FT1000_REG_DOORBELL);$

WARNING: please, no spaces at the start of a line
823: FILE: ft1000_hw.c:823:
        tempword = ft1000_read_reg(dev, FT1000_REG_DOORBELL);$

WARNING: please, no spaces at the start of a line
824: FILE: ft1000_hw.c:824:
    }$

Signed-off-by: Nicky Chorley <ndchorley@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: gs_fpgaboot: fix a compiler warning with make W=2
Devendra Naga [Fri, 24 Oct 2014 20:31:56 +0000 (02:01 +0530)]
staging: gs_fpgaboot: fix a compiler warning with make W=2

The below warning is fixed:

drivers/staging/gs_fpgaboot/gs_fpgaboot.c: In function ‘gs_load_image’:
drivers/staging/gs_fpgaboot/gs_fpgaboot.c:196:58: warning: declaration of ‘file’ shadows a global declaration [-Wshadow]
drivers/staging/gs_fpgaboot/gs_fpgaboot.c:45:14: warning: shadowed declaration is here [-Wshadow]

by renaming file function argument of gs_load_image with fw_file.

Signed-off-by: Devendra Naga <devendranaga4@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: gs_fpgpaboot: fix compiler warning with make W=1
Devendra Naga [Fri, 24 Oct 2014 20:31:55 +0000 (02:01 +0530)]
staging: gs_fpgpaboot: fix compiler warning with make W=1

the following compiler warning has been fixed:

drivers/staging/gs_fpgaboot/gs_fpgaboot.c: In function ‘gs_read_bitstream’:
drivers/staging/gs_fpgaboot/gs_fpgaboot.c:160:6: warning: variable ‘size’ set but not used [-Wunused-but-set-variable]
  CC      drivers/staging/gs_fpgaboot/io.o
  LD      drivers/staging/gs_fpgaboot/gs_fpga.o
  LD      drivers/staging/gs_fpgaboot/built-in.o

by removing the size variable.

Signed-off-by: Devendra Naga <devendranaga4@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: gs_fpgaboot: cleanup in gs_fpgaboot_init function
Devendra Naga [Fri, 24 Oct 2014 20:31:54 +0000 (02:01 +0530)]
staging: gs_fpgaboot: cleanup in gs_fpgaboot_init function

the error path is cleanup to return the correct (function call return value)
error code.

Signed-off-by: Devendra Naga <devendranaga4@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8712: remove unused variables
Sudip Mukherjee [Mon, 27 Oct 2014 12:12:25 +0000 (17:42 +0530)]
staging: rtl8712: remove unused variables

unused variables are removed. These variables were only assigned some
values and after that they were never being used. So they are safe to
be removed , and it has been build tested.

I left a call to r8712_read32(padapter, TCR) and
r8712_read8(padapter, SDIO_HCPWM) .

r8712_read32() and r8712_read8() is ultimately calling usb_read32()
and usb_read8() respectively. and they are again calling
r8712_usbctrl_vendorreq().
this r8712_usbctrl_vendorreq() is communicating through the usb bus
and is sending and receiving the control msg.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8712: Remove redundant cast
Rasmus Villemoes [Wed, 22 Oct 2014 21:22:27 +0000 (23:22 +0200)]
staging: rtl8712: Remove redundant cast

struct firmware::data has type const u8*, as does *ppmappedfw, so the
cast to u8* is unnecessary and slightly confusing.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: iio: adc: fix line over 80 characters
Brian Vandre [Tue, 21 Oct 2014 22:56:47 +0000 (17:56 -0500)]
Staging: iio: adc: fix line over 80 characters

This fixes the 2 checkpatch.pl warnings:
WARNING: line over 80 characters

Signed-off-by: Brian Vandre <bvandre@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: rts5208: helper function to enable interrupts during reset
Fabio Falzoi [Sun, 19 Oct 2014 19:30:03 +0000 (21:30 +0200)]
Staging: rts5208: helper function to enable interrupts during reset

Define the helper function rtsx_enable_pcie_intr to shorten the
rtsx_reset_chip code and get rid of the LONG_LINE checkpatch warnings.

Signed-off-by: Fabio Falzoi <fabio.falzoi84@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpente@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: rts5208: helper function to manage aspm during reset
Fabio Falzoi [Sun, 19 Oct 2014 19:30:02 +0000 (21:30 +0200)]
Staging: rts5208: helper function to manage aspm during reset

Define the helper function rtsx_reset_aspm to shorten the
rtsx_reset_chip code and get rid of the LONG_LINE checkpatch warnings.

Signed-off-by: Fabio Falzoi <fabio.falzoi84@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpente@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ft1000: do not initialise statics to 0 or NULL
Chen Weixiang [Sun, 19 Oct 2014 12:59:44 +0000 (20:59 +0800)]
staging: ft1000: do not initialise statics to 0 or NULL

Remove following checkpatch.pl error from ft1000/ft1000-usb/ft1000_debug.c
ERROR: do not initialise statics to 0 or NULL

Signed-off-by: Chen Weixiang <weixiang.chen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: clocking-wizard: Contain macro argument in parenthesis
Soren Brinkmann [Mon, 20 Oct 2014 20:20:08 +0000 (13:20 -0700)]
staging: clocking-wizard: Contain macro argument in parenthesis

A macro doing some arithmetic to calculate a register offset, did not
contain an argument to the macro in parentheses, potentially leading to
unexpected results when using that macro with arithmetic expressions as
argument.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: vt6655: Remove C99 comments
Nicky Chorley [Sun, 26 Oct 2014 06:30:29 +0000 (06:30 +0000)]
Staging: vt6655: Remove C99 comments

This patch fixes the following errors identified by
checkpatch.pl:

ERROR: do not use C99 // comments
36: FILE: card.h:36:
//

ERROR: do not use C99 // comments
37: FILE: card.h:37:
// Loopback mode

ERROR: do not use C99 // comments
38: FILE: card.h:38:
//

ERROR: do not use C99 // comments
39: FILE: card.h:39:
// LOBYTE is MAC LB mode, HIBYTE is MII LB mode

ERROR: do not use C99 // comments
41: FILE: card.h:41:
#define CARD_LB_MAC             MAKEWORD(MAC_LB_INTERNAL, 0)   // PHY must ISO, avoid MAC loopback packet go out

ERROR: do not use C99 // comments
44: FILE: card.h:44:
#define DEFAULT_MSDU_LIFETIME           512  // ms

ERROR: do not use C99 // comments
45: FILE: card.h:45:
#define DEFAULT_MSDU_LIFETIME_RES_64us  8000 // 64us

ERROR: do not use C99 // comments
47: FILE: card.h:47:
#define DEFAULT_MGN_LIFETIME            8    // ms

ERROR: do not use C99 // comments
48: FILE: card.h:48:
#define DEFAULT_MGN_LIFETIME_RES_64us   125  // 64us

ERROR: do not use C99 // comments
175: FILE: card.h:175:
#endif // __CARD_H__

Signed-off-by: Nicky Chorley <ndchorley@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: Remove redundant cast
Rasmus Villemoes [Tue, 21 Oct 2014 15:00:24 +0000 (17:00 +0200)]
staging: vt6655: Remove redundant cast

Both sides have type const struct iw_handler_def*, so the cast is
unnecessary and confusing.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8192u: Fix "space prohibited after that open parenthesis '('" errors
Greg Donald [Sun, 26 Oct 2014 20:19:22 +0000 (15:19 -0500)]
staging: rtl8192u: Fix "space prohibited after that open parenthesis '('" errors

Fix checkpatch.pl "space prohibited after that open parenthesis '('" errors

Signed-off-by: Greg Donald <gdonald@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: hal: space required
Paul McQuade [Mon, 27 Oct 2014 16:13:29 +0000 (16:13 +0000)]
staging: rtl8188eu: hal: space required

ERROR: space required before the open brace '{'

Signed-off-by: Paul McQuade <paulmcquad@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8192u: Fix checkpatch.pl warnings
Koray Gulcu [Sun, 12 Oct 2014 18:46:51 +0000 (19:46 +0100)]
staging: rtl8192u: Fix checkpatch.pl warnings

This patch fixes "line over 80 characters" warnings found in the first patch by breaking u4bAcParam's calculation down into a few steps.

Signed-off-by: Koray Gulcu <koray.gulcu@ozu.edu.tr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8192u: Fix sparse warnings of r8182U_core
Koray Gulcu [Sun, 12 Oct 2014 18:46:50 +0000 (19:46 +0100)]
staging: rtl8192u: Fix sparse warnings of r8182U_core

This patch fixes the following endianness warnings found by sparse running with CF=-D__CHECK_ENDIAN__:

drivers/staging/rtl8192u/r8192U_core.c:1794:10: warning: incorrect type in initializer (different base types)
drivers/staging/rtl8192u/r8192U_core.c:1794:10:    expected restricted __le16
drivers/staging/rtl8192u/r8192U_core.c:1794:10:    got int
drivers/staging/rtl8192u/r8192U_core.c:1794:13: warning: incorrect type in initializer (different base types)
drivers/staging/rtl8192u/r8192U_core.c:1794:13:    expected restricted __le16
drivers/staging/rtl8192u/r8192U_core.c:1794:13:    got int
drivers/staging/rtl8192u/r8192U_core.c:1794:16: warning: incorrect type in initializer (different base types)
drivers/staging/rtl8192u/r8192U_core.c:1794:16:    expected restricted __le16
drivers/staging/rtl8192u/r8192U_core.c:1794:16:    got int
drivers/staging/rtl8192u/r8192U_core.c:1794:19: warning: incorrect type in initializer (different base types)
drivers/staging/rtl8192u/r8192U_core.c:1794:19:    expected restricted __le16
drivers/staging/rtl8192u/r8192U_core.c:1794:19:    got int
drivers/staging/rtl8192u/r8192U_core.c:1795:10: warning: incorrect type in initializer (different base types)
drivers/staging/rtl8192u/r8192U_core.c:1795:10:    expected restricted __le16
drivers/staging/rtl8192u/r8192U_core.c:1795:10:    got int
drivers/staging/rtl8192u/r8192U_core.c:1795:13: warning: incorrect type in initializer (different base types)
drivers/staging/rtl8192u/r8192U_core.c:1795:13:    expected restricted __le16
drivers/staging/rtl8192u/r8192U_core.c:1795:13:    got int
drivers/staging/rtl8192u/r8192U_core.c:1795:16: warning: incorrect type in initializer (different base types)
drivers/staging/rtl8192u/r8192U_core.c:1795:16:    expected restricted __le16
drivers/staging/rtl8192u/r8192U_core.c:1795:16:    got int
drivers/staging/rtl8192u/r8192U_core.c:1795:19: warning: incorrect type in initializer (different base types)
drivers/staging/rtl8192u/r8192U_core.c:1795:19:    expected restricted __le16
drivers/staging/rtl8192u/r8192U_core.c:1795:19:    got int
drivers/staging/rtl8192u/r8192U_core.c:1838:34: warning: cast from restricted __le16
drivers/staging/rtl8192u/r8192U_core.c:1839:34: warning: cast from restricted __le16
drivers/staging/rtl8192u/r8192U_core.c:1840:34: warning: cast from restricted __le16

Signed-off-by: Koray Gulcu <koray.gulcu@ozu.edu.tr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: skein: Removes unneeded #define
Eric Rost [Fri, 24 Oct 2014 22:34:37 +0000 (17:34 -0500)]
staging: skein: Removes unneeded #define

Removes unneeded #define SKEIN_PORT_CODE since skein_port.h is
nonexistent.

Signed-off-by: Eric Rost <eric.rost@mybabylon.net>
Reviewed-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: skein: Inlines rotl_64
Eric Rost [Fri, 24 Oct 2014 22:34:13 +0000 (17:34 -0500)]
staging: skein: Inlines rotl_64

Inlines the rotl_64 macro.

Signed-off-by: Eric Rost <eric.rost@mybabylon.net>
Reviewed-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: skein: Adds Loadable Module Support
Eric Rost [Fri, 24 Oct 2014 22:33:41 +0000 (17:33 -0500)]
staging: skein: Adds Loadable Module Support

Adds loadable module support to the Skein Hashing Algorithm driver.

Signed-off-by: Eric Rost <eric.rost@mybabylon.net>
Reviewed-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: skein: Adds CryptoAPI Support
Eric Rost [Fri, 24 Oct 2014 22:33:15 +0000 (17:33 -0500)]
staging: skein: Adds CryptoAPI Support

Adds CryptoAPI support to the Skein Hashing Algorithm driver.

Signed-off-by: Eric Rost <eric.rost@mybabylon.net>
Reviewed-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: skein: Renames skein to skein_base
Eric Rost [Fri, 24 Oct 2014 22:32:53 +0000 (17:32 -0500)]
staging: skein: Renames skein to skein_base

Renames skein.c to skein_base.c and skein.h to skein_base.h in
preparation for naming loadable module skein.ko

Signed-off-by: Eric Rost <eric.rost@mybabylon.net>
Reviewed-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: skein: Collapses threefish module
Eric Rost [Fri, 24 Oct 2014 22:29:34 +0000 (17:29 -0500)]
staging: skein: Collapses threefish module

Collapses threefish module into skein module.

Signed-off-by: Eric Rost <eric.rost@mybabylon.net>
Reviewed-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: Use __init and __exit markers for lifecycle functions
Mariusz Gorski [Sat, 25 Oct 2014 01:30:38 +0000 (03:30 +0200)]
staging: lustre: Use __init and __exit markers for lifecycle functions

Apply __init marker to module's init function and __exit to module's
exit function as they both have no other usage.

Signed-off-by: Mariusz Gorski <marius.gorski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: validate size in ll_setxattr()
Dan Carpenter [Wed, 22 Oct 2014 14:23:07 +0000 (17:23 +0300)]
staging: lustre: validate size in ll_setxattr()

If size is smaller than the lov_user_md struct then we are reading
beyond the end of the buffer.  I guess this is an information leak or it
could cause an Oops if the memory is not mapped.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: validate size in lustre_posix_acl_xattr_filter()
Dan Carpenter [Wed, 22 Oct 2014 08:11:39 +0000 (11:11 +0300)]
staging: lustre: validate size in lustre_posix_acl_xattr_filter()

This is mostly to silence static checker complaints.

In theory the problem here is that if size is in the 1-3 range then we
don't allocate enough memory for the posix_acl_xattr_header struct and
it results in memory corruption.  But in reality kmalloc() return values
are aligned at sizeof(long) so corrupting this small amount of data is
not harmful.

The "size" variable should be type size_t.  The value of size is checked
in setxattr() so we know it is a number between "0 - XATTR_SIZE_MAX".
There is no need to check for negative sizes.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agodrivers: staging: lustre: Fix "spaces required around that '='" errors
Greg Donald [Mon, 20 Oct 2014 16:42:36 +0000 (11:42 -0500)]
drivers: staging: lustre: Fix "spaces required around that '='" errors

Fix checkpatch.pl "spaces required around that '='" errors

Signed-off-by: Greg Donald <gdonald@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agodrivers: staging: lustre: Fix "'foo * bar' should be 'foo *bar'" errors
Greg Donald [Mon, 20 Oct 2014 16:18:12 +0000 (11:18 -0500)]
drivers: staging: lustre: Fix "'foo * bar' should be 'foo *bar'" errors

Fix checkpatch.pl "'foo * bar' should be 'foo *bar'" errors

Signed-off-by: Greg Donald <gdonald@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agodrivers: staging: lustre: Fix 'that open brace { should be on the previous line'...
Greg Donald [Mon, 20 Oct 2014 15:58:13 +0000 (10:58 -0500)]
drivers: staging: lustre: Fix 'that open brace { should be on the previous line' errors

Fix checkpatch.pl 'that open brace { should be on the previous line' errors

Signed-off-by: Greg Donald <gdonald@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agodrivers: staging: lustre: Fix "space prohibited before that close parenthesis ')...
Greg Donald [Mon, 20 Oct 2014 15:27:40 +0000 (10:27 -0500)]
drivers: staging: lustre: Fix "space prohibited before that close parenthesis ')'" errors

Fix checkpatch.pl "space prohibited before that close parenthesis ')'" errors

Signed-off-by: Greg Donald <gdonald@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: silence a static checker warning
Dan Carpenter [Thu, 16 Oct 2014 07:56:25 +0000 (10:56 +0300)]
staging: lustre: silence a static checker warning

Static checkers warn that if  cfs_cpt_table_print() returns an error
other than -EFBIG, then it would lead to a double free.  This is true
but cfs_cpt_table_print() only returns -EFBIG on error so it also won't
happen in real life.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: lustre: ptlrpc: sec.c: Replacing strncat with strlcat to avoid overw...
Rickard Strandqvist [Sun, 12 Oct 2014 15:55:33 +0000 (17:55 +0200)]
staging: lustre: lustre: ptlrpc: sec.c: Replacing strncat with strlcat to avoid overwrite size

Changed from using strncat with strlcat to avoid overwrite the max size.
Take the opportunity to change a snprint to strlcpy.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Acked-by: Chen Gang <gang.chen.5i5j@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: lustre: llite: fix some sparse warnings about userspace pointer
Anh Le [Sun, 12 Oct 2014 09:07:10 +0000 (16:07 +0700)]
Staging: lustre: llite: fix some sparse warnings about userspace pointer

Add __user macro to the function declarations that accept userspace pointers as
arguments.

Signed-off-by: Anh Le <anhlq2110@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging/lustre/quota: Get rid of compat quota code
Oleg Drokin [Sun, 12 Oct 2014 02:46:54 +0000 (22:46 -0400)]
staging/lustre/quota: Get rid of compat quota code

Nobody should be using any fo the old lustre 1.8 era tools
anymore, so drop compatibility with those.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging/lustre: get rid of deprecaed acl mount option code
Oleg Drokin [Sun, 12 Oct 2014 02:46:53 +0000 (22:46 -0400)]
staging/lustre: get rid of deprecaed acl mount option code

This is long since unused code, so get rid of it.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging/lustre/ptlrpc: get rid of lustre 1.8 compatible checksums
Oleg Drokin [Sun, 12 Oct 2014 02:46:52 +0000 (22:46 -0400)]
staging/lustre/ptlrpc: get rid of lustre 1.8 compatible checksums

Old version of lustre (1.8) calculated RPC checksums differently,
but the compat code is no longer important since in-kernel
version of lustre is nto compatible with 1.8 lustre servers
(that are long deprecated too).

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agodrivers/staging: Removed unnecessary check for LUSTRE_VERSION_CODE
Filipe Gonçalves [Sat, 11 Oct 2014 21:33:39 +0000 (22:33 +0100)]
drivers/staging: Removed unnecessary check for LUSTRE_VERSION_CODE

Given that this code is now part of the kernel tree, the #ifdef directive comparing LUSTRE_VERSION_CODE to the kernel version is no longer needed.

As a side effect, this will also remove the sparse error "directive in argument list".

Signed-off-by: Filipe Gonçalves <filipe@codinghighway.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: comedi_test: fix timer lock-up
Ian Abbott [Tue, 28 Oct 2014 13:07:22 +0000 (13:07 +0000)]
staging: comedi: comedi_test: fix timer lock-up

Commit 240512474424 ("staging: comedi: comedi_test: use
comedi_handle_events()") resulted in the timer routine
`waveform_ai_interrupt()` calling `comedi_handle_events()` instead of
`comedi_events()`.  That had the advantage of automatically stopping the
acquisition on overflow/error/end-of-acquisition conditions (by calling
the comedi subdevice's "cancel" handler), but currently results in the
timer routine locking when one of those conditions occur.  This is
because the "cancel" handler `waveform_ai_cancel()` calls
`del_timer_sync()`.

Fix it by adding a bit to the device private data that indicates whether
the acquisition is active or not, and changing the "cancel" handler to
use `del_timer()` instead of `del_timer_sync()`.  The bit is set when
starting the acquisition, cleared when ending the acquisition (in the
"cancel" handler), and tested in the timer routine, which will do
nothing if the acquisition is inactive.  Also, make sure any scheduled
timeout event gets cancelled when the low-level device gets "detached"
from the comedi core by calling `del_timer_sync()` in the "detach"
handler `waveform_detach()`.

Fixes: 240512474424 ("staging: comedi: comedi_test: use comedi_handle_events()")
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: introduce some sample size manipulation functions
Ian Abbott [Thu, 23 Oct 2014 12:47:51 +0000 (13:47 +0100)]
staging: comedi: introduce some sample size manipulation functions

Introduce a few static inline helper functions:

`comedi_bytes_per_sample(s)` is the same as the existing
`bytes_per_sample(s)` and determines the size of a comedi sample in
bytes.  (`bytes_per_sample(s)` will be removed.)

`comedi_sample_shift(s)` determines the log2 of the comedi sample size,
so it can be used in bit-shift operations to multiply or divide by the
sample size.

`comedi_bytes_to_samples(s, nbytes)` converts a number of bytes to a
number of samples (rounding down).

`comedi_samples_to_bytes(s, nsamples)` converts a number of samples to a
number of bytes.

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: addi_apci_1564: remove private data 'mode_select_register'
H Hartley Sweeten [Fri, 24 Oct 2014 17:26:05 +0000 (10:26 -0700)]
staging: comedi: addi_apci_1564: remove private data 'mode_select_register'

This driver currently passes the timer channel as the data[5] element to the
timer (*insn_config) function. This is stored in the private data and use in
the timer (*insn_read) and (*insn_write) functions to read/write the timer.

This is just wrong, comedi passes the channel number in the insn->chanspec.
Use that instead and remove the private data member.

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: addi_apci_1564: board has 3 timers
H Hartley Sweeten [Fri, 24 Oct 2014 17:26:06 +0000 (10:26 -0700)]
staging: comedi: addi_apci_1564: board has 3 timers

According to ADDI-DATA, the APCI-1564 only has 3 timers. There are some
customer specific boards with 4 timers but they use out of tree drivers.

Now that the timer 'channels' are handled correctly in the subdevice
functions, fix the number of timer channels for the subdevice and remove
the code that would access a 4th timer.

Also, remove the unnecessary initialzation of the subdevice 'len_chanlist'.
That member is only used by subdevices that support async commands.

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: addi_apci_1564: remove APCI1564_COUNTER[1234] defines
H Hartley Sweeten [Fri, 24 Oct 2014 17:26:04 +0000 (10:26 -0700)]
staging: comedi: addi_apci_1564: remove APCI1564_COUNTER[1234] defines

These defines don't add any significant clarity to the driver. Remove them.

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: me4000: fix firmware downloading
H Hartley Sweeten [Thu, 23 Oct 2014 19:19:34 +0000 (12:19 -0700)]
staging: comedi: me4000: fix firmware downloading

Convert this driver to use comedi_load_firmware() to download the firmware
to the board.

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: comedi_buf: absorb __comedi_buf_write_alloc()
H Hartley Sweeten [Wed, 22 Oct 2014 22:37:18 +0000 (15:37 -0700)]
staging: comedi: comedi_buf: absorb __comedi_buf_write_alloc()

This function is only called by comedi_buf_write_alloc(). Absorb it and remove
the unused 'strict' parameter.

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: comedi_buf: absorb comedi_write_array_to_buffer()
H Hartley Sweeten [Wed, 22 Oct 2014 22:37:17 +0000 (15:37 -0700)]
staging: comedi: comedi_buf: absorb comedi_write_array_to_buffer()

This function is only called by comedi_buf_write_samples(). Absorb it.

The buffer overflow was already checked so the overflow check of
comedi_buf_write_alloc() can be removed.

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: comedi_buf: don't export comedi_write_array_to_buffer()
H Hartley Sweeten [Wed, 22 Oct 2014 22:37:16 +0000 (15:37 -0700)]
staging: comedi: comedi_buf: don't export comedi_write_array_to_buffer()

All the comedi drivers have been converted to use comedi_buf_write_samples().
This function is now only used internally by comedi_buf. Remvoe the export.

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: comedi_buf: remove comedi_buf_put()
H Hartley Sweeten [Wed, 22 Oct 2014 22:37:15 +0000 (15:37 -0700)]
staging: comedi: comedi_buf: remove comedi_buf_put()

All comedi drivers now use comedi_buf_write_samples() to add the samples to
the async buffer. Remove this unused function.

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: pcmuio: use comedi_buf_write_samples()
H Hartley Sweeten [Wed, 22 Oct 2014 22:37:14 +0000 (15:37 -0700)]
staging: comedi: pcmuio: use comedi_buf_write_samples()

The dev->read_subdev used in this driver for async commands returns 32-bit samples
and should have the SDF_LSAMPL subdev_flag set. It also returns the full scan with
each sample so it should have the SDF_PACKED subdev_flag set.

Add the missing subdev_flags and use comedi_buf_write_samples() to add the sample
to the async buffer.

The COMEDI_CB_BLOCK and COMEDI_CB_EOS events will be automatically handled by the
core. Remove the unnecessary events in the 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: pcmmio: use comedi_buf_write_samples()
H Hartley Sweeten [Wed, 22 Oct 2014 22:37:13 +0000 (15:37 -0700)]
staging: comedi: pcmmio: use comedi_buf_write_samples()

The dev->read_subdev used in this driver for async commands returns 32-bit samples
and should have the SDF_LSAMPL subdev_flag set. It also returns the full scan with
each sample so it should have the SDF_PACKED subdev_flag set.

Add the missing subdev_flags and use comedi_buf_write_samples() to add the sample
to the async buffer.

The COMEDI_CB_BLOCK and COMEDI_CB_EOS events will be automatically handled by the
core. Remove the unnecessary events in the 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: ni_pcidio: use comedi_buf_write_samples()
H Hartley Sweeten [Wed, 22 Oct 2014 22:37:12 +0000 (15:37 -0700)]
staging: comedi: ni_pcidio: use comedi_buf_write_samples()

Use comedi_buf_write_samples() to add the sample to the async buffer. The 32-bit
sample size is automatically determined due to the subddev_flag SDF_LSAMPL.

The async event COMEDI_CB_BLOCK will be automatically set by the core. Remove the
unnecessary event in the driver.

This driver also has the SDF_PACKED subdev_flag set so the core will automatically
set the COMEDI_CB_EOS event after adding the sample.

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: use comedi_buf_write_samples()
H Hartley Sweeten [Wed, 22 Oct 2014 22:37:11 +0000 (15:37 -0700)]
staging: comedi: amplc_dio200_common: use comedi_buf_write_samples()

The dev->read_subdev used in this driver for async commands returns the
full scan with each sample so it should have the SDF_PACKED subdev_flag
set.

Add the missing subdev_flags and use comedi_buf_write_samples() to add
the sample to the async buffer.

The async events will set properly by the core. A dev_warn() message will
also be output by the core if the buffer overflows. Remove the unnecessary
events and dev_err() message in the 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: addi_apci_2032: use comedi_buf_write_samples()
H Hartley Sweeten [Wed, 22 Oct 2014 22:37:10 +0000 (15:37 -0700)]
staging: comedi: addi_apci_2032: use comedi_buf_write_samples()

The dev->read_subdev used in this driver for async commands returns the
full scan with each sample so it should have the SDF_PACKED subdev_flag
set.

Add the missing subdev_flags and use comedi_buf_write_samples() to add
the sample to the async buffer.

The core sets the async events appropriately. Remove the unnecessary
event handling in the 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: hwdrv_apci3120: use comedi_buf_write_samples()
H Hartley Sweeten [Wed, 22 Oct 2014 22:37:08 +0000 (15:37 -0700)]
staging: comedi: hwdrv_apci3120: use comedi_buf_write_samples()

Use comedi_buf_write_samples() to add the samples to the async buffer.

The COMEDI_CB_EOS and COMEDI_CB_OVERFLOW events will be automatically
handled by the core. Remove the unecessary handling in the 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: usbdux: use comedi_buf_write_samples()
H Hartley Sweeten [Wed, 22 Oct 2014 22:37:07 +0000 (15:37 -0700)]
staging: comedi: usbdux: use comedi_buf_write_samples()

Use comedi_buf_write_samples() to add the sample to the async buffer.

The async events COMEDI_CB_BLOCK and COMEDI_CB_EOS will be detected and set
by the core. Remove the unnecessary events in the 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: rtd520: use comedi_buf_write_samples()
H Hartley Sweeten [Wed, 22 Oct 2014 22:37:06 +0000 (15:37 -0700)]
staging: comedi: rtd520: use comedi_buf_write_samples()

For aesthetics, use comedi_buf_write_samples() to add the sample to the
async buffer.

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: quatech_daqp_cs: use comedi_buf_write_samples()
H Hartley Sweeten [Wed, 22 Oct 2014 22:37:05 +0000 (15:37 -0700)]
staging: comedi: quatech_daqp_cs: use comedi_buf_write_samples()

For aesthetics, use comedi_buf_write_samples() to add the sample to the
async buffer.

The core will add the COMEDI_CB_BLOCK event when data is written to the
async buffer. Remove the unnecessary event in the 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: pcl818: use comedi_buf_write_samples()
H Hartley Sweeten [Wed, 22 Oct 2014 22:37:04 +0000 (15:37 -0700)]
staging: comedi: pcl818: use comedi_buf_write_samples()

For aesthetics, use comedi_buf_write_samples() to add the sample to the
async buffer.

The core will add the COMEDI_CB_BLOCK event when data is written to the
async buffer. Remove the unnecessary event in the 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: pcl816: use comedi_buf_write_samples()
H Hartley Sweeten [Wed, 22 Oct 2014 22:37:03 +0000 (15:37 -0700)]
staging: comedi: pcl816: use comedi_buf_write_samples()

For aesthetics, use comedi_buf_write_samples() to add the sample to the
async buffer.

The core will add the COMEDI_CB_BLOCK event when data is written to the
async buffer. Remove the unnecessary event in the 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: pcl812: use comedi_buf_write_samples()
H Hartley Sweeten [Wed, 22 Oct 2014 22:37:02 +0000 (15:37 -0700)]
staging: comedi: pcl812: use comedi_buf_write_samples()

For aesthetics, use comedi_buf_write_samples() to add the sample to the
async buffer.

The core will add the COMEDI_CB_BLOCK event when data is written to the
async buffer. Remove the nnecessary event in the 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: pcl726: use comedi_buf_write_samples()
H Hartley Sweeten [Wed, 22 Oct 2014 22:37:01 +0000 (15:37 -0700)]
staging: comedi: pcl726: use comedi_buf_write_samples()

Use comedi_buf_write_samples() to add the sample to the async buffer.

The async events will set properly by the core. Remove the unnecessary
events in the 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: pcl711: use comedi_buf_write_samples()
H Hartley Sweeten [Wed, 22 Oct 2014 22:37:00 +0000 (15:37 -0700)]
staging: comedi: pcl711: use comedi_buf_write_samples()

Use comedi_buf_write_samples() to add the sample to the async buffer.

The async events will set properly by the core. Remove the unnecessary
events in the 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: ni_atmio16d: use comedi_buf_write_samples()
H Hartley Sweeten [Wed, 22 Oct 2014 22:36:59 +0000 (15:36 -0700)]
staging: comedi: ni_atmio16d: use comedi_buf_write_samples()

For aesthetics, use comedi_buf_write_samples() to add the sample to
the async buffer.

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: ni_65xx: use comedi_buf_write_samples()
H Hartley Sweeten [Wed, 22 Oct 2014 22:36:58 +0000 (15:36 -0700)]
staging: comedi: ni_65xx: use comedi_buf_write_samples()

Use comedi_buf_write_samples() to add the sample to the async buffer.

The async events COMEDI_CB_EOS will automatically be set by the core
with the end-of-scan is detected. Remove the unnecessary event in the
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: ni_6527: use comedi_buf_write_samples()
H Hartley Sweeten [Wed, 22 Oct 2014 22:36:57 +0000 (15:36 -0700)]
staging: comedi: ni_6527: use comedi_buf_write_samples()

Use comedi_buf_write_samples() to add the sample to the async buffer.

The async events COMEDI_CB_EOS will automatically be set by the core
with the end-of-scan is detected. Remove the unnecessary event in the
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>