Skip to content

Commit

Permalink
spi/spi-pl022: Resolve formatting issues
Browse files Browse the repository at this point in the history
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: Viresh Kumar <viresh.kumar@st.com>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
  • Loading branch information
Viresh Kumar authored and Grant Likely committed Sep 20, 2011
1 parent b6fd41e commit f1e45f8
Showing 1 changed file with 8 additions and 22 deletions.
30 changes: 8 additions & 22 deletions drivers/spi/spi-pl022.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@
#define SSP_CR0_MASK_CSS_ST (0x1FUL << 16)
#define SSP_CR0_MASK_FRF_ST (0x3UL << 21)


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

#define SPI_POLLING_TIMEOUT 1000


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


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

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


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

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

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


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


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


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


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


status = verify_controller_parameters(pl022, chip_info);
if (status) {
dev_err(&spi->dev, "controller data is incorrect");
Expand Down Expand Up @@ -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, 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 */
spi_set_ctldata(spi, chip);
Expand All @@ -2122,7 +2113,6 @@ static void pl022_cleanup(struct spi_device *spi)
kfree(chip);
}


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


static struct vendor_data vendor_st = {
.fifodepth = 32,
.max_bpw = 32,
Expand Down Expand Up @@ -2392,9 +2381,9 @@ static struct amba_id pl022_ids[] = {
* and 32 locations deep TX/RX FIFO but no extended
* CR0/CR1 register
*/
.id = 0x00080023,
.mask = 0xffffffff,
.data = &vendor_st_pl023,
.id = 0x00080023,
.mask = 0xffffffff,
.data = &vendor_st_pl023,
},
{
.id = 0x10080023,
Expand All @@ -2415,19 +2404,16 @@ static struct amba_driver pl022_driver = {
.resume = pl022_resume,
};


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

subsys_initcall(pl022_init);

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

module_exit(pl022_exit);

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

0 comments on commit f1e45f8

Please sign in to comment.