aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Shiyan <shc_work@mail.ru>2014-08-23 06:45:47 -0400
committerTejun Heo <tj@kernel.org>2014-08-23 13:05:08 -0400
commit53f3cc46336b9e514c98556b4a009a69ed808d3b (patch)
treeaaa6199a54836ae9d7f8c1021134b45feb6f1fdb
parentca99140a63b7326ee9a38f64c326317f2c63b594 (diff)
pata_platform: Remove useless irq_flags field
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>
-rw-r--r--arch/blackfin/mach-bf537/boards/cm_bf537e.c3
-rw-r--r--arch/blackfin/mach-bf537/boards/cm_bf537u.c3
-rw-r--r--arch/blackfin/mach-bf537/boards/stamp.c3
-rw-r--r--arch/blackfin/mach-bf537/boards/tcm_bf537.c3
-rw-r--r--arch/blackfin/mach-bf561/boards/cm_bf561.c3
-rw-r--r--drivers/ata/pata_of_platform.c2
-rw-r--r--drivers/ata/pata_platform.c4
-rw-r--r--include/linux/ata_platform.h5
8 files changed, 6 insertions, 20 deletions
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537e.c b/arch/blackfin/mach-bf537/boards/cm_bf537e.c
index 1e7290ef3525..1e1014df5e9e 100644
--- a/arch/blackfin/mach-bf537/boards/cm_bf537e.c
+++ b/arch/blackfin/mach-bf537/boards/cm_bf537e.c
@@ -733,7 +733,6 @@ static struct platform_device bfin_mac_device = {
733 733
734static struct pata_platform_info bfin_pata_platform_data = { 734static struct pata_platform_info bfin_pata_platform_data = {
735 .ioport_shift = 2, 735 .ioport_shift = 2,
736 .irq_type = IRQF_TRIGGER_HIGH,
737}; 736};
738 737
739static struct resource bfin_pata_resources[] = { 738static struct resource bfin_pata_resources[] = {
@@ -750,7 +749,7 @@ static struct resource bfin_pata_resources[] = {
750 { 749 {
751 .start = PATA_INT, 750 .start = PATA_INT,
752 .end = PATA_INT, 751 .end = PATA_INT,
753 .flags = IORESOURCE_IRQ, 752 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
754 }, 753 },
755}; 754};
756 755
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537u.c b/arch/blackfin/mach-bf537/boards/cm_bf537u.c
index c7495dc74690..d056db9e5592 100644
--- a/arch/blackfin/mach-bf537/boards/cm_bf537u.c
+++ b/arch/blackfin/mach-bf537/boards/cm_bf537u.c
@@ -587,7 +587,6 @@ static struct platform_device bfin_mac_device = {
587 587
588static struct pata_platform_info bfin_pata_platform_data = { 588static struct pata_platform_info bfin_pata_platform_data = {
589 .ioport_shift = 2, 589 .ioport_shift = 2,
590 .irq_type = IRQF_TRIGGER_HIGH,
591}; 590};
592 591
593static struct resource bfin_pata_resources[] = { 592static struct resource bfin_pata_resources[] = {
@@ -604,7 +603,7 @@ static struct resource bfin_pata_resources[] = {
604 { 603 {
605 .start = PATA_INT, 604 .start = PATA_INT,
606 .end = PATA_INT, 605 .end = PATA_INT,
607 .flags = IORESOURCE_IRQ, 606 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
608 }, 607 },
609}; 608};
610 609
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c
index de19b8a56007..88a19fc9844d 100644
--- a/arch/blackfin/mach-bf537/boards/stamp.c
+++ b/arch/blackfin/mach-bf537/boards/stamp.c
@@ -2462,7 +2462,6 @@ static struct platform_device bfin_sport0_device = {
2462#define PATA_INT IRQ_PF5 2462#define PATA_INT IRQ_PF5
2463static struct pata_platform_info bfin_pata_platform_data = { 2463static struct pata_platform_info bfin_pata_platform_data = {
2464 .ioport_shift = 1, 2464 .ioport_shift = 1,
2465 .irq_flags = IRQF_TRIGGER_HIGH,
2466}; 2465};
2467 2466
2468static struct resource bfin_pata_resources[] = { 2467static struct resource bfin_pata_resources[] = {
@@ -2479,7 +2478,7 @@ static struct resource bfin_pata_resources[] = {
2479 { 2478 {
2480 .start = PATA_INT, 2479 .start = PATA_INT,
2481 .end = PATA_INT, 2480 .end = PATA_INT,
2482 .flags = IORESOURCE_IRQ, 2481 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
2483 }, 2482 },
2484}; 2483};
2485#elif defined(CF_IDE_NAND_CARD_USE_CF_IN_COMMON_MEMORY_MODE) 2484#elif defined(CF_IDE_NAND_CARD_USE_CF_IN_COMMON_MEMORY_MODE)
diff --git a/arch/blackfin/mach-bf537/boards/tcm_bf537.c b/arch/blackfin/mach-bf537/boards/tcm_bf537.c
index 6b988ad653d8..ed309c9a62b6 100644
--- a/arch/blackfin/mach-bf537/boards/tcm_bf537.c
+++ b/arch/blackfin/mach-bf537/boards/tcm_bf537.c
@@ -589,7 +589,6 @@ static struct platform_device bfin_mac_device = {
589 589
590static struct pata_platform_info bfin_pata_platform_data = { 590static struct pata_platform_info bfin_pata_platform_data = {
591 .ioport_shift = 2, 591 .ioport_shift = 2,
592 .irq_type = IRQF_TRIGGER_HIGH,
593}; 592};
594 593
595static struct resource bfin_pata_resources[] = { 594static struct resource bfin_pata_resources[] = {
@@ -606,7 +605,7 @@ static struct resource bfin_pata_resources[] = {
606 { 605 {
607 .start = PATA_INT, 606 .start = PATA_INT,
608 .end = PATA_INT, 607 .end = PATA_INT,
609 .flags = IORESOURCE_IRQ, 608 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
610 }, 609 },
611}; 610};
612 611
diff --git a/arch/blackfin/mach-bf561/boards/cm_bf561.c b/arch/blackfin/mach-bf561/boards/cm_bf561.c
index e862f7823e68..c6db52ba3a06 100644
--- a/arch/blackfin/mach-bf561/boards/cm_bf561.c
+++ b/arch/blackfin/mach-bf561/boards/cm_bf561.c
@@ -354,7 +354,6 @@ static struct platform_device bfin_sir0_device = {
354 354
355static struct pata_platform_info bfin_pata_platform_data = { 355static struct pata_platform_info bfin_pata_platform_data = {
356 .ioport_shift = 2, 356 .ioport_shift = 2,
357 .irq_type = IRQF_TRIGGER_HIGH,
358}; 357};
359 358
360static struct resource bfin_pata_resources[] = { 359static struct resource bfin_pata_resources[] = {
@@ -371,7 +370,7 @@ static struct resource bfin_pata_resources[] = {
371 { 370 {
372 .start = PATA_INT, 371 .start = PATA_INT,
373 .end = PATA_INT, 372 .end = PATA_INT,
374 .flags = IORESOURCE_IRQ, 373 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
375 }, 374 },
376}; 375};
377 376
diff --git a/drivers/ata/pata_of_platform.c b/drivers/ata/pata_of_platform.c
index 6af1c9b9a464..64965398914a 100644
--- a/drivers/ata/pata_of_platform.c
+++ b/drivers/ata/pata_of_platform.c
@@ -43,8 +43,6 @@ static int pata_of_platform_probe(struct platform_device *ofdev)
43 } 43 }
44 44
45 irq_res = platform_get_resource(ofdev, IORESOURCE_IRQ, 0); 45 irq_res = platform_get_resource(ofdev, IORESOURCE_IRQ, 0);
46 if (irq_res)
47 irq_res->flags = 0;
48 46
49 prop = of_get_property(dn, "reg-shift", NULL); 47 prop = of_get_property(dn, "reg-shift", NULL);
50 if (prop) 48 if (prop)
diff --git a/drivers/ata/pata_platform.c b/drivers/ata/pata_platform.c
index a5579b55e332..f8cff3e247c5 100644
--- a/drivers/ata/pata_platform.c
+++ b/drivers/ata/pata_platform.c
@@ -118,7 +118,7 @@ int __pata_platform_probe(struct device *dev, struct resource *io_res,
118 */ 118 */
119 if (irq_res && irq_res->start > 0) { 119 if (irq_res && irq_res->start > 0) {
120 irq = irq_res->start; 120 irq = irq_res->start;
121 irq_flags = irq_res->flags; 121 irq_flags = irq_res->flags & IRQF_TRIGGER_MASK;
122 } 122 }
123 123
124 /* 124 /*
@@ -213,8 +213,6 @@ static int pata_platform_probe(struct platform_device *pdev)
213 * And the IRQ 213 * And the IRQ
214 */ 214 */
215 irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); 215 irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
216 if (irq_res)
217 irq_res->flags = pp_info ? pp_info->irq_flags : 0;
218 216
219 return __pata_platform_probe(&pdev->dev, io_res, ctl_res, irq_res, 217 return __pata_platform_probe(&pdev->dev, io_res, ctl_res, irq_res,
220 pp_info ? pp_info->ioport_shift : 0, 218 pp_info ? pp_info->ioport_shift : 0,
diff --git a/include/linux/ata_platform.h b/include/linux/ata_platform.h
index b9fde17f767c..5c618a084225 100644
--- a/include/linux/ata_platform.h
+++ b/include/linux/ata_platform.h
@@ -8,11 +8,6 @@ struct pata_platform_info {
8 * spacing used by ata_std_ports(). 8 * spacing used by ata_std_ports().
9 */ 9 */
10 unsigned int ioport_shift; 10 unsigned int ioport_shift;
11 /*
12 * Indicate platform specific irq types and initial
13 * IRQ flags when call request_irq()
14 */
15 unsigned int irq_flags;
16}; 11};
17 12
18extern int __pata_platform_probe(struct device *dev, 13extern int __pata_platform_probe(struct device *dev,