From: Kumar Gala <galak@kernel.crashing.org>
To: gregkh@suse.de
Cc: linuxppc-dev@ozlabs.org, akpm@linux-foundation.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 2/3] powerpc: implement arch_setup_pdev_archdata
Date: Thu, 5 Aug 2010 10:15:46 -0500 [thread overview]
Message-ID: <1281021347-1278-3-git-send-email-galak@kernel.crashing.org> (raw)
In-Reply-To: <1281021347-1278-2-git-send-email-galak@kernel.crashing.org>
We have a long standing issues with platform devices not have a valid
dma_mask pointer. This hasn't been an issue to date as no platform
device has tried to set its dma_mask value to a non-default value.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
arch/powerpc/include/asm/platform_device.h | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/include/asm/platform_device.h b/arch/powerpc/include/asm/platform_device.h
index 01452c3..a379500 100644
--- a/arch/powerpc/include/asm/platform_device.h
+++ b/arch/powerpc/include/asm/platform_device.h
@@ -1 +1,15 @@
-#include <asm-generic/platform_device.h>
+#ifndef __ASM_PLATFORM_DEVICE_H_
+#define __ASM_PLATFORM_DEVICE_H_
+
+#include <linux/platform_device.h>
+
+#define ARCH_HAS_PDEV_ARCHDATA_SETUP
+
+static inline void arch_setup_pdev_archdata(struct platform_device *pdev)
+{
+ pdev->dev.dma_mask = &pdev->archdata.dma_mask;
+
+ return;
+}
+
+#endif /* __ASM_GENERIC_PLATFORM_DEVICE_H_ */
--
1.6.0.6
next prev parent reply other threads:[~2010-08-05 15:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-05 15:15 [PATCH 0/3] driver core: Add ability for arch code to setup pdev_archdata Kumar Gala
2010-08-05 15:15 ` [PATCH 1/3] " Kumar Gala
2010-08-05 15:15 ` Kumar Gala [this message]
2010-08-05 15:15 ` [PATCH 3/3] powerpc: Dont require a dma_ops struct to set dma mask Kumar Gala
2010-08-05 15:44 ` [PATCH 2/3] powerpc: implement arch_setup_pdev_archdata Stephen Rothwell
2010-08-05 16:14 ` Kumar Gala
2010-08-05 15:43 ` [PATCH 1/3] driver core: Add ability for arch code to setup pdev_archdata Stephen Rothwell
2010-08-05 16:14 ` Kumar Gala
2010-08-05 18:02 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2011-06-22 12:02 Kumar Gala
2011-06-22 12:02 ` [PATCH 2/3] powerpc: implement arch_setup_pdev_archdata Kumar Gala
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1281021347-1278-3-git-send-email-galak@kernel.crashing.org \
--to=galak@kernel.crashing.org \
--cc=akpm@linux-foundation.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).