diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-07-30 04:09:11 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2013-08-13 07:26:41 -0400 |
commit | d4adcc0160404c3237fe6ffa09dd2dd039dd3975 (patch) | |
tree | aa9d7b76f16d21b38ffb8dbfe3c12986b0fd97f9 | |
parent | 696b4ff8b2e6fd3f01c9acf6687ec4660143b614 (diff) |
dma: use dev_get_platdata()
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r-- | drivers/dma/imx-sdma.c | 2 | ||||
-rw-r--r-- | drivers/dma/iop-adma.c | 6 | ||||
-rw-r--r-- | drivers/dma/mv_xor.c | 2 | ||||
-rw-r--r-- | drivers/dma/pl330.c | 2 | ||||
-rw-r--r-- | drivers/dma/sh/shdma-of.c | 2 | ||||
-rw-r--r-- | drivers/dma/sh/shdma.c | 2 | ||||
-rw-r--r-- | drivers/dma/sh/sudmac.c | 4 | ||||
-rw-r--r-- | drivers/dma/ste_dma40.c | 4 | ||||
-rw-r--r-- | drivers/dma/timb_dma.c | 2 | ||||
-rw-r--r-- | drivers/dma/txx9dmac.c | 9 |
10 files changed, 18 insertions, 17 deletions
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index f45e0928852b..b331ebb4d1d5 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c | |||
@@ -1332,7 +1332,7 @@ static int __init sdma_probe(struct platform_device *pdev) | |||
1332 | int ret; | 1332 | int ret; |
1333 | int irq; | 1333 | int irq; |
1334 | struct resource *iores; | 1334 | struct resource *iores; |
1335 | struct sdma_platform_data *pdata = pdev->dev.platform_data; | 1335 | struct sdma_platform_data *pdata = dev_get_platdata(&pdev->dev); |
1336 | int i; | 1336 | int i; |
1337 | struct sdma_engine *sdma; | 1337 | struct sdma_engine *sdma; |
1338 | s32 *saddr_arr; | 1338 | s32 *saddr_arr; |
diff --git a/drivers/dma/iop-adma.c b/drivers/dma/iop-adma.c index cc727ec78c4e..dd8b44a56e5d 100644 --- a/drivers/dma/iop-adma.c +++ b/drivers/dma/iop-adma.c | |||
@@ -518,7 +518,7 @@ static int iop_adma_alloc_chan_resources(struct dma_chan *chan) | |||
518 | struct iop_adma_desc_slot *slot = NULL; | 518 | struct iop_adma_desc_slot *slot = NULL; |
519 | int init = iop_chan->slots_allocated ? 0 : 1; | 519 | int init = iop_chan->slots_allocated ? 0 : 1; |
520 | struct iop_adma_platform_data *plat_data = | 520 | struct iop_adma_platform_data *plat_data = |
521 | iop_chan->device->pdev->dev.platform_data; | 521 | dev_get_platdata(&iop_chan->device->pdev->dev); |
522 | int num_descs_in_pool = plat_data->pool_size/IOP_ADMA_SLOT_SIZE; | 522 | int num_descs_in_pool = plat_data->pool_size/IOP_ADMA_SLOT_SIZE; |
523 | 523 | ||
524 | /* Allocate descriptor slots */ | 524 | /* Allocate descriptor slots */ |
@@ -1351,7 +1351,7 @@ static int iop_adma_remove(struct platform_device *dev) | |||
1351 | struct iop_adma_device *device = platform_get_drvdata(dev); | 1351 | struct iop_adma_device *device = platform_get_drvdata(dev); |
1352 | struct dma_chan *chan, *_chan; | 1352 | struct dma_chan *chan, *_chan; |
1353 | struct iop_adma_chan *iop_chan; | 1353 | struct iop_adma_chan *iop_chan; |
1354 | struct iop_adma_platform_data *plat_data = dev->dev.platform_data; | 1354 | struct iop_adma_platform_data *plat_data = dev_get_platdata(&dev->dev); |
1355 | 1355 | ||
1356 | dma_async_device_unregister(&device->common); | 1356 | dma_async_device_unregister(&device->common); |
1357 | 1357 | ||
@@ -1376,7 +1376,7 @@ static int iop_adma_probe(struct platform_device *pdev) | |||
1376 | struct iop_adma_device *adev; | 1376 | struct iop_adma_device *adev; |
1377 | struct iop_adma_chan *iop_chan; | 1377 | struct iop_adma_chan *iop_chan; |
1378 | struct dma_device *dma_dev; | 1378 | struct dma_device *dma_dev; |
1379 | struct iop_adma_platform_data *plat_data = pdev->dev.platform_data; | 1379 | struct iop_adma_platform_data *plat_data = dev_get_platdata(&pdev->dev); |
1380 | 1380 | ||
1381 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 1381 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
1382 | if (!res) | 1382 | if (!res) |
diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c index 534e2febd277..d9a26777a1b0 100644 --- a/drivers/dma/mv_xor.c +++ b/drivers/dma/mv_xor.c | |||
@@ -1166,7 +1166,7 @@ static int mv_xor_probe(struct platform_device *pdev) | |||
1166 | { | 1166 | { |
1167 | const struct mbus_dram_target_info *dram; | 1167 | const struct mbus_dram_target_info *dram; |
1168 | struct mv_xor_device *xordev; | 1168 | struct mv_xor_device *xordev; |
1169 | struct mv_xor_platform_data *pdata = pdev->dev.platform_data; | 1169 | struct mv_xor_platform_data *pdata = dev_get_platdata(&pdev->dev); |
1170 | struct resource *res; | 1170 | struct resource *res; |
1171 | int i, ret; | 1171 | int i, ret; |
1172 | 1172 | ||
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index fa645d825009..d8c10449fb42 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c | |||
@@ -2908,7 +2908,7 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id) | |||
2908 | int i, ret, irq; | 2908 | int i, ret, irq; |
2909 | int num_chan; | 2909 | int num_chan; |
2910 | 2910 | ||
2911 | pdat = adev->dev.platform_data; | 2911 | pdat = dev_get_platdata(&adev->dev); |
2912 | 2912 | ||
2913 | /* Allocate a new DMAC and its Channels */ | 2913 | /* Allocate a new DMAC and its Channels */ |
2914 | pdmac = devm_kzalloc(&adev->dev, sizeof(*pdmac), GFP_KERNEL); | 2914 | pdmac = devm_kzalloc(&adev->dev, sizeof(*pdmac), GFP_KERNEL); |
diff --git a/drivers/dma/sh/shdma-of.c b/drivers/dma/sh/shdma-of.c index 11bcb05cd79c..966aaab0b4d3 100644 --- a/drivers/dma/sh/shdma-of.c +++ b/drivers/dma/sh/shdma-of.c | |||
@@ -42,7 +42,7 @@ static struct dma_chan *shdma_of_xlate(struct of_phandle_args *dma_spec, | |||
42 | 42 | ||
43 | static int shdma_of_probe(struct platform_device *pdev) | 43 | static int shdma_of_probe(struct platform_device *pdev) |
44 | { | 44 | { |
45 | const struct of_dev_auxdata *lookup = pdev->dev.platform_data; | 45 | const struct of_dev_auxdata *lookup = dev_get_platdata(&pdev->dev); |
46 | int ret; | 46 | int ret; |
47 | 47 | ||
48 | if (!lookup) | 48 | if (!lookup) |
diff --git a/drivers/dma/sh/shdma.c b/drivers/dma/sh/shdma.c index b67f45f5c271..b388b12f078e 100644 --- a/drivers/dma/sh/shdma.c +++ b/drivers/dma/sh/shdma.c | |||
@@ -660,7 +660,7 @@ static const struct shdma_ops sh_dmae_shdma_ops = { | |||
660 | 660 | ||
661 | static int sh_dmae_probe(struct platform_device *pdev) | 661 | static int sh_dmae_probe(struct platform_device *pdev) |
662 | { | 662 | { |
663 | struct sh_dmae_pdata *pdata = pdev->dev.platform_data; | 663 | struct sh_dmae_pdata *pdata = dev_get_platdata(&pdev->dev); |
664 | unsigned long irqflags = IRQF_DISABLED, | 664 | unsigned long irqflags = IRQF_DISABLED, |
665 | chan_flag[SH_DMAE_MAX_CHANNELS] = {}; | 665 | chan_flag[SH_DMAE_MAX_CHANNELS] = {}; |
666 | int errirq, chan_irq[SH_DMAE_MAX_CHANNELS]; | 666 | int errirq, chan_irq[SH_DMAE_MAX_CHANNELS]; |
diff --git a/drivers/dma/sh/sudmac.c b/drivers/dma/sh/sudmac.c index e7c94bbddb53..c49441753d99 100644 --- a/drivers/dma/sh/sudmac.c +++ b/drivers/dma/sh/sudmac.c | |||
@@ -335,7 +335,7 @@ static const struct shdma_ops sudmac_shdma_ops = { | |||
335 | 335 | ||
336 | static int sudmac_probe(struct platform_device *pdev) | 336 | static int sudmac_probe(struct platform_device *pdev) |
337 | { | 337 | { |
338 | struct sudmac_pdata *pdata = pdev->dev.platform_data; | 338 | struct sudmac_pdata *pdata = dev_get_platdata(&pdev->dev); |
339 | int err, i; | 339 | int err, i; |
340 | struct sudmac_device *su_dev; | 340 | struct sudmac_device *su_dev; |
341 | struct dma_device *dma_dev; | 341 | struct dma_device *dma_dev; |
@@ -373,7 +373,7 @@ static int sudmac_probe(struct platform_device *pdev) | |||
373 | return err; | 373 | return err; |
374 | 374 | ||
375 | /* platform data */ | 375 | /* platform data */ |
376 | su_dev->pdata = pdev->dev.platform_data; | 376 | su_dev->pdata = dev_get_platdata(&pdev->dev); |
377 | 377 | ||
378 | platform_set_drvdata(pdev, su_dev); | 378 | platform_set_drvdata(pdev, su_dev); |
379 | 379 | ||
diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index 5ab5880d5c90..0036756795d1 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c | |||
@@ -3139,7 +3139,7 @@ static int __init d40_phy_res_init(struct d40_base *base) | |||
3139 | 3139 | ||
3140 | static struct d40_base * __init d40_hw_detect_init(struct platform_device *pdev) | 3140 | static struct d40_base * __init d40_hw_detect_init(struct platform_device *pdev) |
3141 | { | 3141 | { |
3142 | struct stedma40_platform_data *plat_data = pdev->dev.platform_data; | 3142 | struct stedma40_platform_data *plat_data = dev_get_platdata(&pdev->dev); |
3143 | struct clk *clk = NULL; | 3143 | struct clk *clk = NULL; |
3144 | void __iomem *virtbase = NULL; | 3144 | void __iomem *virtbase = NULL; |
3145 | struct resource *res = NULL; | 3145 | struct resource *res = NULL; |
@@ -3535,7 +3535,7 @@ static int __init d40_of_probe(struct platform_device *pdev, | |||
3535 | 3535 | ||
3536 | static int __init d40_probe(struct platform_device *pdev) | 3536 | static int __init d40_probe(struct platform_device *pdev) |
3537 | { | 3537 | { |
3538 | struct stedma40_platform_data *plat_data = pdev->dev.platform_data; | 3538 | struct stedma40_platform_data *plat_data = dev_get_platdata(&pdev->dev); |
3539 | struct device_node *np = pdev->dev.of_node; | 3539 | struct device_node *np = pdev->dev.of_node; |
3540 | int ret = -ENOENT; | 3540 | int ret = -ENOENT; |
3541 | struct d40_base *base = NULL; | 3541 | struct d40_base *base = NULL; |
diff --git a/drivers/dma/timb_dma.c b/drivers/dma/timb_dma.c index 0ef43c136aa7..28af214fce04 100644 --- a/drivers/dma/timb_dma.c +++ b/drivers/dma/timb_dma.c | |||
@@ -669,7 +669,7 @@ static irqreturn_t td_irq(int irq, void *devid) | |||
669 | 669 | ||
670 | static int td_probe(struct platform_device *pdev) | 670 | static int td_probe(struct platform_device *pdev) |
671 | { | 671 | { |
672 | struct timb_dma_platform_data *pdata = pdev->dev.platform_data; | 672 | struct timb_dma_platform_data *pdata = dev_get_platdata(&pdev->dev); |
673 | struct timb_dma *td; | 673 | struct timb_dma *td; |
674 | struct resource *iomem; | 674 | struct resource *iomem; |
675 | int irq; | 675 | int irq; |
diff --git a/drivers/dma/txx9dmac.c b/drivers/dma/txx9dmac.c index 59357db62359..71e8e775189e 100644 --- a/drivers/dma/txx9dmac.c +++ b/drivers/dma/txx9dmac.c | |||
@@ -1117,9 +1117,10 @@ static void txx9dmac_off(struct txx9dmac_dev *ddev) | |||
1117 | 1117 | ||
1118 | static int __init txx9dmac_chan_probe(struct platform_device *pdev) | 1118 | static int __init txx9dmac_chan_probe(struct platform_device *pdev) |
1119 | { | 1119 | { |
1120 | struct txx9dmac_chan_platform_data *cpdata = pdev->dev.platform_data; | 1120 | struct txx9dmac_chan_platform_data *cpdata = |
1121 | dev_get_platdata(&pdev->dev); | ||
1121 | struct platform_device *dmac_dev = cpdata->dmac_dev; | 1122 | struct platform_device *dmac_dev = cpdata->dmac_dev; |
1122 | struct txx9dmac_platform_data *pdata = dmac_dev->dev.platform_data; | 1123 | struct txx9dmac_platform_data *pdata = dev_get_platdata(&dmac_dev->dev); |
1123 | struct txx9dmac_chan *dc; | 1124 | struct txx9dmac_chan *dc; |
1124 | int err; | 1125 | int err; |
1125 | int ch = pdev->id % TXX9_DMA_MAX_NR_CHANNELS; | 1126 | int ch = pdev->id % TXX9_DMA_MAX_NR_CHANNELS; |
@@ -1202,7 +1203,7 @@ static int txx9dmac_chan_remove(struct platform_device *pdev) | |||
1202 | 1203 | ||
1203 | static int __init txx9dmac_probe(struct platform_device *pdev) | 1204 | static int __init txx9dmac_probe(struct platform_device *pdev) |
1204 | { | 1205 | { |
1205 | struct txx9dmac_platform_data *pdata = pdev->dev.platform_data; | 1206 | struct txx9dmac_platform_data *pdata = dev_get_platdata(&pdev->dev); |
1206 | struct resource *io; | 1207 | struct resource *io; |
1207 | struct txx9dmac_dev *ddev; | 1208 | struct txx9dmac_dev *ddev; |
1208 | u32 mcr; | 1209 | u32 mcr; |
@@ -1281,7 +1282,7 @@ static int txx9dmac_resume_noirq(struct device *dev) | |||
1281 | { | 1282 | { |
1282 | struct platform_device *pdev = to_platform_device(dev); | 1283 | struct platform_device *pdev = to_platform_device(dev); |
1283 | struct txx9dmac_dev *ddev = platform_get_drvdata(pdev); | 1284 | struct txx9dmac_dev *ddev = platform_get_drvdata(pdev); |
1284 | struct txx9dmac_platform_data *pdata = pdev->dev.platform_data; | 1285 | struct txx9dmac_platform_data *pdata = dev_get_platdata(&pdev->dev); |
1285 | u32 mcr; | 1286 | u32 mcr; |
1286 | 1287 | ||
1287 | mcr = TXX9_DMA_MCR_MSTEN | MCR_LE; | 1288 | mcr = TXX9_DMA_MCR_MSTEN | MCR_LE; |