• F
    iio: adc: stm32-adc: fix device used to request dma · 52cd91c2
    Fabrice Gasnier 提交于
    DMA channel request should use device struct from platform device struct.
    Currently it's using iio device struct. But at this stage when probing,
    device struct isn't yet registered (e.g. device_register is done in
    iio_device_register). Since commit 71723a96 ("dmaengine: Create
    symlinks between DMA channels and slaves"), a warning message is printed
    as the links in sysfs can't be created, due to device isn't yet registered:
    - Cannot create DMA slave symlink
    - Cannot create DMA dma:rx symlink
    
    Fix this by using device struct from platform device to request dma chan.
    
    Fixes: 2763ea05 ("iio: adc: stm32: add optional dma support")
    Signed-off-by: NFabrice Gasnier <fabrice.gasnier@st.com>
    Cc: <Stable@vger.kernel.org>
    Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
    52cd91c2
stm32-adc.c 56.9 KB