diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/device.h | 5 | ||||
-rw-r--r-- | include/linux/extcon/extcon_gpio.h | 2 | ||||
-rw-r--r-- | include/linux/genhd.h | 1 |
3 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index 5083bccae967..52a5f15a2223 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -691,6 +691,11 @@ struct device { | |||
691 | struct iommu_group *iommu_group; | 691 | struct iommu_group *iommu_group; |
692 | }; | 692 | }; |
693 | 693 | ||
694 | static inline struct device *kobj_to_dev(struct kobject *kobj) | ||
695 | { | ||
696 | return container_of(kobj, struct device, kobj); | ||
697 | } | ||
698 | |||
694 | /* Get the wakeup routines, which depend on struct device */ | 699 | /* Get the wakeup routines, which depend on struct device */ |
695 | #include <linux/pm_wakeup.h> | 700 | #include <linux/pm_wakeup.h> |
696 | 701 | ||
diff --git a/include/linux/extcon/extcon_gpio.h b/include/linux/extcon/extcon_gpio.h index a2129b73dcb1..2d8307f7d67d 100644 --- a/include/linux/extcon/extcon_gpio.h +++ b/include/linux/extcon/extcon_gpio.h | |||
@@ -31,7 +31,7 @@ | |||
31 | * @irq_flags IRQ Flags (e.g., IRQF_TRIGGER_LOW). | 31 | * @irq_flags IRQ Flags (e.g., IRQF_TRIGGER_LOW). |
32 | * @state_on print_state is overriden with state_on if attached. If Null, | 32 | * @state_on print_state is overriden with state_on if attached. If Null, |
33 | * default method of extcon class is used. | 33 | * default method of extcon class is used. |
34 | * @state_off print_state is overriden with state_on if dettached. If Null, | 34 | * @state_off print_state is overriden with state_on if detached. If Null, |
35 | * default method of extcon class is used. | 35 | * default method of extcon class is used. |
36 | * | 36 | * |
37 | * Note that in order for state_on or state_off to be valid, both state_on | 37 | * Note that in order for state_on or state_off to be valid, both state_on |
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 017a7fb5a1fc..ae0aaa9d42fa 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
@@ -16,7 +16,6 @@ | |||
16 | 16 | ||
17 | #ifdef CONFIG_BLOCK | 17 | #ifdef CONFIG_BLOCK |
18 | 18 | ||
19 | #define kobj_to_dev(k) container_of((k), struct device, kobj) | ||
20 | #define dev_to_disk(device) container_of((device), struct gendisk, part0.__dev) | 19 | #define dev_to_disk(device) container_of((device), struct gendisk, part0.__dev) |
21 | #define dev_to_part(device) container_of((device), struct hd_struct, __dev) | 20 | #define dev_to_part(device) container_of((device), struct hd_struct, __dev) |
22 | #define disk_to_dev(disk) (&(disk)->part0.__dev) | 21 | #define disk_to_dev(disk) (&(disk)->part0.__dev) |