]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/device.h
Driver core: proper prototype for drivers/base/init.c:driver_init()
[linux-2.6-omap-h63xx.git] / include / linux / device.h
index 583a341e016cea229ad8b04d4213d59974e3cbd3..f44247fe8135b861b46ac24cacc83a230e874eec 100644 (file)
@@ -371,6 +371,9 @@ struct device {
                                           core doesn't touch it */
        struct dev_pm_info      power;
 
+#ifdef CONFIG_NUMA
+       int             numa_node;      /* NUMA node this device is close to */
+#endif
        u64             *dma_mask;      /* dma mask (if dma'able device) */
        u64             coherent_dma_mask;/* Like dma_mask, but for
                                             alloc_coherent mappings as
@@ -394,6 +397,25 @@ struct device {
        void    (*release)(struct device * dev);
 };
 
+#ifdef CONFIG_NUMA
+static inline int dev_to_node(struct device *dev)
+{
+       return dev->numa_node;
+}
+static inline void set_dev_node(struct device *dev, int node)
+{
+       dev->numa_node = node;
+}
+#else
+static inline int dev_to_node(struct device *dev)
+{
+       return -1;
+}
+static inline void set_dev_node(struct device *dev, int node)
+{
+}
+#endif
+
 static inline void *
 dev_get_drvdata (struct device *dev)
 {
@@ -411,6 +433,8 @@ static inline int device_is_registered(struct device *dev)
        return dev->is_registered;
 }
 
+void driver_init(void);
+
 /*
  * High level routines for use by the bus drivers
  */