diff options
author | Viresh Kumar <viresh.kumar@st.com> | 2011-08-05 06:02:27 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2011-08-25 10:03:37 -0400 |
commit | 3e27ee8448bcbc8b4f060b107aa622c116f287ab (patch) | |
tree | 78531918514ba5f00b1e20747eba7f1361801a7a /drivers/dma | |
parent | 47850a27306997be914dedcbca1dfce09fa4ef0a (diff) |
dmaengine/amba-pl08x: 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
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/amba-pl08x.c | 41 |
1 files changed, 16 insertions, 25 deletions
diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c index 196a7378d332..4c4a3092e09c 100644 --- a/drivers/dma/amba-pl08x.c +++ b/drivers/dma/amba-pl08x.c | |||
@@ -125,7 +125,8 @@ struct pl08x_lli { | |||
125 | * @phy_chans: array of data for the physical channels | 125 | * @phy_chans: array of data for the physical channels |
126 | * @pool: a pool for the LLI descriptors | 126 | * @pool: a pool for the LLI descriptors |
127 | * @pool_ctr: counter of LLIs in the pool | 127 | * @pool_ctr: counter of LLIs in the pool |
128 | * @lli_buses: bitmask to or in to LLI pointer selecting AHB port for LLI fetches | 128 | * @lli_buses: bitmask to or in to LLI pointer selecting AHB port for LLI |
129 | * fetches | ||
129 | * @mem_buses: set to indicate memory transfers on AHB2. | 130 | * @mem_buses: set to indicate memory transfers on AHB2. |
130 | * @lock: a spinlock for this struct | 131 | * @lock: a spinlock for this struct |
131 | */ | 132 | */ |
@@ -271,7 +272,6 @@ static void pl08x_resume_phy_chan(struct pl08x_phy_chan *ch) | |||
271 | writel(val, ch->base + PL080_CH_CONFIG); | 272 | writel(val, ch->base + PL080_CH_CONFIG); |
272 | } | 273 | } |
273 | 274 | ||
274 | |||
275 | /* | 275 | /* |
276 | * pl08x_terminate_phy_chan() stops the channel, clears the FIFO and | 276 | * pl08x_terminate_phy_chan() stops the channel, clears the FIFO and |
277 | * clears any pending interrupt status. This should not be used for | 277 | * clears any pending interrupt status. This should not be used for |
@@ -546,7 +546,8 @@ static void pl08x_fill_lli_for_desc(struct pl08x_lli_build_data *bd, | |||
546 | llis_va[num_llis].cctl = cctl; | 546 | llis_va[num_llis].cctl = cctl; |
547 | llis_va[num_llis].src = bd->srcbus.addr; | 547 | llis_va[num_llis].src = bd->srcbus.addr; |
548 | llis_va[num_llis].dst = bd->dstbus.addr; | 548 | llis_va[num_llis].dst = bd->dstbus.addr; |
549 | llis_va[num_llis].lli = llis_bus + (num_llis + 1) * sizeof(struct pl08x_lli); | 549 | llis_va[num_llis].lli = llis_bus + (num_llis + 1) * |
550 | sizeof(struct pl08x_lli); | ||
550 | llis_va[num_llis].lli |= bd->lli_bus; | 551 | llis_va[num_llis].lli |= bd->lli_bus; |
551 | 552 | ||
552 | if (cctl & PL080_CONTROL_SRC_INCR) | 553 | if (cctl & PL080_CONTROL_SRC_INCR) |
@@ -583,12 +584,10 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x, | |||
583 | struct pl08x_lli_build_data bd; | 584 | struct pl08x_lli_build_data bd; |
584 | int num_llis = 0; | 585 | int num_llis = 0; |
585 | u32 cctl; | 586 | u32 cctl; |
586 | size_t max_bytes_per_lli; | 587 | size_t max_bytes_per_lli, total_bytes = 0; |
587 | size_t total_bytes = 0; | ||
588 | struct pl08x_lli *llis_va; | 588 | struct pl08x_lli *llis_va; |
589 | 589 | ||
590 | txd->llis_va = dma_pool_alloc(pl08x->pool, GFP_NOWAIT, | 590 | txd->llis_va = dma_pool_alloc(pl08x->pool, GFP_NOWAIT, &txd->llis_bus); |
591 | &txd->llis_bus); | ||
592 | if (!txd->llis_va) { | 591 | if (!txd->llis_va) { |
593 | dev_err(&pl08x->adev->dev, "%s no memory for llis\n", __func__); | 592 | dev_err(&pl08x->adev->dev, "%s no memory for llis\n", __func__); |
594 | return 0; | 593 | return 0; |
@@ -779,7 +778,6 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x, | |||
779 | total_bytes += lli_len; | 778 | total_bytes += lli_len; |
780 | } | 779 | } |
781 | 780 | ||
782 | |||
783 | if (odd_bytes) { | 781 | if (odd_bytes) { |
784 | /* | 782 | /* |
785 | * Creep past the boundary, maintaining | 783 | * Creep past the boundary, maintaining |
@@ -916,9 +914,7 @@ static int prep_phy_channel(struct pl08x_dma_chan *plchan, | |||
916 | * need, but for slaves the physical signals may be muxed! | 914 | * need, but for slaves the physical signals may be muxed! |
917 | * Can the platform allow us to use this channel? | 915 | * Can the platform allow us to use this channel? |
918 | */ | 916 | */ |
919 | if (plchan->slave && | 917 | if (plchan->slave && ch->signal < 0 && pl08x->pd->get_signal) { |
920 | ch->signal < 0 && | ||
921 | pl08x->pd->get_signal) { | ||
922 | ret = pl08x->pd->get_signal(plchan); | 918 | ret = pl08x->pd->get_signal(plchan); |
923 | if (ret < 0) { | 919 | if (ret < 0) { |
924 | dev_dbg(&pl08x->adev->dev, | 920 | dev_dbg(&pl08x->adev->dev, |
@@ -1007,10 +1003,8 @@ static struct dma_async_tx_descriptor *pl08x_prep_dma_interrupt( | |||
1007 | * If slaves are relying on interrupts to signal completion this function | 1003 | * If slaves are relying on interrupts to signal completion this function |
1008 | * must not be called with interrupts disabled. | 1004 | * must not be called with interrupts disabled. |
1009 | */ | 1005 | */ |
1010 | static enum dma_status | 1006 | static enum dma_status pl08x_dma_tx_status(struct dma_chan *chan, |
1011 | pl08x_dma_tx_status(struct dma_chan *chan, | 1007 | dma_cookie_t cookie, struct dma_tx_state *txstate) |
1012 | dma_cookie_t cookie, | ||
1013 | struct dma_tx_state *txstate) | ||
1014 | { | 1008 | { |
1015 | struct pl08x_dma_chan *plchan = to_pl08x_chan(chan); | 1009 | struct pl08x_dma_chan *plchan = to_pl08x_chan(chan); |
1016 | dma_cookie_t last_used; | 1010 | dma_cookie_t last_used; |
@@ -1588,8 +1582,8 @@ static void pl08x_tasklet(unsigned long data) | |||
1588 | */ | 1582 | */ |
1589 | list_for_each_entry(waiting, &pl08x->memcpy.channels, | 1583 | list_for_each_entry(waiting, &pl08x->memcpy.channels, |
1590 | chan.device_node) { | 1584 | chan.device_node) { |
1591 | if (waiting->state == PL08X_CHAN_WAITING && | 1585 | if (waiting->state == PL08X_CHAN_WAITING && |
1592 | waiting->waiting != NULL) { | 1586 | waiting->waiting != NULL) { |
1593 | int ret; | 1587 | int ret; |
1594 | 1588 | ||
1595 | /* This should REALLY not fail now */ | 1589 | /* This should REALLY not fail now */ |
@@ -1684,9 +1678,7 @@ static void pl08x_dma_slave_init(struct pl08x_dma_chan *chan) | |||
1684 | * Make a local wrapper to hold required data | 1678 | * Make a local wrapper to hold required data |
1685 | */ | 1679 | */ |
1686 | static int pl08x_dma_init_virtual_channels(struct pl08x_driver_data *pl08x, | 1680 | static int pl08x_dma_init_virtual_channels(struct pl08x_driver_data *pl08x, |
1687 | struct dma_device *dmadev, | 1681 | struct dma_device *dmadev, unsigned int channels, bool slave) |
1688 | unsigned int channels, | ||
1689 | bool slave) | ||
1690 | { | 1682 | { |
1691 | struct pl08x_dma_chan *chan; | 1683 | struct pl08x_dma_chan *chan; |
1692 | int i; | 1684 | int i; |
@@ -1836,9 +1828,9 @@ static const struct file_operations pl08x_debugfs_operations = { | |||
1836 | static void init_pl08x_debugfs(struct pl08x_driver_data *pl08x) | 1828 | static void init_pl08x_debugfs(struct pl08x_driver_data *pl08x) |
1837 | { | 1829 | { |
1838 | /* Expose a simple debugfs interface to view all clocks */ | 1830 | /* Expose a simple debugfs interface to view all clocks */ |
1839 | (void) debugfs_create_file(dev_name(&pl08x->adev->dev), S_IFREG | S_IRUGO, | 1831 | (void) debugfs_create_file(dev_name(&pl08x->adev->dev), |
1840 | NULL, pl08x, | 1832 | S_IFREG | S_IRUGO, NULL, pl08x, |
1841 | &pl08x_debugfs_operations); | 1833 | &pl08x_debugfs_operations); |
1842 | } | 1834 | } |
1843 | 1835 | ||
1844 | #else | 1836 | #else |
@@ -1973,8 +1965,7 @@ static int pl08x_probe(struct amba_device *adev, const struct amba_id *id) | |||
1973 | 1965 | ||
1974 | /* Register slave channels */ | 1966 | /* Register slave channels */ |
1975 | ret = pl08x_dma_init_virtual_channels(pl08x, &pl08x->slave, | 1967 | ret = pl08x_dma_init_virtual_channels(pl08x, &pl08x->slave, |
1976 | pl08x->pd->num_slave_channels, | 1968 | pl08x->pd->num_slave_channels, true); |
1977 | true); | ||
1978 | if (ret <= 0) { | 1969 | if (ret <= 0) { |
1979 | dev_warn(&pl08x->adev->dev, | 1970 | dev_warn(&pl08x->adev->dev, |
1980 | "%s failed to enumerate slave channels - %d\n", | 1971 | "%s failed to enumerate slave channels - %d\n", |