lkml.org 
[lkml]   [2019]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] PCI: dwc: Add map irq callback
On Wed, Aug 14, 2019 at 02:56:49PM +0800, Dilip Kota wrote:
> Certain platforms like Intel need to configure
> registers to enable the interrupts.
> Map Irq callback helps to perform platform specific
> configurations while assigning or enabling the interrupts.

This seems to miss the hunk that actually assigns the map_irq
callback.

> diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c
> index f93252d0da5b..5880d2b72ef8 100644
> --- a/drivers/pci/controller/dwc/pcie-designware-host.c
> +++ b/drivers/pci/controller/dwc/pcie-designware-host.c
> @@ -470,7 +470,7 @@ int dw_pcie_host_init(struct pcie_port *pp)
> bridge->sysdata = pp;
> bridge->busnr = pp->root_bus_nr;
> bridge->ops = &dw_pcie_ops;
> - bridge->map_irq = of_irq_parse_and_map_pci;
> + bridge->map_irq = pp->map_irq ? pp->map_irq : of_irq_parse_and_map_pci;

Pleae just use a classic if / else to make the code a little easier
to read.

\
 
 \ /
  Last update: 2019-08-14 09:37    [W:0.066 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site