dmaengine: edma: Fix of_device_id data parameter usage (legacy vs TPCC)

Use pointers to static constant variables for eDMA binding
type (legacy vs TPCC).

Fixes the following warning when compiling the driver for 64bit
architectures (x86_64 for example):
drivers/dma/edma.c:2185:16: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   if (match && (u32)match->data == EDMA_BINDING_TPCC)
                ^

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
This commit is contained in:
Peter Ujfalusi 2016-09-21 15:41:28 +03:00 committed by Vinod Koul
parent 8673751078
commit b7862742fe
1 changed files with 8 additions and 3 deletions

View File

@ -263,14 +263,19 @@ static const struct edmacc_param dummy_paramset = {
#define EDMA_BINDING_LEGACY 0 #define EDMA_BINDING_LEGACY 0
#define EDMA_BINDING_TPCC 1 #define EDMA_BINDING_TPCC 1
static const u32 edma_binding_type[] = {
[EDMA_BINDING_LEGACY] = EDMA_BINDING_LEGACY,
[EDMA_BINDING_TPCC] = EDMA_BINDING_TPCC,
};
static const struct of_device_id edma_of_ids[] = { static const struct of_device_id edma_of_ids[] = {
{ {
.compatible = "ti,edma3", .compatible = "ti,edma3",
.data = (void *)EDMA_BINDING_LEGACY, .data = &edma_binding_type[EDMA_BINDING_LEGACY],
}, },
{ {
.compatible = "ti,edma3-tpcc", .compatible = "ti,edma3-tpcc",
.data = (void *)EDMA_BINDING_TPCC, .data = &edma_binding_type[EDMA_BINDING_TPCC],
}, },
{} {}
}; };
@ -2184,7 +2189,7 @@ static int edma_probe(struct platform_device *pdev)
const struct of_device_id *match; const struct of_device_id *match;
match = of_match_node(edma_of_ids, node); match = of_match_node(edma_of_ids, node);
if (match && (u32)match->data == EDMA_BINDING_TPCC) if (match && (*(u32 *)match->data) == EDMA_BINDING_TPCC)
legacy_mode = false; legacy_mode = false;
info = edma_setup_info_from_dt(dev, legacy_mode); info = edma_setup_info_from_dt(dev, legacy_mode);