diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/atomic.h | 2 | ||||
-rw-r--r-- | include/linux/device.h | 4 | ||||
-rw-r--r-- | include/linux/of.h | 10 | ||||
-rw-r--r-- | include/linux/pci.h | 7 |
4 files changed, 19 insertions, 4 deletions
diff --git a/include/linux/atomic.h b/include/linux/atomic.h index 42b77b5446d2..70cfcb2d63c4 100644 --- a/include/linux/atomic.h +++ b/include/linux/atomic.h | |||
@@ -24,7 +24,9 @@ static inline int atomic_add_unless(atomic_t *v, int a, int u) | |||
24 | * Atomically increments @v by 1, so long as @v is non-zero. | 24 | * Atomically increments @v by 1, so long as @v is non-zero. |
25 | * Returns non-zero if @v was non-zero, and zero otherwise. | 25 | * Returns non-zero if @v was non-zero, and zero otherwise. |
26 | */ | 26 | */ |
27 | #ifndef atomic_inc_not_zero | ||
27 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | 28 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) |
29 | #endif | ||
28 | 30 | ||
29 | /** | 31 | /** |
30 | * atomic_inc_not_zero_hint - increment if not null | 32 | * atomic_inc_not_zero_hint - increment if not null |
diff --git a/include/linux/device.h b/include/linux/device.h index 7c46bc32fcbf..5ad17cccdd71 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -262,10 +262,6 @@ extern int __must_check driver_create_file(struct device_driver *driver, | |||
262 | extern void driver_remove_file(struct device_driver *driver, | 262 | extern void driver_remove_file(struct device_driver *driver, |
263 | const struct driver_attribute *attr); | 263 | const struct driver_attribute *attr); |
264 | 264 | ||
265 | extern int __must_check driver_add_kobj(struct device_driver *drv, | ||
266 | struct kobject *kobj, | ||
267 | const char *fmt, ...); | ||
268 | |||
269 | extern int __must_check driver_for_each_device(struct device_driver *drv, | 265 | extern int __must_check driver_for_each_device(struct device_driver *drv, |
270 | struct device *start, | 266 | struct device *start, |
271 | void *data, | 267 | void *data, |
diff --git a/include/linux/of.h b/include/linux/of.h index f02d8b2f799d..d46a18ffbebb 100644 --- a/include/linux/of.h +++ b/include/linux/of.h | |||
@@ -58,6 +58,9 @@ struct device_node { | |||
58 | struct kref kref; | 58 | struct kref kref; |
59 | unsigned long _flags; | 59 | unsigned long _flags; |
60 | void *data; | 60 | void *data; |
61 | #if defined(CONFIG_EEH) | ||
62 | struct eeh_dev *edev; | ||
63 | #endif | ||
61 | #if defined(CONFIG_SPARC) | 64 | #if defined(CONFIG_SPARC) |
62 | char *path_component_name; | 65 | char *path_component_name; |
63 | unsigned int unique_id; | 66 | unsigned int unique_id; |
@@ -72,6 +75,13 @@ struct of_phandle_args { | |||
72 | uint32_t args[MAX_PHANDLE_ARGS]; | 75 | uint32_t args[MAX_PHANDLE_ARGS]; |
73 | }; | 76 | }; |
74 | 77 | ||
78 | #if defined(CONFIG_EEH) | ||
79 | static inline struct eeh_dev *of_node_to_eeh_dev(struct device_node *dn) | ||
80 | { | ||
81 | return dn->edev; | ||
82 | } | ||
83 | #endif | ||
84 | |||
75 | #ifdef CONFIG_OF_DYNAMIC | 85 | #ifdef CONFIG_OF_DYNAMIC |
76 | extern struct device_node *of_node_get(struct device_node *node); | 86 | extern struct device_node *of_node_get(struct device_node *node); |
77 | extern void of_node_put(struct device_node *node); | 87 | extern void of_node_put(struct device_node *node); |
diff --git a/include/linux/pci.h b/include/linux/pci.h index b843fe79583b..27bf521bcebd 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -1660,6 +1660,13 @@ static inline void pci_set_bus_of_node(struct pci_bus *bus) { } | |||
1660 | static inline void pci_release_bus_of_node(struct pci_bus *bus) { } | 1660 | static inline void pci_release_bus_of_node(struct pci_bus *bus) { } |
1661 | #endif /* CONFIG_OF */ | 1661 | #endif /* CONFIG_OF */ |
1662 | 1662 | ||
1663 | #ifdef CONFIG_EEH | ||
1664 | static inline struct eeh_dev *pci_dev_to_eeh_dev(struct pci_dev *pdev) | ||
1665 | { | ||
1666 | return pdev->dev.archdata.edev; | ||
1667 | } | ||
1668 | #endif | ||
1669 | |||
1663 | /** | 1670 | /** |
1664 | * pci_find_upstream_pcie_bridge - find upstream PCIe-to-PCI bridge of a device | 1671 | * pci_find_upstream_pcie_bridge - find upstream PCIe-to-PCI bridge of a device |
1665 | * @pdev: the PCI device | 1672 | * @pdev: the PCI device |