aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@st.com>2011-08-10 04:50:54 -0400
committerGrant Likely <grant.likely@secretlab.ca>2011-09-20 13:22:59 -0400
commitf1e45f86ed93b9ec0b6b51dd75841894935d2b68 (patch)
tree8b88727ef58d38347ec164f83babdc48c565498c /drivers/spi
parentb6fd41e29dea9c6753b1843a77e50433e6123bcb (diff)
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: Viresh Kumar <viresh.kumar@st.com> Tested-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi-pl022.c30
1 files changed, 8 insertions, 22 deletions
diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c
index 730b4a37b823..6209540e06a6 100644
--- a/drivers/spi/spi-pl022.c
+++ b/drivers/spi/spi-pl022.c
@@ -113,7 +113,6 @@
113#define SSP_CR0_MASK_CSS_ST (0x1FUL << 16) 113#define SSP_CR0_MASK_CSS_ST (0x1FUL << 16)
114#define SSP_CR0_MASK_FRF_ST (0x3UL << 21) 114#define SSP_CR0_MASK_FRF_ST (0x3UL << 21)
115 115
116
117/* 116/*
118 * SSP Control Register 0 - SSP_CR1 117 * SSP Control Register 0 - SSP_CR1
119 */ 118 */
@@ -283,7 +282,6 @@
283 282
284#define SPI_POLLING_TIMEOUT 1000 283#define SPI_POLLING_TIMEOUT 1000
285 284
286
287/* 285/*
288 * The type of reading going on on this chip 286 * The type of reading going on on this chip
289 */ 287 */
@@ -752,7 +750,6 @@ static void readwriter(struct pl022 *pl022)
752 */ 750 */
753} 751}
754 752
755
756/** 753/**
757 * next_transfer - Move to the Next transfer in the current spi message 754 * next_transfer - Move to the Next transfer in the current spi message
758 * @pl022: SSP driver private data structure 755 * @pl022: SSP driver private data structure
@@ -1534,8 +1531,7 @@ static void pump_messages(struct work_struct *work)
1534 /* Initial message state */ 1531 /* Initial message state */
1535 pl022->cur_msg->state = STATE_START; 1532 pl022->cur_msg->state = STATE_START;
1536 pl022->cur_transfer = list_entry(pl022->cur_msg->transfers.next, 1533 pl022->cur_transfer = list_entry(pl022->cur_msg->transfers.next,
1537 struct spi_transfer, 1534 struct spi_transfer, transfer_list);
1538 transfer_list);
1539 1535
1540 /* Setup the SPI using the per chip configuration */ 1536 /* Setup the SPI using the per chip configuration */
1541 pl022->cur_chip = spi_get_ctldata(pl022->cur_msg->spi); 1537 pl022->cur_chip = spi_get_ctldata(pl022->cur_msg->spi);
@@ -1557,7 +1553,6 @@ static void pump_messages(struct work_struct *work)
1557 do_interrupt_dma_transfer(pl022); 1553 do_interrupt_dma_transfer(pl022);
1558} 1554}
1559 1555
1560
1561static int __init init_queue(struct pl022 *pl022) 1556static int __init init_queue(struct pl022 *pl022)
1562{ 1557{
1563 INIT_LIST_HEAD(&pl022->queue); 1558 INIT_LIST_HEAD(&pl022->queue);
@@ -1566,8 +1561,8 @@ static int __init init_queue(struct pl022 *pl022)
1566 pl022->running = false; 1561 pl022->running = false;
1567 pl022->busy = false; 1562 pl022->busy = false;
1568 1563
1569 tasklet_init(&pl022->pump_transfers, 1564 tasklet_init(&pl022->pump_transfers, pump_transfers,
1570 pump_transfers, (unsigned long)pl022); 1565 (unsigned long)pl022);
1571 1566
1572 INIT_WORK(&pl022->pump_messages, pump_messages); 1567 INIT_WORK(&pl022->pump_messages, pump_messages);
1573 pl022->workqueue = create_singlethread_workqueue( 1568 pl022->workqueue = create_singlethread_workqueue(
@@ -1578,7 +1573,6 @@ static int __init init_queue(struct pl022 *pl022)
1578 return 0; 1573 return 0;
1579} 1574}
1580 1575
1581
1582static int start_queue(struct pl022 *pl022) 1576static int start_queue(struct pl022 *pl022)
1583{ 1577{
1584 unsigned long flags; 1578 unsigned long flags;
@@ -1601,7 +1595,6 @@ static int start_queue(struct pl022 *pl022)
1601 return 0; 1595 return 0;
1602} 1596}
1603 1597
1604
1605static int stop_queue(struct pl022 *pl022) 1598static int stop_queue(struct pl022 *pl022)
1606{ 1599{
1607 unsigned long flags; 1600 unsigned long flags;
@@ -1861,7 +1854,6 @@ static int calculate_effective_freq(struct pl022 *pl022,
1861 return 0; 1854 return 0;
1862} 1855}
1863 1856
1864
1865/* 1857/*
1866 * A piece of default chip info unless the platform 1858 * A piece of default chip info unless the platform
1867 * supplies it. 1859 * supplies it.
@@ -1879,7 +1871,6 @@ static const struct pl022_config_chip pl022_default_chip_info = {
1879 .cs_control = null_cs_control, 1871 .cs_control = null_cs_control,
1880}; 1872};
1881 1873
1882
1883/** 1874/**
1884 * pl022_setup - setup function registered to SPI master framework 1875 * pl022_setup - setup function registered to SPI master framework
1885 * @spi: spi device which is requesting setup 1876 * @spi: spi device which is requesting setup
@@ -1956,7 +1947,6 @@ static int pl022_setup(struct spi_device *spi)
1956 goto err_config_params; 1947 goto err_config_params;
1957 } 1948 }
1958 1949
1959
1960 status = verify_controller_parameters(pl022, chip_info); 1950 status = verify_controller_parameters(pl022, chip_info);
1961 if (status) { 1951 if (status) {
1962 dev_err(&spi->dev, "controller data is incorrect"); 1952 dev_err(&spi->dev, "controller data is incorrect");
@@ -2096,7 +2086,8 @@ static int pl022_setup(struct spi_device *spi)
2096 } 2086 }
2097 SSP_WRITE_BITS(chip->cr1, SSP_DISABLED, SSP_CR1_MASK_SSE, 1); 2087 SSP_WRITE_BITS(chip->cr1, SSP_DISABLED, SSP_CR1_MASK_SSE, 1);
2098 SSP_WRITE_BITS(chip->cr1, chip_info->hierarchy, SSP_CR1_MASK_MS, 2); 2088 SSP_WRITE_BITS(chip->cr1, chip_info->hierarchy, SSP_CR1_MASK_MS, 2);
2099 SSP_WRITE_BITS(chip->cr1, chip_info->slave_tx_disable, SSP_CR1_MASK_SOD, 3); 2089 SSP_WRITE_BITS(chip->cr1, chip_info->slave_tx_disable, SSP_CR1_MASK_SOD,
2090 3);
2100 2091
2101 /* Save controller_state */ 2092 /* Save controller_state */
2102 spi_set_ctldata(spi, chip); 2093 spi_set_ctldata(spi, chip);
@@ -2122,7 +2113,6 @@ static void pl022_cleanup(struct spi_device *spi)
2122 kfree(chip); 2113 kfree(chip);
2123} 2114}
2124 2115
2125
2126static int __devinit 2116static int __devinit
2127pl022_probe(struct amba_device *adev, const struct amba_id *id) 2117pl022_probe(struct amba_device *adev, const struct amba_id *id)
2128{ 2118{
@@ -2337,7 +2327,6 @@ static struct vendor_data vendor_arm = {
2337 .loopback = true, 2327 .loopback = true,
2338}; 2328};
2339 2329
2340
2341static struct vendor_data vendor_st = { 2330static struct vendor_data vendor_st = {
2342 .fifodepth = 32, 2331 .fifodepth = 32,
2343 .max_bpw = 32, 2332 .max_bpw = 32,
@@ -2392,9 +2381,9 @@ static struct amba_id pl022_ids[] = {
2392 * and 32 locations deep TX/RX FIFO but no extended 2381 * and 32 locations deep TX/RX FIFO but no extended
2393 * CR0/CR1 register 2382 * CR0/CR1 register
2394 */ 2383 */
2395 .id = 0x00080023, 2384 .id = 0x00080023,
2396 .mask = 0xffffffff, 2385 .mask = 0xffffffff,
2397 .data = &vendor_st_pl023, 2386 .data = &vendor_st_pl023,
2398 }, 2387 },
2399 { 2388 {
2400 .id = 0x10080023, 2389 .id = 0x10080023,
@@ -2415,19 +2404,16 @@ static struct amba_driver pl022_driver = {
2415 .resume = pl022_resume, 2404 .resume = pl022_resume,
2416}; 2405};
2417 2406
2418
2419static int __init pl022_init(void) 2407static int __init pl022_init(void)
2420{ 2408{
2421 return amba_driver_register(&pl022_driver); 2409 return amba_driver_register(&pl022_driver);
2422} 2410}
2423
2424subsys_initcall(pl022_init); 2411subsys_initcall(pl022_init);
2425 2412
2426static void __exit pl022_exit(void) 2413static void __exit pl022_exit(void)
2427{ 2414{
2428 amba_driver_unregister(&pl022_driver); 2415 amba_driver_unregister(&pl022_driver);
2429} 2416}
2430
2431module_exit(pl022_exit); 2417module_exit(pl022_exit);
2432 2418
2433MODULE_AUTHOR("Linus Walleij <linus.walleij@stericsson.com>"); 2419MODULE_AUTHOR("Linus Walleij <linus.walleij@stericsson.com>");