Commit 13b51648 authored by Jasmin Jessich's avatar Jasmin Jessich Committed by Mauro Carvalho Chehab

media: dvb_ca_en50221: Fixed style issues on the whole file

- Running "checkpatch.pl -strict -f ..." gave more checks to fix.
  * Blank lines aren't necessary after an open brace '{'
  * Comparison to NULL written as "!<var>"
  * CHECK: Blank lines aren't necessary before a close brace '}'
Signed-off-by: default avatarJasmin Jessich <jasmin@anw.at>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent dc32f324
...@@ -89,7 +89,6 @@ MODULE_PARM_DESC(cam_debug, "enable verbose debug messages"); ...@@ -89,7 +89,6 @@ MODULE_PARM_DESC(cam_debug, "enable verbose debug messages");
/* Information on a CA slot */ /* Information on a CA slot */
struct dvb_ca_slot { struct dvb_ca_slot {
/* current state of the CAM */ /* current state of the CAM */
int slot_state; int slot_state;
...@@ -548,7 +547,7 @@ static int dvb_ca_en50221_parse_attributes(struct dvb_ca_private *ca, int slot) ...@@ -548,7 +547,7 @@ static int dvb_ca_en50221_parse_attributes(struct dvb_ca_private *ca, int slot)
/* check it contains the correct DVB string */ /* check it contains the correct DVB string */
dvb_str = findstr((char *)tuple, tuple_length, "DVB_CI_V", 8); dvb_str = findstr((char *)tuple, tuple_length, "DVB_CI_V", 8);
if (dvb_str == NULL) if (!dvb_str)
return -EINVAL; return -EINVAL;
if (tuple_length < ((dvb_str - (char *)tuple) + 12)) if (tuple_length < ((dvb_str - (char *)tuple) + 12))
return -EINVAL; return -EINVAL;
...@@ -640,7 +639,6 @@ static int dvb_ca_en50221_set_configoption(struct dvb_ca_private *ca, int slot) ...@@ -640,7 +639,6 @@ static int dvb_ca_en50221_set_configoption(struct dvb_ca_private *ca, int slot)
/* fine! */ /* fine! */
return 0; return 0;
} }
...@@ -670,7 +668,7 @@ static int dvb_ca_en50221_read_data(struct dvb_ca_private *ca, int slot, ...@@ -670,7 +668,7 @@ static int dvb_ca_en50221_read_data(struct dvb_ca_private *ca, int slot,
dprintk("%s\n", __func__); dprintk("%s\n", __func__);
/* check if we have space for a link buf in the rx_buffer */ /* check if we have space for a link buf in the rx_buffer */
if (ebuf == NULL) { if (!ebuf) {
int buf_free; int buf_free;
if (!sl->rx_buffer.data) { if (!sl->rx_buffer.data) {
...@@ -688,7 +686,7 @@ static int dvb_ca_en50221_read_data(struct dvb_ca_private *ca, int slot, ...@@ -688,7 +686,7 @@ static int dvb_ca_en50221_read_data(struct dvb_ca_private *ca, int slot,
if (ca->pub->read_data && if (ca->pub->read_data &&
(sl->slot_state != DVB_CA_SLOTSTATE_LINKINIT)) { (sl->slot_state != DVB_CA_SLOTSTATE_LINKINIT)) {
if (ebuf == NULL) if (!ebuf)
status = ca->pub->read_data(ca->pub, slot, buf, status = ca->pub->read_data(ca->pub, slot, buf,
sizeof(buf)); sizeof(buf));
else else
...@@ -699,7 +697,6 @@ static int dvb_ca_en50221_read_data(struct dvb_ca_private *ca, int slot, ...@@ -699,7 +697,6 @@ static int dvb_ca_en50221_read_data(struct dvb_ca_private *ca, int slot,
if (status == 0) if (status == 0)
goto exit; goto exit;
} else { } else {
/* check if there is data available */ /* check if there is data available */
status = ca->pub->read_cam_control(ca->pub, slot, status = ca->pub->read_cam_control(ca->pub, slot,
CTRLIF_STATUS); CTRLIF_STATUS);
...@@ -724,7 +721,7 @@ static int dvb_ca_en50221_read_data(struct dvb_ca_private *ca, int slot, ...@@ -724,7 +721,7 @@ static int dvb_ca_en50221_read_data(struct dvb_ca_private *ca, int slot,
bytes_read |= status; bytes_read |= status;
/* check it will fit */ /* check it will fit */
if (ebuf == NULL) { if (!ebuf) {
if (bytes_read > sl->link_buf_size) { if (bytes_read > sl->link_buf_size) {
pr_err("dvb_ca adapter %d: CAM tried to send a buffer larger than the link buffer size (%i > %i)!\n", pr_err("dvb_ca adapter %d: CAM tried to send a buffer larger than the link buffer size (%i > %i)!\n",
ca->dvbdev->adapter->num, bytes_read, ca->dvbdev->adapter->num, bytes_read,
...@@ -777,7 +774,7 @@ static int dvb_ca_en50221_read_data(struct dvb_ca_private *ca, int slot, ...@@ -777,7 +774,7 @@ static int dvb_ca_en50221_read_data(struct dvb_ca_private *ca, int slot,
* OK, add it to the receive buffer, or copy into external buffer if * OK, add it to the receive buffer, or copy into external buffer if
* supplied * supplied
*/ */
if (ebuf == NULL) { if (!ebuf) {
if (!sl->rx_buffer.data) { if (!sl->rx_buffer.data) {
status = -EIO; status = -EIO;
goto exit; goto exit;
...@@ -1052,7 +1049,6 @@ EXPORT_SYMBOL(dvb_ca_en50221_frda_irq); ...@@ -1052,7 +1049,6 @@ EXPORT_SYMBOL(dvb_ca_en50221_frda_irq);
*/ */
static void dvb_ca_en50221_thread_wakeup(struct dvb_ca_private *ca) static void dvb_ca_en50221_thread_wakeup(struct dvb_ca_private *ca)
{ {
dprintk("%s\n", __func__); dprintk("%s\n", __func__);
ca->wakeup = 1; ca->wakeup = 1;
...@@ -1662,7 +1658,6 @@ static ssize_t dvb_ca_en50221_io_read(struct file *file, char __user *buf, ...@@ -1662,7 +1658,6 @@ static ssize_t dvb_ca_en50221_io_read(struct file *file, char __user *buf,
/* wait for some data */ /* wait for some data */
status = dvb_ca_en50221_io_read_condition(ca, &result, &slot); status = dvb_ca_en50221_io_read_condition(ca, &result, &slot);
if (status == 0) { if (status == 0) {
/* if we're in nonblocking mode, exit immediately */ /* if we're in nonblocking mode, exit immediately */
if (file->f_flags & O_NONBLOCK) if (file->f_flags & O_NONBLOCK)
return -EWOULDBLOCK; return -EWOULDBLOCK;
......
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