]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
dma: use dev_get_platdata()
authorJingoo Han <jg1.han@samsung.com>
Tue, 30 Jul 2013 08:09:11 +0000 (17:09 +0900)
committerVinod Koul <vinod.koul@intel.com>
Tue, 13 Aug 2013 11:26:41 +0000 (16:56 +0530)
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>
drivers/dma/imx-sdma.c
drivers/dma/iop-adma.c
drivers/dma/mv_xor.c
drivers/dma/pl330.c
drivers/dma/sh/shdma-of.c
drivers/dma/sh/shdma.c
drivers/dma/sh/sudmac.c
drivers/dma/ste_dma40.c
drivers/dma/timb_dma.c
drivers/dma/txx9dmac.c

index f45e0928852b9dda3d3092ceebc420299320f3b9..b331ebb4d1d52c58f0600b9dedb76a37fa04090e 100644 (file)
@@ -1332,7 +1332,7 @@ static int __init sdma_probe(struct platform_device *pdev)
        int ret;
        int irq;
        struct resource *iores;
-       struct sdma_platform_data *pdata = pdev->dev.platform_data;
+       struct sdma_platform_data *pdata = dev_get_platdata(&pdev->dev);
        int i;
        struct sdma_engine *sdma;
        s32 *saddr_arr;
index cc727ec78c4e4ed668a2eb341d7eeb228bf84a98..dd8b44a56e5d0f7090b8dd65bce87a73a60c90ef 100644 (file)
@@ -518,7 +518,7 @@ static int iop_adma_alloc_chan_resources(struct dma_chan *chan)
        struct iop_adma_desc_slot *slot = NULL;
        int init = iop_chan->slots_allocated ? 0 : 1;
        struct iop_adma_platform_data *plat_data =
-               iop_chan->device->pdev->dev.platform_data;
+               dev_get_platdata(&iop_chan->device->pdev->dev);
        int num_descs_in_pool = plat_data->pool_size/IOP_ADMA_SLOT_SIZE;
 
        /* Allocate descriptor slots */
@@ -1351,7 +1351,7 @@ static int iop_adma_remove(struct platform_device *dev)
        struct iop_adma_device *device = platform_get_drvdata(dev);
        struct dma_chan *chan, *_chan;
        struct iop_adma_chan *iop_chan;
-       struct iop_adma_platform_data *plat_data = dev->dev.platform_data;
+       struct iop_adma_platform_data *plat_data = dev_get_platdata(&dev->dev);
 
        dma_async_device_unregister(&device->common);
 
@@ -1376,7 +1376,7 @@ static int iop_adma_probe(struct platform_device *pdev)
        struct iop_adma_device *adev;
        struct iop_adma_chan *iop_chan;
        struct dma_device *dma_dev;
-       struct iop_adma_platform_data *plat_data = pdev->dev.platform_data;
+       struct iop_adma_platform_data *plat_data = dev_get_platdata(&pdev->dev);
 
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
        if (!res)
index 534e2febd2775d56134dcca3b8f62d55527c66fb..d9a26777a1b00ae8e36a898d27db0133bf41f3d5 100644 (file)
@@ -1166,7 +1166,7 @@ static int mv_xor_probe(struct platform_device *pdev)
 {
        const struct mbus_dram_target_info *dram;
        struct mv_xor_device *xordev;
-       struct mv_xor_platform_data *pdata = pdev->dev.platform_data;
+       struct mv_xor_platform_data *pdata = dev_get_platdata(&pdev->dev);
        struct resource *res;
        int i, ret;
 
index fa645d8250091943ba8d47aa42852b99b74ca1ce..d8c10449fb420e6415c60d5e8b99d00741cdf72b 100644 (file)
@@ -2908,7 +2908,7 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id)
        int i, ret, irq;
        int num_chan;
 
-       pdat = adev->dev.platform_data;
+       pdat = dev_get_platdata(&adev->dev);
 
        /* Allocate a new DMAC and its Channels */
        pdmac = devm_kzalloc(&adev->dev, sizeof(*pdmac), GFP_KERNEL);
