Commit f9f5a466 authored by Grant Likely's avatar Grant Likely

of/device: Move struct of_device define outside of CONFIG_OF_DEVICE test

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: default avatarRandy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
Acked-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
parent 8cec0e7b
#ifndef _LINUX_OF_DEVICE_H #ifndef _LINUX_OF_DEVICE_H
#define _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 * 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 * struct device for use by devices attached to an OF node and probed
...@@ -22,7 +15,12 @@ ...@@ -22,7 +15,12 @@
* from the kernel. * from the kernel.
*/ */
#define of_device platform_device #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> #include <asm/of_device.h>
#define to_of_device(d) container_of(d, struct of_device, dev) #define to_of_device(d) container_of(d, struct of_device, dev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment