]> git.karo-electronics.de Git - linux-beck.git/commitdiff
pata_platform: Remove useless irq_flags field
authorAlexander Shiyan <shc_work@mail.ru>
Sat, 23 Aug 2014 10:45:47 +0000 (14:45 +0400)
committerTejun Heo <tj@kernel.org>
Sat, 23 Aug 2014 17:05:08 +0000 (13:05 -0400)
IRQ flags can be obtained from resource structure, there are no need
to use additional field in the platform_data to store these values.
This patch removes this field and convert existing users of this driver
to use IRQ flags from the resources.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Tejun Heo <tj@kernel.org>
arch/blackfin/mach-bf537/boards/cm_bf537e.c
arch/blackfin/mach-bf537/boards/cm_bf537u.c
arch/blackfin/mach-bf537/boards/stamp.c
arch/blackfin/mach-bf537/boards/tcm_bf537.c
arch/blackfin/mach-bf561/boards/cm_bf561.c
drivers/ata/pata_of_platform.c
drivers/ata/pata_platform.c
include/linux/ata_platform.h

index 1e7290ef35258da56c5521ed23a1b637286b7342..1e1014df5e9e42aca573dfae5965e80250881eb6 100644 (file)
@@ -733,7 +733,6 @@ static struct platform_device bfin_mac_device = {
 
 static struct pata_platform_info bfin_pata_platform_data = {
        .ioport_shift = 2,
-       .irq_type = IRQF_TRIGGER_HIGH,
 };
 
 static struct resource bfin_pata_resources[] = {
@@ -750,7 +749,7 @@ static struct resource bfin_pata_resources[] = {
        {
                .start = PATA_INT,
                .end = PATA_INT,
-               .flags = IORESOURCE_IRQ,
+               .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
        },
 };
 
index c7495dc74690db99f52bfa30c94c62dd5faae63c..d056db9e559279ac73395b343bb21a00fb260278 100644 (file)
@@ -587,7 +587,6 @@ static struct platform_device bfin_mac_device = {
 
 static struct pata_platform_info bfin_pata_platform_data = {
        .ioport_shift = 2,
-       .irq_type = IRQF_TRIGGER_HIGH,
 };
 
 static struct resource bfin_pata_resources[] = {
@@ -604,7 +603,7 @@ static struct resource bfin_pata_resources[] = {
        {
                .start = PATA_INT,
                .end = PATA_INT,
-               .flags = IORESOURCE_IRQ,
+               .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
        },
 };
 
index de19b8a56007b60e8b2fd3c435ed870b6c5c173c..88a19fc9844d8395900dd94b48e6a22fec30767a 100644 (file)
@@ -2462,7 +2462,6 @@ static struct platform_device bfin_sport0_device = {
 #define PATA_INT       IRQ_PF5
 static struct pata_platform_info bfin_pata_platform_data = {
        .ioport_shift = 1,
-       .irq_flags = IRQF_TRIGGER_HIGH,
 };
 
 static struct resource bfin_pata_resources[] = {
@@ -2479,7 +2478,7 @@ static struct resource bfin_pata_resources[] = {
        {
                .start = PATA_INT,
                .end = PATA_INT,
-               .flags = IORESOURCE_IRQ,
+               .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
        },
 };
 #elif defined(CF_IDE_NAND_CARD_USE_CF_IN_COMMON_MEMORY_MODE)
index 6b988ad653d8d1e69a1721ddfe4b7208bf7cebb9..ed309c9a62b676625750a40d37d79036a4800aa4 100644 (file)
@@ -589,7 +589,6 @@ static struct platform_device bfin_mac_device = {
 
 static struct pata_platform_info bfin_pata_platform_data = {
        .ioport_shift = 2,
-       .irq_type = IRQF_TRIGGER_HIGH,
 };
 
 static struct resource bfin_pata_resources[] = {
@@ -606,7 +605,7 @@ static struct resource bfin_pata_resources[] = {
        {
                .start = PATA_INT,
                .end = PATA_INT,
-               .flags = IORESOURCE_IRQ,
+               .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
        },
 };
 
index e862f7823e68db1b5ea374a295982c23db2800c8..c6db52ba3a06653e8b6a22a277c607d82c69de46 100644 (file)
@@ -354,7 +354,6 @@ static struct platform_device bfin_sir0_device = {
 
 static struct pata_platform_info bfin_pata_platform_data = {
        .ioport_shift = 2,
-       .irq_type = IRQF_TRIGGER_HIGH,
 };
 
 static struct resource bfin_pata_resources[] = {
@@ -371,7 +370,7 @@ static struct resource bfin_pata_resources[] = {
        {
                .start = PATA_INT,
                .end = PATA_INT,
-               .flags = IORESOURCE_IRQ,
+               .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
        },
 };
 
index 6af1c9b9a464092114f4b60a9add28c2a2f7db45..64965398914a7b28cf78b11cffd2e129c7de5890 100644 (file)
@@ -43,8 +43,6 @@ static int pata_of_platform_probe(struct platform_device *ofdev)
        }
 
        irq_res = platform_get_resource(ofdev, IORESOURCE_IRQ, 0);
-       if (irq_res)
-               irq_res->flags = 0;
 
        prop = of_get_property(dn, "reg-shift", NULL);
        if (prop)
index a5579b55e3329ee395cfbddd30eb034711e0aab1..f8cff3e247c525c339110c3b452d9fb3bc03bd7e 100644 (file)
@@ -118,7 +118,7 @@ int __pata_platform_probe(struct device *dev, struct resource *io_res,
         */
        if (irq_res && irq_res->start > 0) {
                irq = irq_res->start;
-               irq_flags = irq_res->flags;
+               irq_flags = irq_res->flags & IRQF_TRIGGER_MASK;
        }
 
        /*
@@ -213,8 +213,6 @@ static int pata_platform_probe(struct platform_device *pdev)
         * And the IRQ
         */
        irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
-       if (irq_res)
-               irq_res->flags = pp_info ? pp_info->irq_flags : 0;
 
        return __pata_platform_probe(&pdev->dev, io_res, ctl_res, irq_res,
                                     pp_info ? pp_info->ioport_shift : 0,
index b9fde17f767cf654479759b66e22ec9828206ed3..5c618a084225ebda350e969931434b5a26846448 100644 (file)
@@ -8,11 +8,6 @@ struct pata_platform_info {
         * spacing used by ata_std_ports().
         */
        unsigned int ioport_shift;
-       /* 
-        * Indicate platform specific irq types and initial
-        * IRQ flags when call request_irq()
-        */
-       unsigned int irq_flags;
 };
 
 extern int __pata_platform_probe(struct device *dev,