Commit 947debb4 authored by Antti Palosaari's avatar Antti Palosaari Committed by Mauro Carvalho Chehab
Browse files

[media] rtl2830: style related changes



Trivial changes proposed by checkpatch.pl and some more.

Signed-off-by: default avatarAntti Palosaari <crope@iki.fi>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent b8cb50d2
Loading
Loading
Loading
Loading
+60 −65
Original line number Diff line number Diff line
@@ -13,16 +13,6 @@
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *    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.
 */


/*
 * Driver implements own I2C-adapter for tuner I2C access. That's since chip
 * have unusual I2C-gate control which closes gate automatically after each
 * I2C transfer. Using own I2C adapter we can workaround that.
 */

#include "rtl2830_priv.h"
@@ -61,6 +51,7 @@ static int rtl2830_wr(struct i2c_client *client, u8 reg, const u8 *val, int len)
			 ret, reg, len);
		ret = -EREMOTEIO;
	}

	return ret;
}

@@ -90,6 +81,7 @@ static int rtl2830_rd(struct i2c_client *client, u8 reg, u8 *val, int len)
			 ret, reg, len);
		ret = -EREMOTEIO;
	}

	return ret;
}

@@ -264,7 +256,9 @@ static int rtl2830_sleep(struct dvb_frontend *fe)
{
	struct i2c_client *client = fe->demodulator_priv;
	struct rtl2830_dev *dev = i2c_get_clientdata(client);

	dev->sleeping = true;

	return 0;
}

@@ -343,8 +337,7 @@ static int rtl2830_set_frontend(struct dvb_frontend *fe)
		ret = fe->ops.tuner_ops.get_if_frequency(fe, &if_frequency);
	else
		ret = -EINVAL;

	if (ret < 0)
	if (ret)
		goto err;

	num = if_frequency % dev->pdata->clk;
@@ -507,6 +500,7 @@ static int rtl2830_read_status(struct dvb_frontend *fe, fe_status_t *status)
	struct rtl2830_dev *dev = i2c_get_clientdata(client);
	int ret;
	u8 tmp;

	*status = 0;

	if (dev->sleeping)
@@ -605,6 +599,7 @@ static int rtl2830_read_ber(struct dvb_frontend *fe, u32 *ber)
static int rtl2830_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks)
{
	*ucblocks = 0;

	return 0;
}

@@ -723,7 +718,6 @@ static int rtl2830_select(struct i2c_adapter *adap, void *mux_priv, u32 chan_id)
	}

	return 0;

err:
	dev_dbg(&client->dev, "failed=%d\n", ret);
	return ret;
@@ -796,8 +790,8 @@ static int rtl2830_probe(struct i2c_client *client,
	pdata->get_i2c_adapter = rtl2830_get_i2c_adapter;

	dev_info(&client->dev, "Realtek RTL2830 successfully attached\n");
	return 0;

	return 0;
err_kfree:
	kfree(dev);
err:
@@ -813,6 +807,7 @@ static int rtl2830_remove(struct i2c_client *client)

	i2c_del_mux_adapter(dev->adapter);
	kfree(dev);

	return 0;
}

+0 −4
Original line number Diff line number Diff line
@@ -13,15 +13,11 @@
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *    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.
 */

#ifndef RTL2830_H
#define RTL2830_H

#include <linux/kconfig.h>
#include <linux/dvb/frontend.h>

struct rtl2830_platform_data {
+0 −3
Original line number Diff line number Diff line
@@ -13,9 +13,6 @@
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *    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.
 */

#ifndef RTL2830_PRIV_H