Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 282117
b: refs/heads/master
c: d0643aa
h: refs/heads/master
i:
  282115: 1cbf5cc
v: v3
  • Loading branch information
Rob Herring authored and Jeff Garzik committed Jan 9, 2012
1 parent bcf5cff commit 73a298a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 99c8ea3e57e7b5551ffd9cd401c4bf302b5664e3
refs/heads/master: d0643aa16688131b4dfbd03797ad73bab4ff29bf
2 changes: 1 addition & 1 deletion trunk/drivers/ata/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ config PATA_PLATFORM

config PATA_OF_PLATFORM
tristate "OpenFirmware platform device PATA support"
depends on PATA_PLATFORM && OF && OF_IRQ
depends on PATA_PLATFORM && OF
help
This option enables support for generic directly connected ATA
devices commonly found on embedded systems with OpenFirmware
Expand Down
15 changes: 6 additions & 9 deletions trunk/drivers/ata/pata_of_platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of_address.h>
#include <linux/of_irq.h>
#include <linux/of_platform.h>
#include <linux/platform_device.h>
#include <linux/ata_platform.h>

static int __devinit pata_of_platform_probe(struct platform_device *ofdev)
Expand All @@ -22,7 +21,7 @@ static int __devinit pata_of_platform_probe(struct platform_device *ofdev)
struct device_node *dn = ofdev->dev.of_node;
struct resource io_res;
struct resource ctl_res;
struct resource irq_res;
struct resource *irq_res;
unsigned int reg_shift = 0;
int pio_mode = 0;
int pio_mask;
Expand Down Expand Up @@ -51,11 +50,9 @@ static int __devinit pata_of_platform_probe(struct platform_device *ofdev)
}
}

ret = of_irq_to_resource(dn, 0, &irq_res);
if (!ret)
irq_res.start = irq_res.end = 0;
else
irq_res.flags = 0;
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)
Expand All @@ -75,7 +72,7 @@ static int __devinit pata_of_platform_probe(struct platform_device *ofdev)
pio_mask = 1 << pio_mode;
pio_mask |= (1 << pio_mode) - 1;

return __pata_platform_probe(&ofdev->dev, &io_res, &ctl_res, &irq_res,
return __pata_platform_probe(&ofdev->dev, &io_res, &ctl_res, irq_res,
reg_shift, pio_mask);
}

Expand Down

0 comments on commit 73a298a

Please sign in to comment.