Skip to content

Commit

Permalink
Merge branch 'for-greg' of git://git.kernel.org/pub/scm/linux/kernel/…
Browse files Browse the repository at this point in the history
…git/ppwaskie/staging into opw
  • Loading branch information
Greg Kroah-Hartman committed Mar 13, 2014
2 parents 46374d3 + 5c7895c commit 4379cad
Show file tree
Hide file tree
Showing 15 changed files with 126 additions and 150 deletions.
8 changes: 4 additions & 4 deletions drivers/staging/comedi/drivers/plx9080.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@

/* descriptor block used for chained dma transfers */
struct plx_dma_desc {
volatile uint32_t pci_start_addr;
volatile uint32_t local_start_addr;
__le32 pci_start_addr;
__le32 local_start_addr;
/* transfer_size is in bytes, only first 23 bits of register are used */
volatile uint32_t transfer_size;
__le32 transfer_size;
/* address of next descriptor (quad word aligned), plus some
* additional bits (see PLX_DMA0_DESCRIPTOR_REG) */
volatile uint32_t next;
__le32 next;
};

/**********************************************************************
Expand Down
3 changes: 2 additions & 1 deletion drivers/staging/crystalhd/bcm_70012_regs.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
#define BRCM_SHIFT(c, r, f) c##_##r##_##f##_SHIFT

#define GET_FIELD(m, c, r, f) \
((((m) & BRCM_MASK(c, r, f)) >> BRCM_SHIFT(c, r, f)) << BRCM_ALIGN(c, r, f))
((((m) & BRCM_MASK(c, r, f)) >> BRCM_SHIFT(c, r, f)) << \
BRCM_ALIGN(c, r, f))

#define SET_FIELD(m, c, r, f, d) \
((m) = (((m) & ~BRCM_MASK(c, r, f)) | ((((d) >> BRCM_ALIGN(c, r, f)) << \
Expand Down
18 changes: 7 additions & 11 deletions drivers/staging/dgnc/dgnc_mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#include <linux/interrupt.h> /* For tasklet and interrupt structs/defines */
#include <linux/serial_reg.h>
#include <linux/termios.h>
#include <asm/uaccess.h> /* For copy_from_user/copy_to_user */
#include <linux/uaccess.h> /* For copy_from_user/copy_to_user */

#include "dgnc_driver.h"
#include "dgnc_pci.h"
Expand Down Expand Up @@ -77,8 +77,7 @@ int dgnc_mgmt_open(struct inode *inode, struct file *file)
return -EBUSY;
}
dgnc_mgmt_in_use[minor]++;
}
else {
} else {
DGNC_UNLOCK(dgnc_global_lock, lock_flags);
return -ENXIO;
}
Expand Down Expand Up @@ -107,9 +106,8 @@ int dgnc_mgmt_close(struct inode *inode, struct file *file)

/* mgmt device */
if (minor < MAXMGMTDEVICES) {
if (dgnc_mgmt_in_use[minor]) {
if (dgnc_mgmt_in_use[minor])
dgnc_mgmt_in_use[minor] = 0;
}
}
DGNC_UNLOCK(dgnc_global_lock, lock_flags);

Expand Down Expand Up @@ -153,7 +151,7 @@ long dgnc_mgmt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
DPR_MGMT(("DIGI_GETDD returning numboards: %d version: %s\n",
ddi.dinfo_nboards, ddi.dinfo_version));

if (copy_to_user(uarg, &ddi, sizeof (ddi)))
if (copy_to_user(uarg, &ddi, sizeof(ddi)))
return -EFAULT;

break;
Expand All @@ -165,9 +163,8 @@ long dgnc_mgmt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)

struct digi_info di;

if (copy_from_user(&brd, uarg, sizeof(int))) {
if (copy_from_user(&brd, uarg, sizeof(int)))
return -EFAULT;
}

DPR_MGMT(("DIGI_GETBD asking about board: %d\n", brd));

Expand Down Expand Up @@ -195,7 +192,7 @@ long dgnc_mgmt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
DPR_MGMT(("DIGI_GETBD returning type: %x state: %x ports: %x size: %x\n",
di.info_bdtype, di.info_bdstate, di.info_nports, di.info_physsize));

