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

Commit fdf1bc9f authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

[media] em28xx: checkpatch cleanup: whitespaces/new lines cleanups

This patch is basically produced while testing a tool that
Joe Perches sent upstream sometime ago:
	https://lkml.org/lkml/2014/7/11/794



I used it with those arguments:
	$ reformat_with_checkpatch.sh drivers/media/usb/em28xx/em28xx*.[ch]

It actually produced 24 patches, with is too much, and showed
interesting things: gcc produced different codes on most of the
patches, even with just linespace changes. The total code data
remained the same on all cases I checked though.

Anyway, provided that we fold the resulting patches, this tool
seems useful.

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 1b97dc98
Loading
Loading
Loading
Loading
+9 −10
Original line number Diff line number Diff line
@@ -232,7 +232,6 @@ static struct snd_pcm_hardware snd_em28xx_hw_capture = {
	.channels_max = 2,
	.buffer_bytes_max = 62720 * 8,	/* just about the value in usbaudio.c */


	/*
	 * The period is 12.288 bytes. Allow a 10% of variation along its
	 * value, in order to avoid overruns/underruns due to some clock
+0 −5
Original line number Diff line number Diff line
@@ -27,7 +27,6 @@

#include "em28xx.h"


/* Possible i2c addresses of Micron sensors */
static unsigned short micron_sensor_addrs[] = {
	0xb8 >> 1,   /* MT9V111, MT9V403 */
@@ -43,7 +42,6 @@ static unsigned short omnivision_sensor_addrs[] = {
	I2C_CLIENT_END
};


static struct soc_camera_link camlink = {
	.bus_id = 0,
	.flags = 0,
@@ -51,7 +49,6 @@ static struct soc_camera_link camlink = {
	.unbalanced_power = true,
};


/* FIXME: Should be replaced by a proper mt9m111 driver */
static int em28xx_initialize_mt9m111(struct em28xx *dev)
{
@@ -70,7 +67,6 @@ static int em28xx_initialize_mt9m111(struct em28xx *dev)
	return 0;
}


/* FIXME: Should be replaced by a proper mt9m001 driver */
static int em28xx_initialize_mt9m001(struct em28xx *dev)
{
@@ -98,7 +94,6 @@ static int em28xx_initialize_mt9m001(struct em28xx *dev)
	return 0;
}


/*
 * Probes Micron sensors with 8 bit address and 16 bit register width
 */
+14 −14
Original line number Diff line number Diff line
@@ -64,7 +64,6 @@ module_param(usb_xfer_mode, int, 0444);
MODULE_PARM_DESC(usb_xfer_mode,
		 "USB transfer mode for frame data (-1 = auto, 0 = prefer isoc, 1 = prefer bulk)");


/* Bitmask marking allocated devices from 0 to EM28XX_MAXBOARDS - 1 */
static DECLARE_BITMAP(em28xx_devused, EM28XX_MAXBOARDS);

@@ -301,7 +300,6 @@ static struct em28xx_reg_seq dikom_dk300_digital[] = {
	{	-1,		-1,	-1,		-1},
};


/* Reset for the most [digital] boards */
static struct em28xx_reg_seq leadership_digital[] = {
	{EM2874_R80_GPIO_P0_CTRL,	0x70,	0xff,	10},
@@ -562,7 +560,6 @@ static struct em28xx_led pctv_80e_leds[] = {
	{-1, 0, 0, 0},
};


/*
 *  Board definitions
 */
@@ -2496,6 +2493,7 @@ static struct em28xx_hash_table em28xx_i2c_hash[] = {
	{0x4ba50080, EM2861_BOARD_GADMEI_UTV330PLUS, TUNER_TNF_5335MF},
	{0x6b800080, EM2874_BOARD_LEADERSHIP_ISDBT, TUNER_ABSENT},
};

/* NOTE: introduce a separate hash table for devices with 16 bit eeproms */

int em28xx_tuner_callback(void *ptr, int component, int command, int arg)
@@ -3094,6 +3092,7 @@ static int em28xx_init_dev(struct em28xx *dev, struct usb_device *udev,
			if (le16_to_cpu(dev->udev->descriptor.idVendor)
								    == 0xeb1a) {
				__le16 idProd = dev->udev->descriptor.idProduct;

				if (le16_to_cpu(idProd) == 0x2710)
					chip_name = "em2710";
				else if (le16_to_cpu(idProd) == 0x2820)
@@ -3420,6 +3419,7 @@ static int em28xx_usb_probe(struct usb_interface *interface,
	/* Checks if audio is provided by a USB Audio Class interface */
	for (i = 0; i < udev->config->desc.bNumInterfaces; i++) {
		struct usb_interface *uif = udev->config->interface[i];

		if (uif->altsetting[0].desc.bInterfaceClass == USB_CLASS_AUDIO) {
			if (has_vendor_audio)
				em28xx_err("em28xx: device seems to have vendor AND usb audio class interfaces !\n"
+22 −19
Original line number Diff line number Diff line
@@ -614,6 +614,7 @@ const struct em28xx_led *em28xx_find_led(struct em28xx *dev,
{
	if (dev->board.leds) {
		u8 k = 0;

		while (dev->board.leds[k].role >= 0 &&
		       dev->board.leds[k].role < EM28XX_NUM_LED_ROLES) {
			if (dev->board.leds[k].role == role)
@@ -658,10 +659,12 @@ int em28xx_capture_start(struct em28xx *dev, int start)

			if (dev->mode == EM28XX_ANALOG_MODE)
				rc = em28xx_write_reg(dev,
						    EM28XX_R12_VINENABLE, 0x67);
						      EM28XX_R12_VINENABLE,
						      0x67);
			else
				rc = em28xx_write_reg(dev,
						    EM28XX_R12_VINENABLE, 0x37);
						      EM28XX_R12_VINENABLE,
						      0x37);
			if (rc < 0)
				return rc;

+15 −15
Original line number Diff line number Diff line
@@ -63,7 +63,6 @@ MODULE_LICENSE("GPL");
MODULE_DESCRIPTION(DRIVER_DESC " - digital TV interface");
MODULE_VERSION(EM28XX_VERSION);


static unsigned int debug;
module_param(debug, int, 0644);
MODULE_PARM_DESC(debug, "enable debug messages [dvb]");
@@ -99,7 +98,6 @@ struct em28xx_dvb {
	struct i2c_client	*i2c_client_tuner;
};


static inline void print_err_status(struct em28xx *dev,
				    int packet, int status)
{
@@ -280,7 +278,6 @@ static int em28xx_stop_feed(struct dvb_demux_feed *feed)
}



/* ------------------------------------------------------------------ */
static int em28xx_dvb_bus_ctrl(struct dvb_frontend *fe, int acquire)
{
@@ -830,6 +827,7 @@ static struct zl10353_config em28xx_zl10353_no_i2c_gate_dev = {
	.no_tuner = 1,
	.parallel_ts = 1,
};

static struct qt1010_config em28xx_qt1010_config = {
	.i2c_address = 0x62
};
@@ -861,7 +859,6 @@ static const struct m88ds3103_config pctv_461e_m88ds3103_config = {
	.agc = 0x99,
};


static struct tda18271_std_map drx_j_std_map = {
	.atsc_6   = { .if_freq = 5000, .agc_mode = 3, .std = 0, .if_lvl = 1,
		      .rfagc_top = 0x37, },
@@ -1182,7 +1179,8 @@ static int em28xx_dvb_init(struct em28xx *dev)
					   &dev->i2c_adap[dev->def_i2c_bus]);
		if (dvb->fe[0] != NULL) {
			if (!dvb_attach(simple_tuner_attach, dvb->fe[0],
				&dev->i2c_adap[dev->def_i2c_bus], 0x61, TUNER_THOMSON_DTT761X)) {
					&dev->i2c_adap[dev->def_i2c_bus],
					0x61, TUNER_THOMSON_DTT761X)) {
				result = -EINVAL;
				goto out_free;
			}
@@ -1204,7 +1202,8 @@ static int em28xx_dvb_init(struct em28xx *dev)
			&dev->i2c_adap[dev->def_i2c_bus], 0x48);
		if (dvb->fe[0]) {
			if (!dvb_attach(simple_tuner_attach, dvb->fe[0],
				&dev->i2c_adap[dev->def_i2c_bus], 0x60, TUNER_PHILIPS_CU1216L)) {
					&dev->i2c_adap[dev->def_i2c_bus],
					0x60, TUNER_PHILIPS_CU1216L)) {
				result = -EINVAL;
				goto out_free;
			}
@@ -1266,6 +1265,7 @@ static int em28xx_dvb_init(struct em28xx *dev)
	case EM2884_BOARD_HAUPPAUGE_WINTV_HVR_930C:
	{
		struct xc5000_config cfg;

		hauppauge_hvr930c_init(dev);

		dvb->fe[0] = dvb_attach(drxk_attach,
Loading