diff options
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/Kconfig | 17 | ||||
-rw-r--r-- | drivers/base/base.h | 3 | ||||
-rw-r--r-- | drivers/base/dd.c | 26 | ||||
-rw-r--r-- | drivers/base/dma-coherent.c | 10 | ||||
-rw-r--r-- | drivers/base/dma-mapping.c | 6 |
5 files changed, 19 insertions, 43 deletions
diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig index 8fa8deab6449..4b7b4522b64f 100644 --- a/drivers/base/Kconfig +++ b/drivers/base/Kconfig | |||
@@ -1,10 +1,10 @@ | |||
1 | menu "Generic Driver Options" | 1 | menu "Generic Driver Options" |
2 | 2 | ||
3 | config UEVENT_HELPER_PATH | 3 | config UEVENT_HELPER |
4 | string "path to uevent helper" | 4 | bool "Support for uevent helper" |
5 | default "" | 5 | default y |
6 | help | 6 | help |
7 | Path to uevent helper program forked by the kernel for | 7 | The uevent helper program is forked by the kernel for |
8 | every uevent. | 8 | every uevent. |
9 | Before the switch to the netlink-based uevent source, this was | 9 | Before the switch to the netlink-based uevent source, this was |
10 | used to hook hotplug scripts into kernel device events. It | 10 | used to hook hotplug scripts into kernel device events. It |
@@ -15,8 +15,13 @@ config UEVENT_HELPER_PATH | |||
15 | that it creates a high system load, or on smaller systems | 15 | that it creates a high system load, or on smaller systems |
16 | it is known to create out-of-memory situations during bootup. | 16 | it is known to create out-of-memory situations during bootup. |
17 | 17 | ||
18 | To disable user space helper program execution at early boot | 18 | config UEVENT_HELPER_PATH |
19 | time specify an empty string here. This setting can be altered | 19 | string "path to uevent helper" |
20 | depends on UEVENT_HELPER | ||
21 | default "" | ||
22 | help | ||
23 | To disable user space helper program execution at by default | ||
24 | specify an empty string here. This setting can still be altered | ||
20 | via /proc/sys/kernel/hotplug or via /sys/kernel/uevent_helper | 25 | via /proc/sys/kernel/hotplug or via /sys/kernel/uevent_helper |
21 | later at runtime. | 26 | later at runtime. |
22 | 27 | ||
diff --git a/drivers/base/base.h b/drivers/base/base.h index 24f424249d9b..251c5d30f963 100644 --- a/drivers/base/base.h +++ b/drivers/base/base.h | |||
@@ -63,8 +63,6 @@ struct driver_private { | |||
63 | * binding of drivers which were unable to get all the resources needed by | 63 | * binding of drivers which were unable to get all the resources needed by |
64 | * the device; typically because it depends on another driver getting | 64 | * the device; typically because it depends on another driver getting |
65 | * probed first. | 65 | * probed first. |
66 | * @driver_data - private pointer for driver specific info. Will turn into a | ||
67 | * list soon. | ||
68 | * @device - pointer back to the struct class that this structure is | 66 | * @device - pointer back to the struct class that this structure is |
69 | * associated with. | 67 | * associated with. |
70 | * | 68 | * |
@@ -76,7 +74,6 @@ struct device_private { | |||
76 | struct klist_node knode_driver; | 74 | struct klist_node knode_driver; |
77 | struct klist_node knode_bus; | 75 | struct klist_node knode_bus; |
78 | struct list_head deferred_probe; | 76 | struct list_head deferred_probe; |
79 | void *driver_data; | ||
80 | struct device *device; | 77 | struct device *device; |
81 | }; | 78 | }; |
82 | #define to_device_private_parent(obj) \ | 79 | #define to_device_private_parent(obj) \ |
diff --git a/drivers/base/dd.c b/drivers/base/dd.c index 62ec61e8f84a..e4ffbcf2f519 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c | |||
@@ -587,29 +587,3 @@ void driver_detach(struct device_driver *drv) | |||
587 | put_device(dev); | 587 | put_device(dev); |
588 | } | 588 | } |
589 | } | 589 | } |
590 | |||
591 | /* | ||
592 | * These exports can't be _GPL due to .h files using this within them, and it | ||
593 | * might break something that was previously working... | ||
594 | */ | ||
595 | void *dev_get_drvdata(const struct device *dev) | ||
596 | { | ||
597 | if (dev && dev->p) | ||
598 | return dev->p->driver_data; | ||
599 | return NULL; | ||
600 | } | ||
601 | EXPORT_SYMBOL(dev_get_drvdata); | ||
602 | |||
603 | int dev_set_drvdata(struct device *dev, void *data) | ||
604 | { | ||
605 | int error; | ||
606 | |||
607 | if (!dev->p) { | ||
608 | error = device_private_init(dev); | ||
609 | if (error) | ||
610 | return error; | ||
611 | } | ||
612 | dev->p->driver_data = data; | ||
613 | return 0; | ||
614 | } | ||
615 | EXPORT_SYMBOL(dev_set_drvdata); | ||
diff --git a/drivers/base/dma-coherent.c b/drivers/base/dma-coherent.c index bc256b641027..7d6e84a51424 100644 --- a/drivers/base/dma-coherent.c +++ b/drivers/base/dma-coherent.c | |||
@@ -10,13 +10,13 @@ | |||
10 | struct dma_coherent_mem { | 10 | struct dma_coherent_mem { |
11 | void *virt_base; | 11 | void *virt_base; |
12 | dma_addr_t device_base; | 12 | dma_addr_t device_base; |
13 | phys_addr_t pfn_base; | 13 | unsigned long pfn_base; |
14 | int size; | 14 | int size; |
15 | int flags; | 15 | int flags; |
16 | unsigned long *bitmap; | 16 | unsigned long *bitmap; |
17 | }; | 17 | }; |
18 | 18 | ||
19 | int dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr, | 19 | int dma_declare_coherent_memory(struct device *dev, phys_addr_t phys_addr, |
20 | dma_addr_t device_addr, size_t size, int flags) | 20 | dma_addr_t device_addr, size_t size, int flags) |
21 | { | 21 | { |
22 | void __iomem *mem_base = NULL; | 22 | void __iomem *mem_base = NULL; |
@@ -32,7 +32,7 @@ int dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr, | |||
32 | 32 | ||
33 | /* FIXME: this routine just ignores DMA_MEMORY_INCLUDES_CHILDREN */ | 33 | /* FIXME: this routine just ignores DMA_MEMORY_INCLUDES_CHILDREN */ |
34 | 34 | ||
35 | mem_base = ioremap(bus_addr, size); | 35 | mem_base = ioremap(phys_addr, size); |
36 | if (!mem_base) | 36 | if (!mem_base) |
37 | goto out; | 37 | goto out; |
38 | 38 | ||
@@ -45,7 +45,7 @@ int dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr, | |||
45 | 45 | ||
46 | dev->dma_mem->virt_base = mem_base; | 46 | dev->dma_mem->virt_base = mem_base; |
47 | dev->dma_mem->device_base = device_addr; | 47 | dev->dma_mem->device_base = device_addr; |
48 | dev->dma_mem->pfn_base = PFN_DOWN(bus_addr); | 48 | dev->dma_mem->pfn_base = PFN_DOWN(phys_addr); |
49 | dev->dma_mem->size = pages; | 49 | dev->dma_mem->size = pages; |
50 | dev->dma_mem->flags = flags; | 50 | dev->dma_mem->flags = flags; |
51 | 51 | ||
@@ -208,7 +208,7 @@ int dma_mmap_from_coherent(struct device *dev, struct vm_area_struct *vma, | |||
208 | 208 | ||
209 | *ret = -ENXIO; | 209 | *ret = -ENXIO; |
210 | if (off < count && user_count <= count - off) { | 210 | if (off < count && user_count <= count - off) { |
211 | unsigned pfn = mem->pfn_base + start + off; | 211 | unsigned long pfn = mem->pfn_base + start + off; |
212 | *ret = remap_pfn_range(vma, vma->vm_start, pfn, | 212 | *ret = remap_pfn_range(vma, vma->vm_start, pfn, |
213 | user_count << PAGE_SHIFT, | 213 | user_count << PAGE_SHIFT, |
214 | vma->vm_page_prot); | 214 | vma->vm_page_prot); |
diff --git a/drivers/base/dma-mapping.c b/drivers/base/dma-mapping.c index 0ce39a33b3c2..6cd08e145bfa 100644 --- a/drivers/base/dma-mapping.c +++ b/drivers/base/dma-mapping.c | |||
@@ -175,7 +175,7 @@ static void dmam_coherent_decl_release(struct device *dev, void *res) | |||
175 | /** | 175 | /** |
176 | * dmam_declare_coherent_memory - Managed dma_declare_coherent_memory() | 176 | * dmam_declare_coherent_memory - Managed dma_declare_coherent_memory() |
177 | * @dev: Device to declare coherent memory for | 177 | * @dev: Device to declare coherent memory for |
178 | * @bus_addr: Bus address of coherent memory to be declared | 178 | * @phys_addr: Physical address of coherent memory to be declared |
179 | * @device_addr: Device address of coherent memory to be declared | 179 | * @device_addr: Device address of coherent memory to be declared |
180 | * @size: Size of coherent memory to be declared | 180 | * @size: Size of coherent memory to be declared |
181 | * @flags: Flags | 181 | * @flags: Flags |
@@ -185,7 +185,7 @@ static void dmam_coherent_decl_release(struct device *dev, void *res) | |||
185 | * RETURNS: | 185 | * RETURNS: |
186 | * 0 on success, -errno on failure. | 186 | * 0 on success, -errno on failure. |
187 | */ | 187 | */ |
188 | int dmam_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr, | 188 | int dmam_declare_coherent_memory(struct device *dev, phys_addr_t phys_addr, |
189 | dma_addr_t device_addr, size_t size, int flags) | 189 | dma_addr_t device_addr, size_t size, int flags) |
190 | { | 190 | { |
191 | void *res; | 191 | void *res; |
@@ -195,7 +195,7 @@ int dmam_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr, | |||
195 | if (!res) | 195 | if (!res) |
196 | return -ENOMEM; | 196 | return -ENOMEM; |
197 | 197 | ||
198 | rc = dma_declare_coherent_memory(dev, bus_addr, device_addr, size, | 198 | rc = dma_declare_coherent_memory(dev, phys_addr, device_addr, size, |
199 | flags); | 199 | flags); |
200 | if (rc == 0) | 200 | if (rc == 0) |
201 | devres_add(dev, res); | 201 | devres_add(dev, res); |