Commit 65ac8c84 authored by Daniel Scheller's avatar Daniel Scheller Committed by Mauro Carvalho Chehab

media: staging/cxd2099: fix remaining checkpatch-strict issues

Fix up all remaining cosmetic issues as reported by checkpatch.pl.
Signed-off-by: default avatarDaniel Scheller <d.scheller@gmx.net>
Signed-off-by: default avatarJasmin Jessich <jasmin@anw.at>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 380a6c86
...@@ -3,23 +3,14 @@ ...@@ -3,23 +3,14 @@
* *
* Copyright (C) 2010-2013 Digital Devices GmbH * Copyright (C) 2010-2013 Digital Devices GmbH
* *
*
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* version 2 only, as published by the Free Software Foundation. * version 2 only, as published by the Free Software Foundation.
* *
*
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA
* Or, point your browser to http://www.gnu.org/copyleft/gpl.html
*/ */
#include <linux/slab.h> #include <linux/slab.h>
...@@ -59,7 +50,7 @@ struct cxd { ...@@ -59,7 +50,7 @@ struct cxd {
int amem_read; int amem_read;
int cammode; int cammode;
struct mutex lock; struct mutex lock; /* device access lock */
u8 rbuf[1028]; u8 rbuf[1028];
u8 wbuf[1028]; u8 wbuf[1028];
...@@ -101,7 +92,7 @@ static int i2c_read_reg(struct i2c_adapter *adapter, u8 adr, ...@@ -101,7 +92,7 @@ static int i2c_read_reg(struct i2c_adapter *adapter, u8 adr,
.buf = val, .len = 1} }; .buf = val, .len = 1} };
if (i2c_transfer(adapter, msgs, 2) != 2) { if (i2c_transfer(adapter, msgs, 2) != 2) {
dev_err(&adapter->dev, "error in i2c_read_reg\n"); dev_err(&adapter->dev, "error in %s()\n", __func__);
return -1; return -1;
} }
return 0; return 0;
...@@ -116,7 +107,7 @@ static int i2c_read(struct i2c_adapter *adapter, u8 adr, ...@@ -116,7 +107,7 @@ static int i2c_read(struct i2c_adapter *adapter, u8 adr,
.buf = data, .len = n} }; .buf = data, .len = n} };
if (i2c_transfer(adapter, msgs, 2) != 2) { if (i2c_transfer(adapter, msgs, 2) != 2) {
dev_err(&adapter->dev, "error in i2c_read\n"); dev_err(&adapter->dev, "error in %s()\n", __func__);
return -1; return -1;
} }
return 0; return 0;
...@@ -134,7 +125,7 @@ static int read_block(struct cxd *ci, u8 adr, u8 *data, u16 n) ...@@ -134,7 +125,7 @@ static int read_block(struct cxd *ci, u8 adr, u8 *data, u16 n)
while (n) { while (n) {
int len = n; int len = n;
if (ci->cfg.max_i2c && (len > ci->cfg.max_i2c)) if (ci->cfg.max_i2c && len > ci->cfg.max_i2c)
len = ci->cfg.max_i2c; len = ci->cfg.max_i2c;
status = i2c_read(ci->i2c, ci->cfg.adr, 1, data, len); status = i2c_read(ci->i2c, ci->cfg.adr, 1, data, len);
if (status) if (status)
...@@ -591,7 +582,7 @@ static int campoll(struct cxd *ci) ...@@ -591,7 +582,7 @@ static int campoll(struct cxd *ci)
} }
} }
if ((istat & 8) && if ((istat & 8) &&
(ci->slot_stat == DVB_CA_EN50221_POLL_CAM_PRESENT)) { ci->slot_stat == DVB_CA_EN50221_POLL_CAM_PRESENT) {
ci->ready = 1; ci->ready = 1;
ci->slot_stat |= DVB_CA_EN50221_POLL_CAM_READY; ci->slot_stat |= DVB_CA_EN50221_POLL_CAM_READY;
} }
......
...@@ -3,23 +3,14 @@ ...@@ -3,23 +3,14 @@
* *
* Copyright (C) 2010-2011 Digital Devices GmbH * Copyright (C) 2010-2011 Digital Devices GmbH
* *
*
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* version 2 only, as published by the Free Software Foundation. * version 2 only, as published by the Free Software Foundation.
* *
*
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA
* Or, point your browser to http://www.gnu.org/copyleft/gpl.html
*/ */
#ifndef _CXD2099_H_ #ifndef _CXD2099_H_
...@@ -42,8 +33,9 @@ struct dvb_ca_en50221 *cxd2099_attach(struct cxd2099_cfg *cfg, ...@@ -42,8 +33,9 @@ struct dvb_ca_en50221 *cxd2099_attach(struct cxd2099_cfg *cfg,
void *priv, struct i2c_adapter *i2c); void *priv, struct i2c_adapter *i2c);
#else #else
static inline struct dvb_ca_en50221 *cxd2099_attach(struct cxd2099_cfg *cfg, static inline struct
void *priv, struct i2c_adapter *i2c) dvb_ca_en50221 *cxd2099_attach(struct cxd2099_cfg *cfg, void *priv,
struct i2c_adapter *i2c)
{ {
dev_warn(&i2c->dev, "%s: driver disabled by Kconfig\n", __func__); dev_warn(&i2c->dev, "%s: driver disabled by Kconfig\n", __func__);
return NULL; return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment