diff options
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/core.c | 6 | ||||
-rw-r--r-- | drivers/base/isa.c | 4 | ||||
-rw-r--r-- | drivers/base/memory.c | 3 | ||||
-rw-r--r-- | drivers/base/sys.c | 12 |
4 files changed, 11 insertions, 14 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c index 7d5c63c81a59..068aa1c9538c 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c | |||
@@ -116,12 +116,10 @@ static void device_release(struct kobject *kobj) | |||
116 | dev->type->release(dev); | 116 | dev->type->release(dev); |
117 | else if (dev->class && dev->class->dev_release) | 117 | else if (dev->class && dev->class->dev_release) |
118 | dev->class->dev_release(dev); | 118 | dev->class->dev_release(dev); |
119 | else { | 119 | else |
120 | printk(KERN_ERR "Device '%s' does not have a release() " | 120 | WARN(1, KERN_ERR "Device '%s' does not have a release() " |
121 | "function, it is broken and must be fixed.\n", | 121 | "function, it is broken and must be fixed.\n", |
122 | dev->bus_id); | 122 | dev->bus_id); |
123 | WARN_ON(1); | ||
124 | } | ||
125 | } | 123 | } |
126 | 124 | ||
127 | static struct kobj_type device_ktype = { | 125 | static struct kobj_type device_ktype = { |
diff --git a/drivers/base/isa.c b/drivers/base/isa.c index d2222397a401..efd577574948 100644 --- a/drivers/base/isa.c +++ b/drivers/base/isa.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/slab.h> | 7 | #include <linux/slab.h> |
8 | #include <linux/module.h> | 8 | #include <linux/module.h> |
9 | #include <linux/init.h> | 9 | #include <linux/init.h> |
10 | #include <linux/dma-mapping.h> | ||
10 | #include <linux/isa.h> | 11 | #include <linux/isa.h> |
11 | 12 | ||
12 | static struct device isa_bus = { | 13 | static struct device isa_bus = { |
@@ -141,6 +142,9 @@ int isa_register_driver(struct isa_driver *isa_driver, unsigned int ndev) | |||
141 | isa_dev->dev.release = isa_dev_release; | 142 | isa_dev->dev.release = isa_dev_release; |
142 | isa_dev->id = id; | 143 | isa_dev->id = id; |
143 | 144 | ||
145 | isa_dev->dev.coherent_dma_mask = DMA_24BIT_MASK; | ||
146 | isa_dev->dev.dma_mask = &isa_dev->dev.coherent_dma_mask; | ||
147 | |||
144 | error = device_register(&isa_dev->dev); | 148 | error = device_register(&isa_dev->dev); |
145 | if (error) { | 149 | if (error) { |
146 | put_device(&isa_dev->dev); | 150 | put_device(&isa_dev->dev); |
diff --git a/drivers/base/memory.c b/drivers/base/memory.c index 855ed1a9f97b..3ad49a00029f 100644 --- a/drivers/base/memory.c +++ b/drivers/base/memory.c | |||
@@ -204,9 +204,8 @@ memory_block_action(struct memory_block *mem, unsigned long action) | |||
204 | } | 204 | } |
205 | break; | 205 | break; |
206 | default: | 206 | default: |
207 | printk(KERN_WARNING "%s(%p, %ld) unknown action: %ld\n", | 207 | WARN(1, KERN_WARNING "%s(%p, %ld) unknown action: %ld\n", |
208 | __func__, mem, action, action); | 208 | __func__, mem, action, action); |
209 | WARN_ON(1); | ||
210 | ret = -EINVAL; | 209 | ret = -EINVAL; |
211 | } | 210 | } |
212 | 211 | ||
diff --git a/drivers/base/sys.c b/drivers/base/sys.c index 40fc14f03540..75dd6e22faff 100644 --- a/drivers/base/sys.c +++ b/drivers/base/sys.c | |||
@@ -168,19 +168,16 @@ int sysdev_driver_register(struct sysdev_class *cls, struct sysdev_driver *drv) | |||
168 | int err = 0; | 168 | int err = 0; |
169 | 169 | ||
170 | if (!cls) { | 170 | if (!cls) { |
171 | printk(KERN_WARNING "sysdev: invalid class passed to " | 171 | WARN(1, KERN_WARNING "sysdev: invalid class passed to " |
172 | "sysdev_driver_register!\n"); | 172 | "sysdev_driver_register!\n"); |
173 | WARN_ON(1); | ||
174 | return -EINVAL; | 173 | return -EINVAL; |
175 | } | 174 | } |
176 | 175 | ||
177 | /* Check whether this driver has already been added to a class. */ | 176 | /* Check whether this driver has already been added to a class. */ |
178 | if (drv->entry.next && !list_empty(&drv->entry)) { | 177 | if (drv->entry.next && !list_empty(&drv->entry)) |
179 | printk(KERN_WARNING "sysdev: class %s: driver (%p) has already" | 178 | WARN(1, KERN_WARNING "sysdev: class %s: driver (%p) has already" |
180 | " been registered to a class, something is wrong, but " | 179 | " been registered to a class, something is wrong, but " |
181 | "will forge on!\n", cls->name, drv); | 180 | "will forge on!\n", cls->name, drv); |
182 | WARN_ON(1); | ||
183 | } | ||
184 | 181 | ||
185 | mutex_lock(&sysdev_drivers_lock); | 182 | mutex_lock(&sysdev_drivers_lock); |
186 | if (cls && kset_get(&cls->kset)) { | 183 | if (cls && kset_get(&cls->kset)) { |
@@ -194,8 +191,7 @@ int sysdev_driver_register(struct sysdev_class *cls, struct sysdev_driver *drv) | |||
194 | } | 191 | } |
195 | } else { | 192 | } else { |
196 | err = -EINVAL; | 193 | err = -EINVAL; |
197 | printk(KERN_ERR "%s: invalid device class\n", __func__); | 194 | WARN(1, KERN_ERR "%s: invalid device class\n", __func__); |
198 | WARN_ON(1); | ||
199 | } | 195 | } |
200 | mutex_unlock(&sysdev_drivers_lock); | 196 | mutex_unlock(&sysdev_drivers_lock); |
201 | return err; | 197 | return err; |