diff options
Diffstat (limited to 'drivers/base')
| -rw-r--r-- | drivers/base/attribute_container.c | 1 | ||||
| -rw-r--r-- | drivers/base/bus.c | 1 | ||||
| -rw-r--r-- | drivers/base/cpu.c | 1 | ||||
| -rw-r--r-- | drivers/base/devres.c | 1 | ||||
| -rw-r--r-- | drivers/base/devtmpfs.c | 1 | ||||
| -rw-r--r-- | drivers/base/dma-coherent.c | 1 | ||||
| -rw-r--r-- | drivers/base/dma-mapping.c | 1 | ||||
| -rw-r--r-- | drivers/base/driver.c | 1 | ||||
| -rw-r--r-- | drivers/base/firmware_class.c | 1 | ||||
| -rw-r--r-- | drivers/base/memory.c | 1 | ||||
| -rw-r--r-- | drivers/base/module.c | 1 | ||||
| -rw-r--r-- | drivers/base/node.c | 1 | ||||
| -rw-r--r-- | drivers/base/power/main.c | 31 | ||||
| -rw-r--r-- | drivers/base/sys.c | 1 |
14 files changed, 43 insertions, 1 deletions
diff --git a/drivers/base/attribute_container.c b/drivers/base/attribute_container.c index b9cda053d3c0..8fc200b2e2c0 100644 --- a/drivers/base/attribute_container.c +++ b/drivers/base/attribute_container.c | |||
| @@ -328,6 +328,7 @@ attribute_container_add_attrs(struct device *classdev) | |||
| 328 | return sysfs_create_group(&classdev->kobj, cont->grp); | 328 | return sysfs_create_group(&classdev->kobj, cont->grp); |
| 329 | 329 | ||
| 330 | for (i = 0; attrs[i]; i++) { | 330 | for (i = 0; attrs[i]; i++) { |
| 331 | sysfs_attr_init(&attrs[i]->attr); | ||
| 331 | error = device_create_file(classdev, attrs[i]); | 332 | error = device_create_file(classdev, attrs[i]); |
| 332 | if (error) | 333 | if (error) |
| 333 | return error; | 334 | return error; |
diff --git a/drivers/base/bus.c b/drivers/base/bus.c index 71f6af5c8b0b..12eec3f633b1 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | #include <linux/device.h> | 13 | #include <linux/device.h> |
| 14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
| 15 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
| 16 | #include <linux/slab.h> | ||
| 16 | #include <linux/init.h> | 17 | #include <linux/init.h> |
| 17 | #include <linux/string.h> | 18 | #include <linux/string.h> |
| 18 | #include "base.h" | 19 | #include "base.h" |
diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c index b5242e1e8bc4..f35719aab3c1 100644 --- a/drivers/base/cpu.c +++ b/drivers/base/cpu.c | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | #include <linux/topology.h> | 10 | #include <linux/topology.h> |
| 11 | #include <linux/device.h> | 11 | #include <linux/device.h> |
| 12 | #include <linux/node.h> | 12 | #include <linux/node.h> |
| 13 | #include <linux/gfp.h> | ||
| 13 | 14 | ||
| 14 | #include "base.h" | 15 | #include "base.h" |
| 15 | 16 | ||
diff --git a/drivers/base/devres.c b/drivers/base/devres.c index 05dd307e8f02..cf7a0c788052 100644 --- a/drivers/base/devres.c +++ b/drivers/base/devres.c | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | 9 | ||
| 10 | #include <linux/device.h> | 10 | #include <linux/device.h> |
| 11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
| 12 | #include <linux/slab.h> | ||
| 12 | 13 | ||
| 13 | #include "base.h" | 14 | #include "base.h" |
| 14 | 15 | ||
diff --git a/drivers/base/devtmpfs.c b/drivers/base/devtmpfs.c index dac478c6e460..057cf11326bf 100644 --- a/drivers/base/devtmpfs.c +++ b/drivers/base/devtmpfs.c | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | #include <linux/cred.h> | 23 | #include <linux/cred.h> |
| 24 | #include <linux/sched.h> | 24 | #include <linux/sched.h> |
| 25 | #include <linux/init_task.h> | 25 | #include <linux/init_task.h> |
| 26 | #include <linux/slab.h> | ||
| 26 | 27 | ||
| 27 | static struct vfsmount *dev_mnt; | 28 | static struct vfsmount *dev_mnt; |
| 28 | 29 | ||
diff --git a/drivers/base/dma-coherent.c b/drivers/base/dma-coherent.c index 962a3b574f21..d4d8ce53886a 100644 --- a/drivers/base/dma-coherent.c +++ b/drivers/base/dma-coherent.c | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | * Coherent per-device memory handling. | 2 | * Coherent per-device memory handling. |
| 3 | * Borrowed from i386 | 3 | * Borrowed from i386 |
| 4 | */ | 4 | */ |
| 5 | #include <linux/slab.h> | ||
| 5 | #include <linux/kernel.h> | 6 | #include <linux/kernel.h> |
| 6 | #include <linux/dma-mapping.h> | 7 | #include <linux/dma-mapping.h> |
| 7 | 8 | ||
diff --git a/drivers/base/dma-mapping.c b/drivers/base/dma-mapping.c index ca9186f70a69..763d59c1eb65 100644 --- a/drivers/base/dma-mapping.c +++ b/drivers/base/dma-mapping.c | |||
| @@ -8,6 +8,7 @@ | |||
| 8 | */ | 8 | */ |
| 9 | 9 | ||
| 10 | #include <linux/dma-mapping.h> | 10 | #include <linux/dma-mapping.h> |
| 11 | #include <linux/gfp.h> | ||
| 11 | 12 | ||
| 12 | /* | 13 | /* |
| 13 | * Managed DMA API | 14 | * Managed DMA API |
diff --git a/drivers/base/driver.c b/drivers/base/driver.c index 90c9fff09ead..b631f7c59453 100644 --- a/drivers/base/driver.c +++ b/drivers/base/driver.c | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | #include <linux/device.h> | 13 | #include <linux/device.h> |
| 14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
| 15 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
| 16 | #include <linux/slab.h> | ||
| 16 | #include <linux/string.h> | 17 | #include <linux/string.h> |
| 17 | #include "base.h" | 18 | #include "base.h" |
| 18 | 19 | ||
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index 18518ba13c81..985da11174e7 100644 --- a/drivers/base/firmware_class.c +++ b/drivers/base/firmware_class.c | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | #include <linux/kthread.h> | 19 | #include <linux/kthread.h> |
| 20 | #include <linux/highmem.h> | 20 | #include <linux/highmem.h> |
| 21 | #include <linux/firmware.h> | 21 | #include <linux/firmware.h> |
| 22 | #include <linux/slab.h> | ||
| 22 | 23 | ||
| 23 | #define to_dev(obj) container_of(obj, struct device, kobj) | 24 | #define to_dev(obj) container_of(obj, struct device, kobj) |
| 24 | 25 | ||
diff --git a/drivers/base/memory.c b/drivers/base/memory.c index db0848e54cc6..4f4aa5897b4c 100644 --- a/drivers/base/memory.c +++ b/drivers/base/memory.c | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | #include <linux/mm.h> | 22 | #include <linux/mm.h> |
| 23 | #include <linux/mutex.h> | 23 | #include <linux/mutex.h> |
| 24 | #include <linux/stat.h> | 24 | #include <linux/stat.h> |
| 25 | #include <linux/slab.h> | ||
| 25 | 26 | ||
| 26 | #include <asm/atomic.h> | 27 | #include <asm/atomic.h> |
| 27 | #include <asm/uaccess.h> | 28 | #include <asm/uaccess.h> |
diff --git a/drivers/base/module.c b/drivers/base/module.c index 103be9cacb05..f32f2f9b7be5 100644 --- a/drivers/base/module.c +++ b/drivers/base/module.c | |||
| @@ -7,6 +7,7 @@ | |||
| 7 | #include <linux/device.h> | 7 | #include <linux/device.h> |
| 8 | #include <linux/module.h> | 8 | #include <linux/module.h> |
| 9 | #include <linux/errno.h> | 9 | #include <linux/errno.h> |
| 10 | #include <linux/slab.h> | ||
| 10 | #include <linux/string.h> | 11 | #include <linux/string.h> |
| 11 | #include "base.h" | 12 | #include "base.h" |
| 12 | 13 | ||
diff --git a/drivers/base/node.c b/drivers/base/node.c index 93b3ac65c2d4..057979a19eea 100644 --- a/drivers/base/node.c +++ b/drivers/base/node.c | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | #include <linux/cpu.h> | 15 | #include <linux/cpu.h> |
| 16 | #include <linux/device.h> | 16 | #include <linux/device.h> |
| 17 | #include <linux/swap.h> | 17 | #include <linux/swap.h> |
| 18 | #include <linux/slab.h> | ||
| 18 | 19 | ||
| 19 | static struct sysdev_class_attribute *node_state_attrs[]; | 20 | static struct sysdev_class_attribute *node_state_attrs[]; |
| 20 | 21 | ||
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index d477f4dc5e51..941fcb87e52a 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c | |||
| @@ -439,8 +439,23 @@ static int device_resume_noirq(struct device *dev, pm_message_t state) | |||
| 439 | if (dev->bus && dev->bus->pm) { | 439 | if (dev->bus && dev->bus->pm) { |
| 440 | pm_dev_dbg(dev, state, "EARLY "); | 440 | pm_dev_dbg(dev, state, "EARLY "); |
| 441 | error = pm_noirq_op(dev, dev->bus->pm, state); | 441 | error = pm_noirq_op(dev, dev->bus->pm, state); |
| 442 | if (error) | ||
| 443 | goto End; | ||
| 442 | } | 444 | } |
| 443 | 445 | ||
| 446 | if (dev->type && dev->type->pm) { | ||
| 447 | pm_dev_dbg(dev, state, "EARLY type "); | ||
| 448 | error = pm_noirq_op(dev, dev->type->pm, state); | ||
| 449 | if (error) | ||
| 450 | goto End; | ||
| 451 | } | ||
| 452 | |||
| 453 | if (dev->class && dev->class->pm) { | ||
| 454 | pm_dev_dbg(dev, state, "EARLY class "); | ||
| 455 | error = pm_noirq_op(dev, dev->class->pm, state); | ||
| 456 | } | ||
| 457 | |||
| 458 | End: | ||
| 444 | TRACE_RESUME(error); | 459 | TRACE_RESUME(error); |
| 445 | return error; | 460 | return error; |
| 446 | } | 461 | } |
| @@ -735,10 +750,26 @@ static int device_suspend_noirq(struct device *dev, pm_message_t state) | |||
| 735 | { | 750 | { |
| 736 | int error = 0; | 751 | int error = 0; |
| 737 | 752 | ||
| 753 | if (dev->class && dev->class->pm) { | ||
| 754 | pm_dev_dbg(dev, state, "LATE class "); | ||
| 755 | error = pm_noirq_op(dev, dev->class->pm, state); | ||
| 756 | if (error) | ||
| 757 | goto End; | ||
| 758 | } | ||
| 759 | |||
| 760 | if (dev->type && dev->type->pm) { | ||
| 761 | pm_dev_dbg(dev, state, "LATE type "); | ||
| 762 | error = pm_noirq_op(dev, dev->type->pm, state); | ||
| 763 | if (error) | ||
| 764 | goto End; | ||
| 765 | } | ||
| 766 | |||
| 738 | if (dev->bus && dev->bus->pm) { | 767 | if (dev->bus && dev->bus->pm) { |
| 739 | pm_dev_dbg(dev, state, "LATE "); | 768 | pm_dev_dbg(dev, state, "LATE "); |
| 740 | error = pm_noirq_op(dev, dev->bus->pm, state); | 769 | error = pm_noirq_op(dev, dev->bus->pm, state); |
| 741 | } | 770 | } |
| 771 | |||
| 772 | End: | ||
| 742 | return error; | 773 | return error; |
| 743 | } | 774 | } |
| 744 | 775 | ||
diff --git a/drivers/base/sys.c b/drivers/base/sys.c index 8980feec5d14..9354dc10a363 100644 --- a/drivers/base/sys.c +++ b/drivers/base/sys.c | |||
| @@ -17,7 +17,6 @@ | |||
| 17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
| 18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
| 19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
| 20 | #include <linux/slab.h> | ||
| 21 | #include <linux/string.h> | 20 | #include <linux/string.h> |
| 22 | #include <linux/pm.h> | 21 | #include <linux/pm.h> |
| 23 | #include <linux/device.h> | 22 | #include <linux/device.h> |
