summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>2016-04-30 22:33:03 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-05-01 14:33:34 -0700
commit360a63c850e61f4415036ade414479c4ad204764 (patch)
tree116dfd9b206ff1c7905e05a47972f5d8d7ba8354 /drivers
parent2c78f701a4bb61ec3495cccf445ef9282e115927 (diff)
downloadlinux-360a63c850e61f4415036ade414479c4ad204764.tar.gz
linux-360a63c850e61f4415036ade414479c4ad204764.tar.bz2
linux-360a63c850e61f4415036ade414479c4ad204764.zip
staging: i4l: act2000: do not assign in if
It is not the kernel coding style to assign values to some variable in if statement. Split them up into different statements. Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/i4l/act2000/act2000_isa.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/staging/i4l/act2000/act2000_isa.c b/drivers/staging/i4l/act2000/act2000_isa.c
index 34c0a9ab0810..048507e9b9a8 100644
--- a/drivers/staging/i4l/act2000/act2000_isa.c
+++ b/drivers/staging/i4l/act2000/act2000_isa.c
@@ -31,7 +31,8 @@ act2000_isa_reset(unsigned short portbase)
int serial = 0;
found = 0;
- if ((reg = inb(portbase + ISA_COR)) != 0xff) {
+ reg = inb(portbase + ISA_COR);
+ if (reg != 0xff) {
outb(reg | ISA_COR_RESET, portbase + ISA_COR);
mdelay(10);
outb(reg, portbase + ISA_COR);
@@ -303,7 +304,8 @@ act2000_isa_send(act2000_card *card)
while (1) {
spin_lock_irqsave(&card->lock, flags);
if (!(card->sbuf)) {
- if ((card->sbuf = skb_dequeue(&card->sndq))) {
+ card->sbuf = skb_dequeue(&card->sndq);
+ if (card->sbuf) {
card->ack_msg = card->sbuf->data;
msg = (actcapi_msg *)card->sbuf->data;
if ((msg->hdr.cmd.cmd == 0x86) &&
@@ -378,7 +380,8 @@ act2000_isa_getid(act2000_card *card)
printk(KERN_WARNING "act2000: Wrong Firmware-ID!\n");
return -EPROTO;
}
- if ((p = strchr(fid.revision, '\n')))
+ p = strchr(fid.revision, '\n');
+ if (p)
*p = '\0';
printk(KERN_INFO "act2000: Firmware-ID: %s\n", fid.revision);
if (card->flags & ACT2000_FLAGS_IVALID) {