[PATCH] dmaengine: amba-pl08x: make filter check that the channel is owned by pl08x

Michał Mirosław mirqus at gmail.com
Wed Aug 31 04:47:44 EDT 2011


2011/8/31 Russell King - ARM Linux <linux at arm.linux.org.uk>:
> Before converting the dma channel to our private data structure, first
> check that the channel is indeed one which our driver registered.  We
> do this by ensuring that the underlying device is bound to our driver.
>
> This avoids potential oopses if we try to reference 'plchan->name'
> against a foreign drivers dma channel.
>
> Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
> ---
>  drivers/dma/amba-pl08x.c |   10 +++++++++-
>  1 files changed, 9 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c
> index be21e3f..91d4148 100644
> --- a/drivers/dma/amba-pl08x.c
> +++ b/drivers/dma/amba-pl08x.c
> @@ -92,6 +92,8 @@
>
>  #define DRIVER_NAME    "pl08xdmac"
>
> +static struct amba_driver pl08x_amba_driver;
> +

This will make C++ coders confused a bit. Valid C, though.

Best Regards,
Michał Mirosław



More information about the linux-arm-kernel mailing list