if (copy_to_user(uarg, &di, sizeof (di)))
if (copy_to_user(uarg, &di, sizeof(di)))
return -EFAULT;

break;
Expand All @@ -209,9 +206,8 @@ long dgnc_mgmt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
uint board = 0;
uint channel = 0;

if (copy_from_user(&ni, uarg, sizeof(ni))) {
if (copy_from_user(&ni, uarg, sizeof(ni)))
return -EFAULT;
}

DPR_MGMT(("DIGI_GETBD asking about board: %d channel: %d\n",
ni.board, ni.channel));
Expand Down
4 changes: 3 additions & 1 deletion drivers/staging/dgrp/dgrp_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ static ssize_t dgrp_class_pollrate_store(struct device *c,
struct device_attribute *attr,
const char *buf, size_t count)
{
sscanf(buf, "0x%x\n", &dgrp_poll_tick);
if (sscanf(buf, "0x%x\n", &dgrp_poll_tick) != 1)
return -EINVAL;

return count;
}
static DEVICE_ATTR(pollrate, 0600, dgrp_class_pollrate_show,
Expand Down
1 change: 1 addition & 0 deletions drivers/staging/dgrp/dgrp_tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -2798,6 +2798,7 @@ static int dgrp_tty_ioctl(struct tty_struct *tty, unsigned int cmd,
}

/* pretend we didn't recognize this */
/* fall-through */

case DIGI_SETA:
return dgrp_tty_digiseta(tty, (struct digi_struct *) arg);
Expand Down
8 changes: 0 additions & 8 deletions drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,6 @@
#include <linux/etherdevice.h>

#include "dot11d.h"
static u8 rsn_authen_cipher_suite[16][4] = {
{0x00, 0x0F, 0xAC, 0x00}, //Use group key, //Reserved
{0x00, 0x0F, 0xAC, 0x01}, //WEP-40 //RSNA default
{0x00, 0x0F, 0xAC, 0x02}, //TKIP //NONE //{used just as default}
{0x00, 0x0F, 0xAC, 0x03}, //WRAP-historical
{0x00, 0x0F, 0xAC, 0x04}, //CCMP
{0x00, 0x0F, 0xAC, 0x05}, //WEP-104
};

short ieee80211_is_54g(const struct ieee80211_network *net)
{
Expand Down
15 changes: 4 additions & 11 deletions drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,6 @@

#include "dot11d.h"

u8 rsn_authen_cipher_suite[16][4] = {
{0x00,0x0F,0xAC,0x00}, //Use group key, //Reserved
{0x00,0x0F,0xAC,0x01}, //WEP-40 //RSNA default
{0x00,0x0F,0xAC,0x02}, //TKIP //NONE //{used just as default}
{0x00,0x0F,0xAC,0x03}, //WRAP-historical
{0x00,0x0F,0xAC,0x04}, //CCMP
{0x00,0x0F,0xAC,0x05}, //WEP-104
};

short ieee80211_is_54g(const struct ieee80211_network *net)
{
return (net->rates_ex_len > 0) || (net->rates_len > 4);
Expand Down Expand Up @@ -1959,7 +1950,8 @@ ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, struct sk_buff *skb,
struct ieee80211_network network_resp;
struct ieee80211_network *network = &network_resp;

if (0 == (errcode=assoc_parse(ieee,skb, &aid))){
errcode = assoc_parse(ieee, skb, &aid);
if (!errcode) {
ieee->state=IEEE80211_LINKED;
ieee->assoc_id = aid;
ieee->softmac_stats.rx_ass_ok++;
Expand Down Expand Up @@ -2017,7 +2009,8 @@ ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, struct sk_buff *skb,

IEEE80211_DEBUG_MGMT("Received authentication response");

if (0 == (errcode=auth_parse(skb, &challenge, &chlen))){
errcode = auth_parse(skb, &challenge, &chlen);
if (!errcode) {
if(ieee->open_wep || !challenge){
ieee->state = IEEE80211_ASSOCIATING_AUTHENTICATED;
ieee->softmac_stats.rx_auth_rs_ok++;
Expand Down
3 changes: 2 additions & 1 deletion drivers/staging/rtl8192u/r8192U_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1318,7 +1318,8 @@ static void rtl8192_tx_isr(struct urb *tx_urb)
/* Don't send data frame during scanning.*/
if ((skb_queue_len(&priv->ieee80211->skb_waitQ[queue_index]) != 0) &&
(!(priv->ieee80211->queue_stop))) {
if (NULL != (skb = skb_dequeue(&(priv->ieee80211->skb_waitQ[queue_index]))))
skb = skb_dequeue(&(priv->ieee80211->skb_waitQ[queue_index]));
if (skb)
priv->ieee80211->softmac_hard_start_xmit(skb, dev);

return; //modified by david to avoid further processing AMSDU
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/rtl8821ae/rtl8821ae/trx.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include "led.h"
#include "dm.h"

u8 _rtl8821ae_map_hwqueue_to_fwqueue(struct sk_buff *skb, u8 hw_queue)
static u8 _rtl8821ae_map_hwqueue_to_fwqueue(struct sk_buff *skb, u8 hw_queue)
{
u16 fc = rtl_get_fc(skb);

Expand Down
18 changes: 10 additions & 8 deletions drivers/staging/rts5139/xd.c
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,8 @@ static int reset_xd(struct rts51x_chip *chip)
rts51x_add_cmd(chip, WRITE_REG_CMD, XD_DTCTL, 0xFF,
XD_TIME_SETUP_STEP * 3 + XD_TIME_RW_STEP *
(2 + i + chip->option.rts51x_xd_rw_step)
+ XD_TIME_RWN_STEP * (i + chip->option.rts51x_xd_rwn_step));
+ XD_TIME_RWN_STEP *
(i + chip->option.rts51x_xd_rwn_step));
rts51x_add_cmd(chip, WRITE_REG_CMD, XD_CATCTL, 0xFF,
XD_TIME_SETUP_STEP * 3 + XD_TIME_RW_STEP * (4 +
i) + XD_TIME_RWN_STEP * (3 + i));
Expand Down Expand Up @@ -1526,8 +1527,8 @@ static int xd_read_multiple_pages(struct rts51x_chip *chip, u32 phy_blk,
rts51x_add_cmd(chip, WRITE_REG_CMD, XD_CHK_DATA_STATUS,
XD_AUTO_CHK_DATA_STATUS, XD_AUTO_CHK_DATA_STATUS);

rts51x_trans_dma_enable(chip->srb->sc_data_direction, chip, page_cnt * 512,
DMA_512);
rts51x_trans_dma_enable(chip->srb->sc_data_direction, chip,
page_cnt * 512, DMA_512);

rts51x_add_cmd(chip, WRITE_REG_CMD, XD_TRANSFER, 0xFF,
XD_TRANSFER_START | XD_READ_PAGES);
Expand Down Expand Up @@ -1745,8 +1746,8 @@ static int xd_write_multiple_pages(struct rts51x_chip *chip, u32 old_blk,
rts51x_add_cmd(chip, WRITE_REG_CMD, CARD_DATA_SOURCE, 0x01,
RING_BUFFER);

rts51x_trans_dma_enable(chip->srb->sc_data_direction, chip, page_cnt * 512,
DMA_512);
rts51x_trans_dma_enable(chip->srb->sc_data_direction, chip,
page_cnt * 512, DMA_512);

rts51x_add_cmd(chip, WRITE_REG_CMD, XD_TRANSFER, 0xFF,
XD_TRANSFER_START | XD_WRITE_PAGES);
Expand Down Expand Up @@ -1842,8 +1843,8 @@ static int xd_delay_write(struct rts51x_chip *chip)
return STATUS_SUCCESS;
}

int rts51x_xd_rw(struct scsi_cmnd *srb, struct rts51x_chip *chip, u32 start_sector,
u16 sector_cnt)
int rts51x_xd_rw(struct scsi_cmnd *srb, struct rts51x_chip *chip,
u32 start_sector, u16 sector_cnt)
{
struct xd_info *xd_card = &(chip->xd_card);
unsigned int lun = SCSI_LUN(srb);
Expand Down Expand Up @@ -1883,7 +1884,8 @@ int rts51x_xd_rw(struct scsi_cmnd *srb, struct rts51x_chip *chip, u32 start_sect
retval = xd_build_l2p_tbl(chip, zone_no);
if (retval != STATUS_SUCCESS) {
chip->card_fail |= XD_CARD;
rts51x_set_sense_type(chip, lun, SENSE_TYPE_MEDIA_NOT_PRESENT);
rts51x_set_sense_type(chip, lun,
SENSE_TYPE_MEDIA_NOT_PRESENT);
TRACE_RET(chip, retval);
}
}
Expand Down
9 changes: 3 additions & 6 deletions drivers/staging/sbe-2t3e3/maps.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
#include <linux/kernel.h>
#include "2t3e3.h"

const u32 cpld_reg_map[][2] =
{
const u32 cpld_reg_map[][2] = {
{ 0x0000, 0x0080 }, /* 0 - Port Control Register A (PCRA) */
{ 0x0004, 0x0084 }, /* 1 - Port Control Register B (PCRB) */
{ 0x0008, 0x0088 }, /* 2 - LCV Count Register (PLCR) */
Expand All @@ -35,8 +34,7 @@ const u32 cpld_reg_map[][2] =
{ 0x0070, 0x00f0 }, /* 17 - Port Bandwidth Stop (PBWL) */
};

const u32 cpld_val_map[][2] =
{
const u32 cpld_val_map[][2] = {
{ 0x01, 0x02 }, /* LIU1 / LIU2 select for Serial Chip Select */
{ 0x04, 0x08 }, /* DAC1 / DAC2 select for Serial Chip Select */
{ 0x00, 0x04 }, /* LOOP1 / LOOP2 - select of loop timing source */
Expand Down Expand Up @@ -94,8 +92,7 @@ const u32 t3e3_framer_reg_map[] = {
0x81 /* 47 - LINE_INTERFACE_SCAN */
};

const u32 t3e3_liu_reg_map[] =
{
const u32 t3e3_liu_reg_map[] = {
0x00, /* REG0 */
0x01, /* REG1 */
0x02, /* REG2 */
Expand Down
11 changes: 0 additions & 11 deletions drivers/staging/slicoss/slicoss.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,17 +156,6 @@ MODULE_DEVICE_TABLE(pci, slic_pci_tbl);
_adapter->handle_lock.flags); \
}

#define SLIC_FREE_SLIC_HANDLE(_adapter, _pslic_handle) \
{ \
_pslic_handle->type = SLIC_HANDLE_FREE; \
spin_lock_irqsave(&_adapter->handle_lock.lock, \
_adapter->handle_lock.flags); \
_pslic_handle->next = _adapter->pfree_slic_handles; \
_adapter->pfree_slic_handles = _pslic_handle; \
spin_unlock_irqrestore(&_adapter->handle_lock.lock, \
_adapter->handle_lock.flags); \
}

static inline void slic_reg32_write(void __iomem *reg, u32 value, bool flush)
{
writel(value, reg);
Expand Down
3 changes: 2 additions & 1 deletion drivers/staging/vt6656/iwctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1395,7 +1395,8 @@ int iwctl_giwpower(struct net_device *dev, struct iw_request_info *info,
if (pMgmt == NULL)
return -EFAULT;

if ((wrq->disabled = (mode == WMAC_POWER_CAM)))
wrq->disabled = (mode == WMAC_POWER_CAM);
if (wrq->disabled)
return 0;

if ((wrq->flags & IW_POWER_TYPE) == IW_POWER_TIMEOUT) {
Expand Down
3 changes: 2 additions & 1 deletion drivers/staging/wlags49_h2/wl_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1528,7 +1528,8 @@ int wl_put_ltv( struct wl_private *lp )
hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));

/* Own Name (Station Nickname) */
if (( len = ( strlen( lp->StationName ) + 1 ) & ~0x01 ) != 0 ) {
len = (strlen(lp->StationName) + 1) & ~0x01;
if (len != 0) {
//DBG_TRACE( DbgInfo, "CFG_CNF_OWN_NAME : %s\n",
// lp->StationName );

Expand Down
Loading

0 comments on commit 4379cad

Please sign in to comment.