lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOh2x=m9TyMOhh=nCD0nznEBy6jN7eUddp7hLT7TnCf0xM07dA@mail.gmail.com>
Date:	Mon, 12 Nov 2012 19:24:49 +0530
From:	viresh kumar <viresh.kumar@...aro.org>
To:	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:	Vinod Koul <vinod.koul@...el.com>, linux-kernel@...r.kernel.org,
	spear-devel <spear-devel@...t.st.com>
Subject: Re: [PATCH] dw_dmac: absence of pdata isn't critical when autocfg is set

On Mon, Nov 12, 2012 at 4:53 PM, Andy Shevchenko
<andriy.shevchenko@...ux.intel.com> wrote:
> diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c

>  static int __devinit dw_probe(struct platform_device *pdev)
>  {
>         struct dw_dma_platform_data *pdata;
> @@ -1604,9 +1610,6 @@ static int __devinit dw_probe(struct platform_device *pdev)
>         if (!pdata)
>                 pdata = dw_dma_parse_dt(pdev);
>
> -       if (!pdata || pdata->nr_channels > DW_DMA_MAX_NR_CHANNELS)
> -               return -EINVAL;
> -
>         io = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>         if (!io)
>                 return -EINVAL;
> @@ -1622,6 +1625,12 @@ static int __devinit dw_probe(struct platform_device *pdev)
>         dw_params = dma_read_byaddr(regs, DW_PARAMS);
>         autocfg = dw_params >> DW_PARAMS_EN & 0x1;
>
> +       if (!pdata && autocfg)
> +               pdata = &dw_dma_pdata;

Allocate it dynamically to support multiple controllers with different
configuration
in a SoC.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