lkml.org 
[lkml]   [2014]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[Patch Part1 v3 19/20] iommu/amd: Use helpers to access irq_cfg data structure associated with IRQ
    Date
    Use helpers to access irq_cfg data structure associated with IRQ,
    instead of accessing irq_data->chip_data directly. Later we could
    rewrite those helpers to support hierarchy irqdomain.

    Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
    ---
    drivers/iommu/amd_iommu.c | 14 +++++++-------
    1 file changed, 7 insertions(+), 7 deletions(-)

    diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
    index 505a9adac2d5..6fda7cc789eb 100644
    --- a/drivers/iommu/amd_iommu.c
    +++ b/drivers/iommu/amd_iommu.c
    @@ -4068,7 +4068,7 @@ static int setup_ioapic_entry(int irq, struct IO_APIC_route_entry *entry,
    int devid;
    int ret;

    - cfg = irq_get_chip_data(irq);
    + cfg = irq_cfg(irq);
    if (!cfg)
    return -EINVAL;

    @@ -4131,7 +4131,7 @@ static int set_affinity(struct irq_data *data, const struct cpumask *mask,
    if (!config_enabled(CONFIG_SMP))
    return -1;

    - cfg = data->chip_data;
    + cfg = irqd_cfg(data);
    irq = data->irq;
    irte_info = &cfg->irq_2_irte;

    @@ -4169,7 +4169,7 @@ static int free_irq(int irq)
    struct irq_2_irte *irte_info;
    struct irq_cfg *cfg;

    - cfg = irq_get_chip_data(irq);
    + cfg = irq_cfg(irq);
    if (!cfg)
    return -EINVAL;

    @@ -4188,7 +4188,7 @@ static void compose_msi_msg(struct pci_dev *pdev,
    struct irq_cfg *cfg;
    union irte irte;

    - cfg = irq_get_chip_data(irq);
    + cfg = irq_cfg(irq);
    if (!cfg)
    return;

    @@ -4217,7 +4217,7 @@ static int msi_alloc_irq(struct pci_dev *pdev, int irq, int nvec)
    if (!pdev)
    return -EINVAL;

    - cfg = irq_get_chip_data(irq);
    + cfg = irq_cfg(irq);
    if (!cfg)
    return -EINVAL;

    @@ -4237,7 +4237,7 @@ static int msi_setup_irq(struct pci_dev *pdev, unsigned int irq,
    if (!pdev)
    return -EINVAL;

    - cfg = irq_get_chip_data(irq);
    + cfg = irq_cfg(irq);
    if (!cfg)
    return -EINVAL;

    @@ -4260,7 +4260,7 @@ static int alloc_hpet_msi(unsigned int irq, unsigned int id)
    struct irq_cfg *cfg;
    int index, devid;

    - cfg = irq_get_chip_data(irq);
    + cfg = irq_cfg(irq);
    if (!cfg)
    return -EINVAL;

    --
    1.7.10.4


    \
     
     \ /
      Last update: 2014-10-27 09:41    [W:4.080 / U:0.236 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site