Skip to content

Commit

Permalink
mfd: Inherit coherent_dma_mask from parent device
Browse files Browse the repository at this point in the history
dma_mask and dma_parms are already inherited from the parent device but
dma_coherent_mask was left uninitialized (set to zero thanks to kzalloc).
Set sub-device coherent_dma_mask to its parent value to simplify
sub-drivers making use of dma coherent helper functions (those drivers
currently have to explicitly set the dma coherent mask using
dma_set_coherent_mask function).

Signed-off-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
  • Loading branch information
Boris BREZILLON authored and Lee Jones committed Sep 26, 2014
1 parent ab27c44 commit 4f08df1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/mfd/mfd-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ static int mfd_add_device(struct device *parent, int id,
pdev->dev.type = &mfd_dev_type;
pdev->dev.dma_mask = parent->dma_mask;
pdev->dev.dma_parms = parent->dma_parms;
pdev->dev.coherent_dma_mask = parent->coherent_dma_mask;

ret = regulator_bulk_register_supply_alias(
&pdev->dev, cell->parent_supplies,
Expand Down

0 comments on commit 4f08df1

Please sign in to comment.