dect
/
linux-2.6
Archived
13
0
Fork 0

Staging: Merge two branches of coding style fixes together

Turns out that multiple people sent pretty much the same patch
for the same staging drivers.  Commit these in two different
branches and merge them together to get a more complete coverage
of the cleanup and properly credit everyone for the work that they
did.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Greg Kroah-Hartman 2010-03-04 08:14:54 -08:00
commit b02957d58a
16 changed files with 149 additions and 123 deletions

View File

@ -63,7 +63,7 @@ module_param(comedi_debug, int, 0644);
int comedi_autoconfig = 1;
module_param(comedi_autoconfig, bool, 0444);
int comedi_num_legacy_minors = 0;
int comedi_num_legacy_minors;
module_param(comedi_num_legacy_minors, int, 0444);
static DEFINE_SPINLOCK(comedi_file_info_table_lock);

View File

@ -54,7 +54,6 @@ enum ni_660x_constants {
#define NUM_PFI_CHANNELS 40
/* really there are only up to 3 dma channels, but the register layout allows
for 4 */
#define MAX_DMA_CHANNEL 4
/* See Register-Level Programmer Manual page 3.1 */
@ -1082,8 +1081,7 @@ static int ni_660x_attach(struct comedi_device *dev,
output enables in stc dio control reg */
ni_660x_write_register(dev, 0, 0, STCDIOControl);
private(dev)->counter_dev
= ni_gpct_device_construct(dev,
private(dev)->counter_dev = ni_gpct_device_construct(dev,
&ni_gpct_write_register,
&ni_gpct_read_register,
ni_gpct_variant_660x,

View File

@ -628,9 +628,11 @@ int labpc_common_attach(struct comedi_device *dev, unsigned long iobase,
/* analog output */
s = dev->subdevices + 1;
if (thisboard->has_ao) {
/* Could provide command support, except it only has a
/*
* Could provide command support, except it only has a
* one sample hardware buffer for analog output and no
* underrun flag. */
* underrun flag.
*/
s->type = COMEDI_SUBD_AO;
s->subdev_flags = SDF_READABLE | SDF_WRITABLE | SDF_GROUND;
s->n_chan = NUM_AO_CHAN;
@ -1149,6 +1151,7 @@ static int labpc_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
/* initialize software conversion count */
if (cmd->stop_src == TRIG_COUNT)
devpriv->count = cmd->stop_arg * cmd->chanlist_len;
/* setup hardware conversion counter */
if (cmd->stop_src == TRIG_EXT) {
/* load counter a1 with count of 3 (pc+ manual says this is minimum allowed) using mode 0 */
@ -1403,7 +1406,10 @@ static irqreturn_t labpc_interrupt(int irq, void *d)
}
if (devpriv->current_transfer == isa_dma_transfer) {
/* if a dma terminal count of external stop trigger has occurred */
/*
* if a dma terminal count of external stop trigger
* has occurred
*/
if (devpriv->status1_bits & DMATC_BIT ||
(thisboard->register_layout == labpc_1200_layout
&& devpriv->status2_bits & A1_TC_BIT)) {
@ -1523,6 +1529,7 @@ static void labpc_drain_dma(struct comedi_device *dev)
/* write data to comedi buffer */
for (i = 0; i < num_points; i++)
cfc_write_to_buffer(s, devpriv->dma_buffer[i]);
if (async->cmd.stop_src == TRIG_COUNT)
devpriv->count -= num_points;

View File

@ -134,7 +134,7 @@ static int pcmad_attach(struct comedi_device *dev, struct comedi_devconfig *it)
unsigned long iobase;
iobase = it->options[0];
printk(KERN_NOTICE "comedi%d: pcmad: 0x%04lx ", dev->minor, iobase);
printk(KERN_INFO "comedi%d: pcmad: 0x%04lx ", dev->minor, iobase);
if (!request_region(iobase, PCMAD_SIZE, "pcmad")) {
printk(KERN_CONT "I/O port conflict\n");
return -EIO;
@ -166,10 +166,11 @@ static int pcmad_attach(struct comedi_device *dev, struct comedi_devconfig *it)
static int pcmad_detach(struct comedi_device *dev)
{
printk(KERN_NOTICE "comedi%d: pcmad: remove\n", dev->minor);
printk(KERN_INFO "comedi%d: pcmad: remove\n", dev->minor);
if (dev->irq)
free_irq(dev->irq, dev);
if (dev->iobase)
release_region(dev->iobase, PCMAD_SIZE);

View File

@ -128,15 +128,15 @@ static int poc_attach(struct comedi_device *dev, struct comedi_devconfig *it)
dev->board_name = this_board->name;
if (iobase == 0) {
printk(KERN_WARNING "io base address required\n");
printk(KERN_ERR "io base address required\n");
return -EINVAL;
}
iosize = this_board->iosize;
/* check if io addresses are available */
if (!request_region(iobase, iosize, "dac02")) {
printk(KERN_WARNING "I/O port conflict: failed to allocate "
"ports 0x%lx to 0x%lx\n", iobase, iobase + iosize - 1);
printk(KERN_ERR "I/O port conflict: failed to allocate ports "
"0x%lx to 0x%lx\n", iobase, iobase + iosize - 1);
return -EIO;
}
dev->iobase = iobase;

View File

@ -2,7 +2,7 @@
* Copyright (C) 2008-2009 QUALCOMM Incorporated.
*/
/* FIXME: most allocations need not be GFP_ATOMIC
/* FIXME: most allocations need not be GFP_ATOMIC */
/* FIXME: management of mutexes */
/* FIXME: msm_pmem_region_lookup return values */
/* FIXME: way too many copy to/from user */
@ -1619,7 +1619,8 @@ static int msm_release_control(struct inode *node, struct file *filep)
int rc;
struct msm_control_device *ctrl_pmsm = filep->private_data;
struct msm_device *pmsm = ctrl_pmsm->pmsm;
printk(KERN_INFO "msm_camera: RELEASE %s\n", filep->f_path.dentry->d_name.name);
printk(KERN_INFO "msm_camera: RELEASE %s\n",
filep->f_path.dentry->d_name.name);
rc = __msm_release(pmsm->sync);
if (!rc) {
MSM_DRAIN_QUEUE(&ctrl_pmsm->ctrl_q, ctrl_status_q);
@ -1633,7 +1634,8 @@ static int msm_release_frame(struct inode *node, struct file *filep)
{
int rc;
struct msm_device *pmsm = filep->private_data;
printk(KERN_INFO "msm_camera: RELEASE %s\n", filep->f_path.dentry->d_name.name);
printk(KERN_INFO "msm_camera: RELEASE %s\n",
filep->f_path.dentry->d_name.name);
rc = __msm_release(pmsm->sync);
if (!rc) {
MSM_DRAIN_QUEUE(pmsm->sync, prev_frame_q);

View File

@ -743,13 +743,11 @@ static int s5k3e2fx_sensor_open_init(const struct msm_camera_sensor_info *data)
}
/* initialize AF */
rc = s5k3e2fx_i2c_write_b(s5k3e2fx_client->addr,
0x3146, 0x3A)
rc = s5k3e2fx_i2c_write_b(s5k3e2fx_client->addr, 0x3146, 0x3A);
if (rc < 0)
goto init_fail1;
rc = s5k3e2fx_i2c_write_b(s5k3e2fx_client->addr,
0x3130, 0x03)
rc = s5k3e2fx_i2c_write_b(s5k3e2fx_client->addr, 0x3130, 0x03);
if (rc < 0)
goto init_fail1;

View File

@ -135,12 +135,21 @@
#define HFA384x_DLSTATE_FLASHENABLED 2
/*--- Register Field Masks --------------------------*/
#define HFA384x_CMD_AINFO ((u16)(BIT(14) | BIT(13) | BIT(12) | BIT(11) | BIT(10) | BIT(9) | BIT(8)))
#define HFA384x_CMD_MACPORT ((u16)(BIT(10) | BIT(9) | BIT(8)))
#define HFA384x_CMD_AINFO ((u16)(BIT(14) | BIT(13) \
| BIT(12) | BIT(11) \
| BIT(10) | BIT(9) \
| BIT(8)))
#define HFA384x_CMD_MACPORT ((u16)(BIT(10) | BIT(9) | \
BIT(8)))
#define HFA384x_CMD_PROGMODE ((u16)(BIT(9) | BIT(8)))
#define HFA384x_CMD_CMDCODE ((u16)(BIT(5) | BIT(4) | BIT(3) | BIT(2) | BIT(1) | BIT(0)))
#define HFA384x_CMD_CMDCODE ((u16)(BIT(5) | BIT(4) | \
BIT(3) | BIT(2) | \
BIT(1) | BIT(0)))
#define HFA384x_STATUS_RESULT ((u16)(BIT(14) | BIT(13) | BIT(12) | BIT(11) | BIT(10) | BIT(9) | BIT(8)))
#define HFA384x_STATUS_RESULT ((u16)(BIT(14) | BIT(13) \
| BIT(12) | BIT(11) \
| BIT(10) | BIT(9) \
| BIT(8)))
/*--- Command Code Constants --------------------------*/
/*--- Controller Commands --------------------------*/
@ -244,8 +253,10 @@ Information RID Lengths: MAC Information
This is the length of JUST the DATA part of the RID (does not
include the len or code fields)
--------------------------------------------------------------------*/
#define HFA384x_RID_DBMCOMMSQUALITY_LEN ((u16)sizeof(hfa384x_dbmcommsquality_t))
#define HFA384x_RID_JOINREQUEST_LEN ((u16)sizeof(hfa384x_JoinRequest_data_t))
#define HFA384x_RID_DBMCOMMSQUALITY_LEN \
((u16) sizeof(hfa384x_dbmcommsquality_t))
#define HFA384x_RID_JOINREQUEST_LEN \
((u16)sizeof(hfa384x_JoinRequest_data_t))
/*--------------------------------------------------------------------
Information RIDs: Modem Information
@ -323,8 +334,10 @@ PD Record codes
/*--- Register Test/Get/Set Field macros ------------------------*/
#define HFA384x_CMD_AINFO_SET(value) ((u16)((u16)(value) << 8))
#define HFA384x_CMD_MACPORT_SET(value) ((u16)HFA384x_CMD_AINFO_SET(value))
#define HFA384x_CMD_PROGMODE_SET(value) ((u16)HFA384x_CMD_AINFO_SET((u16)value))
#define HFA384x_CMD_MACPORT_SET(value) \
((u16)HFA384x_CMD_AINFO_SET(value))
#define HFA384x_CMD_PROGMODE_SET(value) \
((u16)HFA384x_CMD_AINFO_SET((u16)value))
#define HFA384x_CMD_CMDCODE_SET(value) ((u16)(value))
#define HFA384x_STATUS_RESULT_SET(value) (((u16)(value)) << 8)
@ -479,7 +492,8 @@ Communication Frames: Field Masks for Transmit Frames
#define HFA384x_TXSTATUS_AGEDERR ((u16)BIT(1))
#define HFA384x_TXSTATUS_RETRYERR ((u16)BIT(0))
/*-- Transmit Control Field --*/
#define HFA384x_TX_MACPORT ((u16)(BIT(10) | BIT(9) | BIT(8)))
#define HFA384x_TX_MACPORT ((u16)(BIT(10) | \
BIT(9) | BIT(8)))
#define HFA384x_TX_STRUCTYPE ((u16)(BIT(4) | BIT(3)))
#define HFA384x_TX_TXEX ((u16)BIT(2))
#define HFA384x_TX_TXOK ((u16)BIT(1))
@ -496,7 +510,8 @@ Communication Frames: Test/Get/Set Field Values for Transmit Frames
#define HFA384x_TX_SET(v, m, s) ((((u16)(v))<<((u16)(s)))&((u16)(m)))
#define HFA384x_TX_MACPORT_SET(v) HFA384x_TX_SET(v, HFA384x_TX_MACPORT, 8)
#define HFA384x_TX_STRUCTYPE_SET(v) HFA384x_TX_SET(v, HFA384x_TX_STRUCTYPE, 3)
#define HFA384x_TX_STRUCTYPE_SET(v) HFA384x_TX_SET(v, \
HFA384x_TX_STRUCTYPE, 3)
#define HFA384x_TX_TXEX_SET(v) HFA384x_TX_SET(v, HFA384x_TX_TXEX, 2)
#define HFA384x_TX_TXOK_SET(v) HFA384x_TX_SET(v, HFA384x_TX_TXOK, 1)
/*--------------------------------------------------------------------
@ -534,13 +549,17 @@ Communication Frames: Field Masks for Receive Frames
--------------------------------------------------------------------*/
/*-- Status Fields --*/
#define HFA384x_RXSTATUS_MACPORT ((u16)(BIT(10) | BIT(9) | BIT(8)))
#define HFA384x_RXSTATUS_MACPORT ((u16)(BIT(10) | \
BIT(9) | \
BIT(8)))
#define HFA384x_RXSTATUS_FCSERR ((u16)BIT(0))
/*--------------------------------------------------------------------
Communication Frames: Test/Get/Set Field Values for Receive Frames
--------------------------------------------------------------------*/
#define HFA384x_RXSTATUS_MACPORT_GET(value) ((u16)((((u16)(value)) & HFA384x_RXSTATUS_MACPORT) >> 8))
#define HFA384x_RXSTATUS_ISFCSERR(value) ((u16)(((u16)(value)) & HFA384x_RXSTATUS_FCSERR))
#define HFA384x_RXSTATUS_MACPORT_GET(value) ((u16)((((u16)(value)) \
& HFA384x_RXSTATUS_MACPORT) >> 8))
#define HFA384x_RXSTATUS_ISFCSERR(value) ((u16)(((u16)(value)) \
& HFA384x_RXSTATUS_FCSERR))
/*--------------------------------------------------------------------
FRAME STRUCTURES: Information Types and Information Frame Structures
----------------------------------------------------------------------
@ -1294,10 +1313,23 @@ typedef struct hfa384x {
hfa384x_caplevel_t cap_sup_ap;
/* Actor compatibility ranges */
hfa384x_caplevel_t cap_act_pri_cfi; /* pri f/w to controller interface */
hfa384x_caplevel_t cap_act_sta_cfi; /* sta f/w to controller interface */
hfa384x_caplevel_t cap_act_pri_cfi; /*
* pri f/w to controller
* interface
*/
hfa384x_caplevel_t cap_act_sta_cfi; /*
* sta f/w to controller
* interface
*/
hfa384x_caplevel_t cap_act_sta_mfi; /* sta f/w to modem interface */
hfa384x_caplevel_t cap_act_ap_cfi; /* ap f/w to controller interface */
hfa384x_caplevel_t cap_act_ap_cfi; /*
* ap f/w to controller
* interface
*/
hfa384x_caplevel_t cap_act_ap_mfi; /* ap f/w to modem interface */
u32 psusercount; /* Power save user count. */

