]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/device.h
PM: Remove destroy_suspended_device()
[linux-2.6-omap-h63xx.git] / include / linux / device.h
index 1880208964d6c9a4a75d332927a0ef3e23b19191..dc3429e2eb0f07fe2b8523e0cbaceeb07347a779 100644 (file)
@@ -84,6 +84,9 @@ int bus_for_each_dev(struct bus_type *bus, struct device *start, void *data,
 struct device *bus_find_device(struct bus_type *bus, struct device *start,
                               void *data,
                               int (*match)(struct device *dev, void *data));
+struct device *bus_find_device_by_name(struct bus_type *bus,
+                                      struct device *start,
+                                      const char *name);
 
 int __must_check bus_for_each_drv(struct bus_type *bus,
                                  struct device_driver *start, void *data,
@@ -407,6 +410,15 @@ extern int devres_release_group(struct device *dev, void *id);
 extern void *devm_kzalloc(struct device *dev, size_t size, gfp_t gfp);
 extern void devm_kfree(struct device *dev, void *p);
 
+struct device_dma_parameters {
+       /*
+        * a low level driver may set these to teach IOMMU code about
+        * sg limitations.
+        */
+       unsigned int max_segment_size;
+       unsigned long segment_boundary_mask;
+};
+
 struct device {
        struct klist            klist_children;
        struct klist_node       knode_parent;   /* node in sibling list */
@@ -417,7 +429,6 @@ struct device {
        struct kobject kobj;
        char    bus_id[BUS_ID_SIZE];    /* position on parent bus */
        struct device_type      *type;
-       unsigned                is_registered:1;
        unsigned                uevent_suppress:1;
 
        struct semaphore        sem;    /* semaphore to synchronize calls to
@@ -442,6 +453,8 @@ struct device {
                                             64 bit addresses for consistent
                                             allocations such descriptors. */
 
+       struct device_dma_parameters *dma_parms;
+
        struct list_head        dma_pools;      /* dma pools (if dma'ble) */
 
        struct dma_coherent_mem *dma_mem; /* internal for coherent mem
@@ -461,6 +474,9 @@ struct device {
        void    (*release)(struct device *dev);
 };
 
+/* Get the wakeup routines, which depend on struct device */
+#include <linux/pm_wakeup.h>
+
 #ifdef CONFIG_NUMA
 static inline int dev_to_node(struct device *dev)
 {
@@ -492,7 +508,7 @@ static inline void dev_set_drvdata(struct device *dev, void *data)
 
 static inline int device_is_registered(struct device *dev)
 {
-       return dev->is_registered;
+       return dev->kobj.state_in_sysfs;
 }
 
 void driver_init(void);
@@ -529,14 +545,6 @@ extern struct device *device_create(struct class *cls, struct device *parent,
                                    dev_t devt, const char *fmt, ...)
                                    __attribute__((format(printf, 4, 5)));
 extern void device_destroy(struct class *cls, dev_t devt);
-#ifdef CONFIG_PM_SLEEP
-extern void destroy_suspended_device(struct class *cls, dev_t devt);
-#else /* !CONFIG_PM_SLEEP */
-static inline void destroy_suspended_device(struct class *cls, dev_t devt)
-{
-       device_destroy(cls, devt);
-}
-#endif /* !CONFIG_PM_SLEEP */
 
 /*
  * Platform "fixup" functions - allow the platform to have their say
@@ -588,21 +596,16 @@ extern const char *dev_driver_string(struct device *dev);
 #define dev_dbg(dev, format, arg...)           \
        dev_printk(KERN_DEBUG , dev , format , ## arg)
 #else
-static inline int __attribute__ ((format (printf, 2, 3)))
-dev_dbg(struct device *dev, const char *fmt, ...)
-{
-       return 0;
-}
+#define dev_dbg(dev, format, arg...)           \
+       ({ if (0) dev_printk(KERN_DEBUG, dev, format, ##arg); 0; })
 #endif
 
 #ifdef VERBOSE_DEBUG
 #define dev_vdbg       dev_dbg
 #else
-static inline int __attribute__ ((format (printf, 2, 3)))
-dev_vdbg(struct device *dev, const char *fmt, ...)
-{
-       return 0;
-}
+
+#define dev_vdbg(dev, format, arg...)          \
+       ({ if (0) dev_printk(KERN_DEBUG, dev, format, ##arg); 0; })
 #endif
 
 /* Create alias, so I can be autoloaded. */