index 11bcb05cd79c9eb6e9f6258d6d8cfcabc46bdf28..966aaab0b4d337b640396e9d63e313f54e59999f 100644 (file)
@@ -42,7 +42,7 @@ static struct dma_chan *shdma_of_xlate(struct of_phandle_args *dma_spec,
 
 static int shdma_of_probe(struct platform_device *pdev)
 {
-       const struct of_dev_auxdata *lookup = pdev->dev.platform_data;
+       const struct of_dev_auxdata *lookup = dev_get_platdata(&pdev->dev);
        int ret;
 
        if (!lookup)
index b67f45f5c2712a8c16be7afad085bd745649a708..b388b12f078e7c3515b823ec83623a8354e8bfa9 100644 (file)
@@ -660,7 +660,7 @@ static const struct shdma_ops sh_dmae_shdma_ops = {
 
 static int sh_dmae_probe(struct platform_device *pdev)
 {
-       struct sh_dmae_pdata *pdata = pdev->dev.platform_data;
+       struct sh_dmae_pdata *pdata = dev_get_platdata(&pdev->dev);
        unsigned long irqflags = IRQF_DISABLED,
                chan_flag[SH_DMAE_MAX_CHANNELS] = {};
        int errirq, chan_irq[SH_DMAE_MAX_CHANNELS];
index e7c94bbddb536b8e44822e684e7301487bb9ee94..c49441753d995464796e1686442ea042fa5b3a4d 100644 (file)
@@ -335,7 +335,7 @@ static const struct shdma_ops sudmac_shdma_ops = {
 
 static int sudmac_probe(struct platform_device *pdev)
 {
-       struct sudmac_pdata *pdata = pdev->dev.platform_data;
+       struct sudmac_pdata *pdata = dev_get_platdata(&pdev->dev);
        int err, i;
        struct sudmac_device *su_dev;
        struct dma_device *dma_dev;
@@ -373,7 +373,7 @@ static int sudmac_probe(struct platform_device *pdev)
                return err;
 
        /* platform data */
-       su_dev->pdata = pdev->dev.platform_data;
+       su_dev->pdata = dev_get_platdata(&pdev->dev);
 
        platform_set_drvdata(pdev, su_dev);
 
index 5ab5880d5c9041203bdb38a4d242c888777e8f2d..0036756795d10aa5d392111c0431776773c0972c 100644 (file)
@@ -3139,7 +3139,7 @@ static int __init d40_phy_res_init(struct d40_base *base)
 
 static struct d40_base * __init d40_hw_detect_init(struct platform_device *pdev)
 {
-       struct stedma40_platform_data *plat_data = pdev->dev.platform_data;
+       struct stedma40_platform_data *plat_data = dev_get_platdata(&pdev->dev);
        struct clk *clk = NULL;
        void __iomem *virtbase = NULL;
        struct resource *res = NULL;
@@ -3535,7 +3535,7 @@ static int __init d40_of_probe(struct platform_device *pdev,
 
 static int __init d40_probe(struct platform_device *pdev)
 {
-       struct stedma40_platform_data *plat_data = pdev->dev.platform_data;
+       struct stedma40_platform_data *plat_data = dev_get_platdata(&pdev->dev);
        struct device_node *np = pdev->dev.of_node;
        int ret = -ENOENT;
        struct d40_base *base = NULL;
index 0ef43c136aa7dbbd30c65b9b1ebb43984b1baea0..28af214fce049db85fc02fb903a748fdbef6e0a1 100644 (file)
@@ -669,7 +669,7 @@ static irqreturn_t td_irq(int irq, void *devid)
 
 static int td_probe(struct platform_device *pdev)
 {
-       struct timb_dma_platform_data *pdata = pdev->dev.platform_data;
+       struct timb_dma_platform_data *pdata = dev_get_platdata(&pdev->dev);
        struct timb_dma *td;
        struct resource *iomem;
        int irq;
index 59357db62359a96c298e4743ed27d00e74849d9c..71e8e775189e0df5568d474ea00157a2675f9260 100644 (file)
@@ -1117,9 +1117,10 @@ static void txx9dmac_off(struct txx9dmac_dev *ddev)
 
 static int __init txx9dmac_chan_probe(struct platform_device *pdev)
 {
-       struct txx9dmac_chan_platform_data *cpdata = pdev->dev.platform_data;
+       struct txx9dmac_chan_platform_data *cpdata =
+                       dev_get_platdata(&pdev->dev);
        struct platform_device *dmac_dev = cpdata->dmac_dev;
-       struct txx9dmac_platform_data *pdata = dmac_dev->dev.platform_data;
+       struct txx9dmac_platform_data *pdata = dev_get_platdata(&dmac_dev->dev);
        struct txx9dmac_chan *dc;
        int err;
        int ch = pdev->id % TXX9_DMA_MAX_NR_CHANNELS;
@@ -1202,7 +1203,7 @@ static int txx9dmac_chan_remove(struct platform_device *pdev)
 
 static int __init txx9dmac_probe(struct platform_device *pdev)
 {
-       struct txx9dmac_platform_data *pdata = pdev->dev.platform_data;
+       struct txx9dmac_platform_data *pdata = dev_get_platdata(&pdev->dev);
        struct resource *io;
        struct txx9dmac_dev *ddev;
        u32 mcr;
@@ -1281,7 +1282,7 @@ static int txx9dmac_resume_noirq(struct device *dev)
 {
        struct platform_device *pdev = to_platform_device(dev);
        struct txx9dmac_dev *ddev = platform_get_drvdata(pdev);
-       struct txx9dmac_platform_data *pdata = pdev->dev.platform_data;
+       struct txx9dmac_platform_data *pdata = dev_get_platdata(&pdev->dev);
        u32 mcr;
 
        mcr = TXX9_DMA_MCR_MSTEN | MCR_LE;