View File

@ -118,10 +118,10 @@
#include <linux/wireless.h>
#include <linux/netdevice.h>
#include <linux/timer.h>
#include <asm/io.h>
#include <linux/io.h>
#include <linux/delay.h>
#include <asm/byteorder.h>
#include <asm/bitops.h>
#include <linux/bitops.h>
#include <linux/list.h>
#include <linux/usb.h>
#include <linux/byteorder/generic.h>
@ -1909,22 +1909,19 @@ int hfa384x_drvr_flashdl_enable(hfa384x_t *hw)
return -EINVAL;
/* Retrieve the buffer loc&size and timeout */
result = hfa384x_drvr_getconfig(hw, HFA384x_RID_DOWNLOADBUFFER,
&(hw->bufinfo), sizeof(hw->bufinfo));
if (result) {
if (result)
return result;
}
hw->bufinfo.page = le16_to_cpu(hw->bufinfo.page);
hw->bufinfo.offset = le16_to_cpu(hw->bufinfo.offset);
hw->bufinfo.len = le16_to_cpu(hw->bufinfo.len);
result = hfa384x_drvr_getconfig16(hw, HFA384x_RID_MAXLOADTIME,
&(hw->dltimeout));
if (result) {
if (result)
return result;
}
hw->dltimeout = le16_to_cpu(hw->dltimeout);
pr_debug("flashdl_enable\n");
@ -3075,9 +3072,7 @@ static void hfa384x_usbctlxq_run(hfa384x_t *hw)
hfa384x_ctlxout_callback, hw);
hw->ctlx_urb.transfer_flags |= USB_QUEUE_BULK;
/* Now submit the URB and update the CTLX's state
*/
/* Now submit the URB and update the CTLX's state */
result = SUBMIT_URB(&hw->ctlx_urb, GFP_ATOMIC);
if (result == 0) {
/* This CTLX is now running on the active queue */
@ -3878,10 +3873,9 @@ retry:
delresp:
if (delete_resptimer) {
timer_ok = del_timer(&hw->resptimer);
if (timer_ok != 0) {
if (timer_ok != 0)
hw->resp_timer_done = 1;
}
}
spin_unlock_irqrestore(&hw->ctlxq.lock, flags);

View File

@ -208,8 +208,7 @@ int skb_ether_to_p80211(wlandevice_t *wlandev, u32 ethconv,
p80211_wep->data = kmalloc(skb->len, GFP_ATOMIC);
foo = wep_encrypt(wlandev, skb->data, p80211_wep->data,
skb->len,
(wlandev->hostwep &
HOSTWEP_DEFAULTKEY_MASK),
(wlandev->hostwep &HOSTWEP_DEFAULTKEY_MASK),
p80211_wep->iv, p80211_wep->icv);
if (foo) {
printk(KERN_WARNING

View File

@ -190,9 +190,9 @@
(P80211DID_MKSECTION(2) | \
P80211DID_MKGROUP(1))
#define DIDmib_dot11mac_dot11OperationTable_dot11MACAddress \
((P80211DID_MKSECTION(2) | \
(P80211DID_MKSECTION(2) | \
P80211DID_MKGROUP(1) | \
P80211DID_MKITEM(1) | 0x18000000))
P80211DID_MKITEM(1) | 0x18000000)
#define DIDmib_dot11mac_dot11OperationTable_dot11RTSThreshold \
(P80211DID_MKSECTION(2) | \
P80211DID_MKGROUP(1) | \

View File

@ -46,8 +46,8 @@
#include <linux/wireless.h>
#include <net/iw_handler.h>
#include <linux/if_arp.h>
#include <asm/bitops.h>
#include <asm/uaccess.h>
#include <linux/bitops.h>
#include <linux/uaccess.h>
#include <asm/byteorder.h>
#include <linux/if_ether.h>
#include <linux/bitops.h>
@ -555,13 +555,12 @@ static int p80211wext_siwencode(netdevice_t *dev,
/* Check the Key index first. */
i = (erq->flags & IW_ENCODE_INDEX);
if (i) {
if ((i < 1) || (i > NUM_WEPKEYS)) {
err = -EINVAL;
goto exit;
} else
} else {
i--;
}
/* Set current key number only if no keys are given */
if (erq->flags & IW_ENCODE_NOKEY) {
result =

View File

@ -67,7 +67,7 @@
#include <linux/wireless.h>
#include <linux/netdevice.h>
#include <linux/delay.h>
#include <asm/io.h>
#include <linux/io.h>
#include <asm/byteorder.h>
#include <linux/random.h>
#include <linux/usb.h>
@ -1157,9 +1157,7 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp)
/* Save macport 0 state */
result = hfa384x_drvr_getconfig16(hw,
HFA384x_RID_CNFPORTTYPE,
&
(hw->
presniff_port_type));
&(hw->presniff_port_type));
if (result) {
pr_debug
("failed to read porttype, result=%d\n",
@ -1169,9 +1167,7 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp)
/* Save the wepflags state */
result = hfa384x_drvr_getconfig16(hw,
HFA384x_RID_CNFWEPFLAGS,
&
(hw->
presniff_wepflags));
&(hw->presniff_wepflags));
if (result) {
pr_debug
("failed to read wepflags, result=%d\n",

View File

@ -64,7 +64,7 @@
#include <linux/byteorder/generic.h>
#include <linux/ctype.h>
#include <asm/io.h>
#include <linux/io.h>
#include <linux/delay.h>
#include <asm/byteorder.h>
#include <linux/if_arp.h>