Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7bd8cc8f authored by Jasmin Jessich's avatar Jasmin Jessich Committed by Mauro Carvalho Chehab
Browse files

media: dvb_ca_en50221: Removed useless braces



Fixed all:
  WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: default avatarJasmin Jessich <jasmin@anw.at>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent fbabbddd
Loading
Loading
Loading
Loading
+12 −18
Original line number Original line Diff line number Diff line
@@ -242,9 +242,8 @@ static int dvb_ca_en50221_check_camstatus(struct dvb_ca_private *ca, int slot)
	int cam_changed;
	int cam_changed;


	/* IRQ mode */
	/* IRQ mode */
	if (ca->flags & DVB_CA_EN50221_FLAG_IRQ_CAMCHANGE) {
	if (ca->flags & DVB_CA_EN50221_FLAG_IRQ_CAMCHANGE)
		return (atomic_read(&sl->camchange_count) != 0);
		return (atomic_read(&sl->camchange_count) != 0);
	}


	/* poll mode */
	/* poll mode */
	slot_status = ca->pub->poll_slot_status(ca->pub, slot, ca->open);
	slot_status = ca->pub->poll_slot_status(ca->pub, slot, ca->open);
@@ -258,11 +257,10 @@ static int dvb_ca_en50221_check_camstatus(struct dvb_ca_private *ca, int slot)
	}
	}


	if (cam_changed) {
	if (cam_changed) {
		if (!cam_present_now) {
		if (!cam_present_now)
			sl->camchange_type = DVB_CA_EN50221_CAMCHANGE_REMOVED;
			sl->camchange_type = DVB_CA_EN50221_CAMCHANGE_REMOVED;
		} else {
		else
			sl->camchange_type = DVB_CA_EN50221_CAMCHANGE_INSERTED;
			sl->camchange_type = DVB_CA_EN50221_CAMCHANGE_INSERTED;
		}
		atomic_set(&sl->camchange_count, 1);
		atomic_set(&sl->camchange_count, 1);
	} else {
	} else {
		if ((sl->slot_state == DVB_CA_SLOTSTATE_WAITREADY) &&
		if ((sl->slot_state == DVB_CA_SLOTSTATE_WAITREADY) &&
@@ -314,9 +312,8 @@ static int dvb_ca_en50221_wait_if_status(struct dvb_ca_private *ca, int slot,
		}
		}


		/* check for timeout */
		/* check for timeout */
		if (time_after(jiffies, timeout)) {
		if (time_after(jiffies, timeout))
			break;
			break;
		}


		/* wait for a bit */
		/* wait for a bit */
		usleep_range(1000, 1100);
		usleep_range(1000, 1100);
@@ -786,9 +783,9 @@ static int dvb_ca_en50221_read_data(struct dvb_ca_private *ca, int slot,
		buf[0], (buf[1] & 0x80) == 0, bytes_read);
		buf[0], (buf[1] & 0x80) == 0, bytes_read);


	/* wake up readers when a last_fragment is received */
	/* wake up readers when a last_fragment is received */
	if ((buf[1] & 0x80) == 0x00) {
	if ((buf[1] & 0x80) == 0x00)
		wake_up_interruptible(&ca->wait_queue);
		wake_up_interruptible(&ca->wait_queue);
	}

	status = bytes_read;
	status = bytes_read;


exit:
exit:
@@ -1676,11 +1673,10 @@ static ssize_t dvb_ca_en50221_io_read(struct file *file, char __user *buf,
			connection_id = hdr[0];
			connection_id = hdr[0];
		if (hdr[0] == connection_id) {
		if (hdr[0] == connection_id) {
			if (pktlen < count) {
			if (pktlen < count) {
				if ((pktlen + fraglen - 2) > count) {
				if ((pktlen + fraglen - 2) > count)
					fraglen = count - pktlen;
					fraglen = count - pktlen;
				} else {
				else
					fraglen -= 2;
					fraglen -= 2;
				}


				status =
				status =
				   dvb_ringbuffer_pkt_read_user(&sl->rx_buffer,
				   dvb_ringbuffer_pkt_read_user(&sl->rx_buffer,
@@ -1818,9 +1814,8 @@ static unsigned int dvb_ca_en50221_io_poll(struct file *file, poll_table *wait)


	dprintk("%s\n", __func__);
	dprintk("%s\n", __func__);


	if (dvb_ca_en50221_io_read_condition(ca, &result, &slot) == 1) {
	if (dvb_ca_en50221_io_read_condition(ca, &result, &slot) == 1)
		mask |= POLLIN;
		mask |= POLLIN;
	}


	/* if there is something, return now */
	/* if there is something, return now */
	if (mask)
	if (mask)
@@ -1829,9 +1824,8 @@ static unsigned int dvb_ca_en50221_io_poll(struct file *file, poll_table *wait)
	/* wait for something to happen */
	/* wait for something to happen */
	poll_wait(file, &ca->wait_queue, wait);
	poll_wait(file, &ca->wait_queue, wait);


	if (dvb_ca_en50221_io_read_condition(ca, &result, &slot) == 1) {
	if (dvb_ca_en50221_io_read_condition(ca, &result, &slot) == 1)
		mask |= POLLIN;
		mask |= POLLIN;
	}


	return mask;
	return mask;
}
}
@@ -1973,9 +1967,9 @@ void dvb_ca_en50221_release(struct dvb_ca_en50221 *pubca)
	/* shutdown the thread if there was one */
	/* shutdown the thread if there was one */
	kthread_stop(ca->thread);
	kthread_stop(ca->thread);


	for (i = 0; i < ca->slot_count; i++) {
	for (i = 0; i < ca->slot_count; i++)
		dvb_ca_en50221_slot_shutdown(ca, i);
		dvb_ca_en50221_slot_shutdown(ca, i);
	}

	dvb_remove_device(ca->dvbdev);
	dvb_remove_device(ca->dvbdev);
	dvb_ca_private_put(ca);
	dvb_ca_private_put(ca);
	pubca->private = NULL;
	pubca->private = NULL;