aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2013-03-26 10:53:55 -0400
committerVinod Koul <vinod.koul@intel.com>2013-04-15 00:21:19 -0400
commitbd2e6b664055a115a85be81af0ceb022726c5aef (patch)
tree1ce0f4855b3654427231f0572ea1f6578fa7ca32
parent75c6122526f931ee7c23df9a05f0091b65c95e02 (diff)
dw_dmac: rename DT related methods to reflect their belonging
Since we will have not only DT cases in future let's rename DT related methods to reflect their belonging. The rename was done as follows: struct dw_dma_filter_args -> struct dw_dma_of_filter_args dw_dma_generic_filter() -> dw_dma_of_filter() dw_dma_xlate() -> dw_dma_of_xlate() dw_dma_id_table -> dw_dma_of_id_table There is no functional change. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r--drivers/dma/dw_dmac.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
index d6dbb1428200..274fd7dd81f6 100644
--- a/drivers/dma/dw_dmac.c
+++ b/drivers/dma/dw_dmac.c
@@ -1242,18 +1242,20 @@ static void dwc_free_chan_resources(struct dma_chan *chan)
1242 dev_vdbg(chan2dev(chan), "%s: done\n", __func__); 1242 dev_vdbg(chan2dev(chan), "%s: done\n", __func__);
1243} 1243}
1244 1244
1245struct dw_dma_filter_args { 1245/*----------------------------------------------------------------------*/
1246
1247struct dw_dma_of_filter_args {
1246 struct dw_dma *dw; 1248 struct dw_dma *dw;
1247 unsigned int req; 1249 unsigned int req;
1248 unsigned int src; 1250 unsigned int src;
1249 unsigned int dst; 1251 unsigned int dst;
1250}; 1252};
1251 1253
1252static bool dw_dma_generic_filter(struct dma_chan *chan, void *param) 1254static bool dw_dma_of_filter(struct dma_chan *chan, void *param)
1253{ 1255{
1254 struct dw_dma_chan *dwc = to_dw_dma_chan(chan); 1256 struct dw_dma_chan *dwc = to_dw_dma_chan(chan);
1255 struct dw_dma *dw = to_dw_dma(chan->device); 1257 struct dw_dma *dw = to_dw_dma(chan->device);
1256 struct dw_dma_filter_args *fargs = param; 1258 struct dw_dma_of_filter_args *fargs = param;
1257 struct dw_dma_slave *dws = &dwc->slave; 1259 struct dw_dma_slave *dws = &dwc->slave;
1258 1260
1259 /* Ensure the device matches our channel */ 1261 /* Ensure the device matches our channel */
@@ -1273,11 +1275,11 @@ static bool dw_dma_generic_filter(struct dma_chan *chan, void *param)
1273 return true; 1275 return true;
1274} 1276}
1275 1277
1276static struct dma_chan *dw_dma_xlate(struct of_phandle_args *dma_spec, 1278static struct dma_chan *dw_dma_of_xlate(struct of_phandle_args *dma_spec,
1277 struct of_dma *ofdma) 1279 struct of_dma *ofdma)
1278{ 1280{
1279 struct dw_dma *dw = ofdma->of_dma_data; 1281 struct dw_dma *dw = ofdma->of_dma_data;
1280 struct dw_dma_filter_args fargs = { 1282 struct dw_dma_of_filter_args fargs = {
1281 .dw = dw, 1283 .dw = dw,
1282 }; 1284 };
1283 dma_cap_mask_t cap; 1285 dma_cap_mask_t cap;
@@ -1298,7 +1300,7 @@ static struct dma_chan *dw_dma_xlate(struct of_phandle_args *dma_spec,
1298 dma_cap_set(DMA_SLAVE, cap); 1300 dma_cap_set(DMA_SLAVE, cap);
1299 1301
1300 /* TODO: there should be a simpler way to do this */ 1302 /* TODO: there should be a simpler way to do this */
1301 return dma_request_channel(cap, dw_dma_generic_filter, &fargs); 1303 return dma_request_channel(cap, dw_dma_of_filter, &fargs);
1302} 1304}
1303 1305
1304/* --------------------- Cyclic DMA API extensions -------------------- */ 1306/* --------------------- Cyclic DMA API extensions -------------------- */
@@ -1843,7 +1845,7 @@ static int dw_probe(struct platform_device *pdev)
1843 1845
1844 if (pdev->dev.of_node) { 1846 if (pdev->dev.of_node) {
1845 err = of_dma_controller_register(pdev->dev.of_node, 1847 err = of_dma_controller_register(pdev->dev.of_node,
1846 dw_dma_xlate, dw); 1848 dw_dma_of_xlate, dw);
1847 if (err && err != -ENODEV) 1849 if (err && err != -ENODEV)
1848 dev_err(&pdev->dev, 1850 dev_err(&pdev->dev,
1849 "could not register of_dma_controller\n"); 1851 "could not register of_dma_controller\n");
@@ -1913,11 +1915,11 @@ static const struct dev_pm_ops dw_dev_pm_ops = {
1913}; 1915};
1914 1916
1915#ifdef CONFIG_OF 1917#ifdef CONFIG_OF
1916static const struct of_device_id dw_dma_id_table[] = { 1918static const struct of_device_id dw_dma_of_id_table[] = {
1917 { .compatible = "snps,dma-spear1340" }, 1919 { .compatible = "snps,dma-spear1340" },
1918 {} 1920 {}
1919}; 1921};
1920MODULE_DEVICE_TABLE(of, dw_dma_id_table); 1922MODULE_DEVICE_TABLE(of, dw_dma_of_id_table);
1921#endif 1923#endif
1922 1924
1923static const struct platform_device_id dw_dma_ids[] = { 1925static const struct platform_device_id dw_dma_ids[] = {
@@ -1933,7 +1935,7 @@ static struct platform_driver dw_driver = {
1933 .driver = { 1935 .driver = {
1934 .name = "dw_dmac", 1936 .name = "dw_dmac",
1935 .pm = &dw_dev_pm_ops, 1937 .pm = &dw_dev_pm_ops,
1936 .of_match_table = of_match_ptr(dw_dma_id_table), 1938 .of_match_table = of_match_ptr(dw_dma_of_id_table),
1937 }, 1939 },
1938 .id_table = dw_dma_ids, 1940 .id_table = dw_dma_ids,
1939}; 1941};