dmaengine: hidma: Constify returned by device_get_match_data() value
PATCH v2 5/6 dmaengine: hidma: Constify returned by device_get_match_data() value
Quoted 3 lines · Andy Shevchenko
The value under the hood is constant in any case. It makes sense to show this explicitly.
This patch is wrong, sorry.
Quoted 28 lines
Fixes 95fbfb7aa28d ("dmaengine: qcom_hidma: Add support for the newrevision")
Cc Sinan Kaya <[email protected]>Cc Sakari Ailus <[email protected]>Cc Vinod Koul <[email protected]>Signed-off-by Andy Shevchenko <[email protected]>--- drivers/dma/qcom/hidma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/dma/qcom/hidma.c +2
-2@@ -743,9 +743,9 @@ static int hidma_request_msi(struct hidma_dev *dmadev, static bool hidma_test_capability(struct device *dev, enum hidma_cap test_cap) { -enum hidma_cap cap; +const enum hidma_cap cap; - cap = (enum hidma_cap )device_get_match_data (dev); + cap = (const enum hidma_cap )device_get_match_data (dev);return cap ? ((cap & test_cap) >0 ) :0 ;}