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

Commit f1e45f86 authored by Viresh Kumar's avatar Viresh Kumar Committed by Grant Likely
Browse files

spi/spi-pl022: Resolve formatting issues



There were few formatting related issues in code. This patch fixes them.
Fixes include:
- Remove extra blank lines
- align code to 80 cols
- combine several lines to one line
- Replace multiple spaces with tabs
- Remove spaces before labels

Signed-off-by: default avatarViresh Kumar <viresh.kumar@st.com>
Tested-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
parent b6fd41e2
Loading
Loading
Loading
Loading
+8 −22
Original line number Original line Diff line number Diff line
@@ -113,7 +113,6 @@
#define SSP_CR0_MASK_CSS_ST	(0x1FUL << 16)
#define SSP_CR0_MASK_CSS_ST	(0x1FUL << 16)
#define SSP_CR0_MASK_FRF_ST	(0x3UL << 21)
#define SSP_CR0_MASK_FRF_ST	(0x3UL << 21)



/*
/*
 * SSP Control Register 0  - SSP_CR1
 * SSP Control Register 0  - SSP_CR1
 */
 */
@@ -283,7 +282,6 @@


#define SPI_POLLING_TIMEOUT 1000
#define SPI_POLLING_TIMEOUT 1000



/*
/*
 * The type of reading going on on this chip
 * The type of reading going on on this chip
 */
 */
@@ -752,7 +750,6 @@ static void readwriter(struct pl022 *pl022)
	 */
	 */
}
}



/**
/**
 * next_transfer - Move to the Next transfer in the current spi message
 * next_transfer - Move to the Next transfer in the current spi message
 * @pl022: SSP driver private data structure
 * @pl022: SSP driver private data structure
@@ -1534,8 +1531,7 @@ static void pump_messages(struct work_struct *work)
	/* Initial message state */
	/* Initial message state */
	pl022->cur_msg->state = STATE_START;
	pl022->cur_msg->state = STATE_START;
	pl022->cur_transfer = list_entry(pl022->cur_msg->transfers.next,
	pl022->cur_transfer = list_entry(pl022->cur_msg->transfers.next,
					    struct spi_transfer,
					    struct spi_transfer, transfer_list);
					    transfer_list);


	/* Setup the SPI using the per chip configuration */
	/* Setup the SPI using the per chip configuration */
	pl022->cur_chip = spi_get_ctldata(pl022->cur_msg->spi);
	pl022->cur_chip = spi_get_ctldata(pl022->cur_msg->spi);
@@ -1557,7 +1553,6 @@ static void pump_messages(struct work_struct *work)
		do_interrupt_dma_transfer(pl022);
		do_interrupt_dma_transfer(pl022);
}
}



