mmc: sh_mmcif: rework dma channel handling
authorArnd Bergmann <arnd@arndb.de>
Mon, 16 Nov 2015 16:08:41 +0000 (17:08 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 22 Dec 2015 10:32:08 +0000 (11:32 +0100)
commit27cbd7e815a8e223ff7c4fe56daca724101288ac
tree266ebb891eef1311d145ade805e21fde3b8f8a72
parent2e4456f08fa81b9a4804379c56c7ef02c0b0d8f0
mmc: sh_mmcif: rework dma channel handling

When compiling the sh_mmcif driver for ARM64, we currently
get a harmless build warning:

../drivers/mmc/host/sh_mmcif.c: In function 'sh_mmcif_request_dma_one':
../drivers/mmc/host/sh_mmcif.c:417:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    (void *)pdata->slave_id_tx :
    ^
../drivers/mmc/host/sh_mmcif.c:418:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    (void *)pdata->slave_id_rx;

This could be worked around by adding another cast to uintptr_t, but
I decided to simplify the code a little more to avoid that. This
splits out the platform data using code into a separate function
and builds that only for CONFIG_SUPERH. This part still has a typecast
but does not need a second one. The SH platform code could be further
modified to pass a pointer directly as we do on other architectures
when we have a filter function.

The normal case is simplified further and now just calls
dma_request_slave_channel() directly without going through the
compat handling.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sh_mmcif.c
This page took 0.024843 seconds and 5 git commands to generate.