Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
[safe/jmp/linux-2.6] / include / linux / pnp.h
index 785126f..ca3c887 100644 (file)
@@ -1,6 +1,8 @@
 /*
  * Linux Plug and Play Support
  * Copyright by Adam Belay <ambx1@neo.rr.com>
+ * Copyright (C) 2008 Hewlett-Packard Development Company, L.P.
+ *     Bjorn Helgaas <bjorn.helgaas@hp.com>
  */
 
 #ifndef _LINUX_PNP_H
@@ -19,7 +21,16 @@ struct pnp_dev;
 /*
  * Resource Management
  */
-struct resource *pnp_get_resource(struct pnp_dev *, unsigned int, unsigned int);
+#ifdef CONFIG_PNP
+struct resource *pnp_get_resource(struct pnp_dev *dev, unsigned long type,
+                               unsigned int num);
+#else
+static inline struct resource *pnp_get_resource(struct pnp_dev *dev,
+                       unsigned long type, unsigned int num)
+{
+       return NULL;
+}
+#endif
 
 static inline int pnp_resource_valid(struct resource *res)
 {
@@ -249,9 +260,9 @@ struct pnp_dev {
 
        int active;
        int capabilities;
-       struct pnp_option *independent;
-       struct pnp_option *dependent;
+       unsigned int num_dependent_sets;
        struct list_head resources;
+       struct list_head options;
 
        char name[PNP_NAME_LEN];        /* contains a human-readable name */
        int flags;                      /* used by protocols */
@@ -474,14 +485,4 @@ static inline void pnp_unregister_driver(struct pnp_driver *drv) { }
 
 #endif /* CONFIG_PNP */
 
-#define pnp_err(format, arg...) printk(KERN_ERR "pnp: " format "\n" , ## arg)
-#define pnp_info(format, arg...) printk(KERN_INFO "pnp: " format "\n" , ## arg)
-#define pnp_warn(format, arg...) printk(KERN_WARNING "pnp: " format "\n" , ## arg)
-
-#ifdef CONFIG_PNP_DEBUG
-#define pnp_dbg(format, arg...) printk(KERN_DEBUG "pnp: " format "\n" , ## arg)
-#else
-#define pnp_dbg(format, arg...) do {} while (0)
-#endif
-
 #endif /* _LINUX_PNP_H */