static int __init init_queue(struct pl022 *pl022)
static int __init init_queue(struct pl022 *pl022)
{
{
	INIT_LIST_HEAD(&pl022->queue);
	INIT_LIST_HEAD(&pl022->queue);
@@ -1566,8 +1561,8 @@ static int __init init_queue(struct pl022 *pl022)
	pl022->running = false;
	pl022->running = false;
	pl022->busy = false;
	pl022->busy = false;


	tasklet_init(&pl022->pump_transfers,
	tasklet_init(&pl022->pump_transfers, pump_transfers,
			pump_transfers,	(unsigned long)pl022);
			(unsigned long)pl022);


	INIT_WORK(&pl022->pump_messages, pump_messages);
	INIT_WORK(&pl022->pump_messages, pump_messages);
	pl022->workqueue = create_singlethread_workqueue(
	pl022->workqueue = create_singlethread_workqueue(
@@ -1578,7 +1573,6 @@ static int __init init_queue(struct pl022 *pl022)
	return 0;
	return 0;
}
}



static int start_queue(struct pl022 *pl022)
static int start_queue(struct pl022 *pl022)
{
{
	unsigned long flags;
	unsigned long flags;
@@ -1601,7 +1595,6 @@ static int start_queue(struct pl022 *pl022)
	return 0;
	return 0;
}
}



static int stop_queue(struct pl022 *pl022)
static int stop_queue(struct pl022 *pl022)
{
{
	unsigned long flags;
	unsigned long flags;
@@ -1861,7 +1854,6 @@ static int calculate_effective_freq(struct pl022 *pl022,
	return 0;
	return 0;
}
}



/*
/*
 * A piece of default chip info unless the platform
 * A piece of default chip info unless the platform
 * supplies it.
 * supplies it.
@@ -1879,7 +1871,6 @@ static const struct pl022_config_chip pl022_default_chip_info = {
	.cs_control = null_cs_control,
	.cs_control = null_cs_control,
};
};



/**
/**
 * pl022_setup - setup function registered to SPI master framework
 * pl022_setup - setup function registered to SPI master framework
 * @spi: spi device which is requesting setup
 * @spi: spi device which is requesting setup
@@ -1956,7 +1947,6 @@ static int pl022_setup(struct spi_device *spi)
		goto err_config_params;
		goto err_config_params;
	}
	}



	status = verify_controller_parameters(pl022, chip_info);
	status = verify_controller_parameters(pl022, chip_info);
	if (status) {
	if (status) {
		dev_err(&spi->dev, "controller data is incorrect");
		dev_err(&spi->dev, "controller data is incorrect");
@@ -2096,7 +2086,8 @@ static int pl022_setup(struct spi_device *spi)
	}
	}
	SSP_WRITE_BITS(chip->cr1, SSP_DISABLED, SSP_CR1_MASK_SSE, 1);
	SSP_WRITE_BITS(chip->cr1, SSP_DISABLED, SSP_CR1_MASK_SSE, 1);
	SSP_WRITE_BITS(chip->cr1, chip_info->hierarchy, SSP_CR1_MASK_MS, 2);
	SSP_WRITE_BITS(chip->cr1, chip_info->hierarchy, SSP_CR1_MASK_MS, 2);
	SSP_WRITE_BITS(chip->cr1, chip_info->slave_tx_disable, SSP_CR1_MASK_SOD, 3);
	SSP_WRITE_BITS(chip->cr1, chip_info->slave_tx_disable, SSP_CR1_MASK_SOD,
		3);


	/* Save controller_state */
	/* Save controller_state */
	spi_set_ctldata(spi, chip);
	spi_set_ctldata(spi, chip);
@@ -2122,7 +2113,6 @@ static void pl022_cleanup(struct spi_device *spi)
	kfree(chip);
	kfree(chip);
}
}



static int __devinit
static int __devinit
pl022_probe(struct amba_device *adev, const struct amba_id *id)
pl022_probe(struct amba_device *adev, const struct amba_id *id)
{
{
@@ -2337,7 +2327,6 @@ static struct vendor_data vendor_arm = {
	.loopback = true,
	.loopback = true,
};
};



static struct vendor_data vendor_st = {
static struct vendor_data vendor_st = {
	.fifodepth = 32,
	.fifodepth = 32,
	.max_bpw = 32,
	.max_bpw = 32,
@@ -2415,19 +2404,16 @@ static struct amba_driver pl022_driver = {
	.resume         = pl022_resume,
	.resume         = pl022_resume,
};
};



static int __init pl022_init(void)
static int __init pl022_init(void)
{
{
	return amba_driver_register(&pl022_driver);
	return amba_driver_register(&pl022_driver);
}
}

subsys_initcall(pl022_init);
subsys_initcall(pl022_init);


static void __exit pl022_exit(void)
static void __exit pl022_exit(void)
{
{
	amba_driver_unregister(&pl022_driver);
	amba_driver_unregister(&pl022_driver);
}
}

module_exit(pl022_exit);
module_exit(pl022_exit);


MODULE_AUTHOR("Linus Walleij <linus.walleij@stericsson.com>");
MODULE_AUTHOR("Linus Walleij <linus.walleij@stericsson.com>");