From: Randy Dunlap <randy.dunlap@oracle.com>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: sfr@canb.auug.org.au, linux-next@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] of/device: Move struct of_device define outside of CONFIG_OF_DEVICE test
Date: Wed, 09 Jun 2010 22:36:10 -0700 [thread overview]
Message-ID: <4C1079CA.1030301@oracle.com> (raw)
In-Reply-To: <20100610045159.615.89343.stgit@angua>
On 06/09/10 21:54, Grant Likely wrote:
> Some code uses of_device even when CONFIG_OF_DEVICE is not set. This
> patch makes of_device valid all the time by moving it outside of the
> ifdef CONFIG_OF_DEVICE test.
>
> Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> ---
>
> Hi Randy,
>
> Here's what I applied to my tree to fix the niu driver compile warning.
> I've compile tested it on several architectures, and am pushing it out
> to my linux-next branch now.
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
along with the niu.c patch, of course.
> g.
>
> include/linux/of_device.h | 12 +++++-------
> 1 files changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/include/linux/of_device.h b/include/linux/of_device.h
> index c877d54..8cd1fe7 100644
> --- a/include/linux/of_device.h
> +++ b/include/linux/of_device.h
> @@ -1,13 +1,6 @@
> #ifndef _LINUX_OF_DEVICE_H
> #define _LINUX_OF_DEVICE_H
>
> -#ifdef CONFIG_OF_DEVICE
> -#include <linux/device.h>
> -#include <linux/platform_device.h>
> -#include <linux/of.h>
> -#include <linux/mod_devicetable.h>
> -
> -
> /*
> * The of_device *was* a kind of "base class" that was a superset of
> * struct device for use by devices attached to an OF node and probed
> @@ -22,7 +15,12 @@
> * from the kernel.
> */
> #define of_device platform_device
> +#include <linux/platform_device.h>
>
> +#ifdef CONFIG_OF_DEVICE
> +#include <linux/device.h>
> +#include <linux/of.h>
> +#include <linux/mod_devicetable.h>
> #include <asm/of_device.h>
>
> #define to_of_device(d) container_of(d, struct of_device, dev)
>
--
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
prev parent reply other threads:[~2010-06-10 5:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-10 4:54 [PATCH] of/device: Move struct of_device define outside of CONFIG_OF_DEVICE test Grant Likely
2010-06-10 5:36 ` Randy Dunlap [this message]
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=4C1079CA.1030301@oracle.com \
--to=randy.dunlap@oracle.com \
--cc=grant.likely@secretlab.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
/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