linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ata: Make pata_of_platform.c compile again and work on non-PPC platforms
@ 2011-09-07 12:36 Pawel Moll
  2011-09-12 14:22 ` Anton Vorontsov
  0 siblings, 1 reply; 2+ messages in thread
From: Pawel Moll @ 2011-09-07 12:36 UTC (permalink / raw)
  To: linux-ide; +Cc: Anton Vorontsov

This patch adds missing #includes, makes the driver selectable on
non-PPC OF-enabled platforms and fixes property value accesses to
be correct in Little Endian system.

Cc: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Pawel Moll <pawel.moll@arm.com>
---
 drivers/ata/Kconfig            |    2 +-
 drivers/ata/pata_of_platform.c |    6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index 5987e0b..c6ef9d0 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -820,7 +820,7 @@ config PATA_PLATFORM
 
 config PATA_OF_PLATFORM
 	tristate "OpenFirmware platform device PATA support"
-	depends on PATA_PLATFORM && PPC_OF
+	depends on PATA_PLATFORM && OF
 	help
 	  This option enables support for generic directly connected ATA
 	  devices commonly found on embedded systems with OpenFirmware
diff --git a/drivers/ata/pata_of_platform.c b/drivers/ata/pata_of_platform.c
index f305400..a72ab0d 100644
--- a/drivers/ata/pata_of_platform.c
+++ b/drivers/ata/pata_of_platform.c
@@ -11,6 +11,8 @@
 
 #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/ata_platform.h>
 
@@ -57,11 +59,11 @@ static int __devinit pata_of_platform_probe(struct platform_device *ofdev)
 
 	prop = of_get_property(dn, "reg-shift", NULL);
 	if (prop)
-		reg_shift = *prop;
+		reg_shift = be32_to_cpup(prop);
 
 	prop = of_get_property(dn, "pio-mode", NULL);
 	if (prop) {
-		pio_mode = *prop;
+		pio_mode = be32_to_cpup(prop);
 		if (pio_mode > 6) {
 			dev_err(&ofdev->dev, "invalid pio-mode\n");
 			return -EINVAL;
-- 
1.6.3.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ata: Make pata_of_platform.c compile again and work on non-PPC platforms
  2011-09-07 12:36 [PATCH] ata: Make pata_of_platform.c compile again and work on non-PPC platforms Pawel Moll
@ 2011-09-12 14:22 ` Anton Vorontsov
  0 siblings, 0 replies; 2+ messages in thread
From: Anton Vorontsov @ 2011-09-12 14:22 UTC (permalink / raw)
  To: Pawel Moll; +Cc: linux-ide

On Wed, Sep 07, 2011 at 01:36:26PM +0100, Pawel Moll wrote:
> This patch adds missing #includes, makes the driver selectable on
> non-PPC OF-enabled platforms and fixes property value accesses to
> be correct in Little Endian system.
> 
> Cc: Anton Vorontsov <avorontsov@ru.mvista.com>
> Signed-off-by: Pawel Moll <pawel.moll@arm.com>

On Mon, Sep 12, 2011 at 03:16:52PM +0100, Pawel Moll wrote:
> It seems your ack got lost when vger.kernel.org was down...
>
> Would you mind re-posting it?

Sure thing.

Acked-by: Anton Vorontsov <cbouatmailru@gmail.com>

Thanks!

-- 
Anton Vorontsov
Email: cbouatmailru@gmail.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-09-12 14:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-07 12:36 [PATCH] ata: Make pata_of_platform.c compile again and work on non-PPC platforms Pawel Moll
2011-09-12 14:22 ` Anton Vorontsov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).