]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/linux/of_device.h
vfs: remove unused MNT_STRICTATIME
[karo-tx-linux.git] / include / linux / of_device.h
index 91d75fb0c726e25d6b6ca3b1fc9e46a085978389..35aa44ad9f2cb21b7ce2422dfbae2fc296aba7cc 100644 (file)
@@ -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
  * from the kernel.
  */
 #define of_device platform_device
+#include <linux/platform_device.h>
+#include <linux/of_platform.h> /* temporary until merge */
 
-#include <asm/of_device.h>
+#ifdef CONFIG_OF_DEVICE
+#include <linux/device.h>
+#include <linux/of.h>
+#include <linux/mod_devicetable.h>
 
 #define        to_of_device(d) container_of(d, struct of_device, dev)
 
 extern const struct of_device_id *of_match_device(
        const struct of_device_id *matches, const struct device *dev);
+extern void of_device_make_bus_id(struct device *dev);
 
 /**
  * of_driver_match_device - Tell if a driver's of_match_table matches a device.
@@ -41,14 +40,14 @@ static inline int of_driver_match_device(const struct device *dev,
        return of_match_device(drv->of_match_table, dev) != NULL;
 }
 
-extern struct of_device *of_dev_get(struct of_device *dev);
-extern void of_dev_put(struct of_device *dev);
+extern struct platform_device *of_dev_get(struct platform_device *dev);
+extern void of_dev_put(struct platform_device *dev);
 
-extern int of_device_register(struct of_device *ofdev);
-extern void of_device_unregister(struct of_device *ofdev);
+extern int of_device_register(struct platform_device *ofdev);
+extern void of_device_unregister(struct platform_device *ofdev);
 extern void of_release_dev(struct device *dev);
 
-static inline void of_device_free(struct of_device *dev)
+static inline void of_device_free(struct platform_device *dev)
 {
        of_release_dev(&dev->dev);
 }
@@ -67,6 +66,12 @@ static inline int of_driver_match_device(struct device *dev,
        return 0;
 }
 
+static inline int of_device_uevent(struct device *dev,
+                                  struct kobj_uevent_env *env)
+{
+       return -ENODEV;
+}
+
 #endif /* CONFIG_OF_DEVICE */
 
 #endif /* _LINUX_OF_DEVICE_H */