aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-01-08 14:05:59 -0500
committerDavid S. Miller <davem@davemloft.net>2009-01-08 14:05:59 -0500
commit7f46b1343f723f98634a5dcee47856b2000079ed (patch)
treeed22b6298c8dd2f687890a0d79abcd1d273b5f81 /drivers/misc
parentb8c31da64165b8566fc6e1c9c826f76e7b98ff02 (diff)
parent9e42d0cf5020aaf217433cad1a224745241d212a (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/ibmasm/event.c2
-rw-r--r--drivers/misc/ibmasm/module.c3
-rw-r--r--drivers/misc/ioc4.c36
-rw-r--r--drivers/misc/phantom.c2
-rw-r--r--drivers/misc/sgi-gru/grumain.c2
-rw-r--r--drivers/misc/sgi-xp/xp_main.c2
-rw-r--r--drivers/misc/sgi-xp/xpc_main.c8
-rw-r--r--drivers/misc/sgi-xp/xpnet.c2
-rw-r--r--drivers/misc/tifm_7xx1.c5
-rw-r--r--drivers/misc/tifm_core.c7
10 files changed, 51 insertions, 18 deletions
diff --git a/drivers/misc/ibmasm/event.c b/drivers/misc/ibmasm/event.c
index fda6a4d3bf23..68a0a5b94795 100644
--- a/drivers/misc/ibmasm/event.c
+++ b/drivers/misc/ibmasm/event.c
@@ -50,7 +50,7 @@ static void wake_up_event_readers(struct service_processor *sp)
50 * Store the event in the circular event buffer, wake up any sleeping 50 * Store the event in the circular event buffer, wake up any sleeping
51 * event readers. 51 * event readers.
52 * There is no reader marker in the buffer, therefore readers are 52 * There is no reader marker in the buffer, therefore readers are
53 * responsible for keeping up with the writer, or they will loose events. 53 * responsible for keeping up with the writer, or they will lose events.
54 */ 54 */
55void ibmasm_receive_event(struct service_processor *sp, void *data, unsigned int data_size) 55void ibmasm_receive_event(struct service_processor *sp, void *data, unsigned int data_size)
56{ 56{
diff --git a/drivers/misc/ibmasm/module.c b/drivers/misc/ibmasm/module.c
index b5f6add34b0b..dc14b0b9cbfa 100644
--- a/drivers/misc/ibmasm/module.c
+++ b/drivers/misc/ibmasm/module.c
@@ -104,8 +104,7 @@ static int __devinit ibmasm_init_one(struct pci_dev *pdev, const struct pci_devi
104 } 104 }
105 105
106 sp->irq = pdev->irq; 106 sp->irq = pdev->irq;
107 sp->base_address = ioremap(pci_resource_start(pdev, 0), 107 sp->base_address = pci_ioremap_bar(pdev, 0);
108 pci_resource_len(pdev, 0));
109 if (!sp->base_address) { 108 if (!sp->base_address) {
110 dev_err(sp->dev, "Failed to ioremap pci memory\n"); 109 dev_err(sp->dev, "Failed to ioremap pci memory\n");
111 result = -ENODEV; 110 result = -ENODEV;
diff --git a/drivers/misc/ioc4.c b/drivers/misc/ioc4.c
index 6f76573e7c8a..60b0b1a4fb3a 100644
--- a/drivers/misc/ioc4.c
+++ b/drivers/misc/ioc4.c
@@ -269,6 +269,16 @@ ioc4_variant(struct ioc4_driver_data *idd)
269 return IOC4_VARIANT_PCI_RT; 269 return IOC4_VARIANT_PCI_RT;
270} 270}
271 271
272static void
273ioc4_load_modules(struct work_struct *work)
274{
275 /* arg just has to be freed */
276
277 request_module("sgiioc4");
278
279 kfree(work);
280}
281
272/* Adds a new instance of an IOC4 card */ 282/* Adds a new instance of an IOC4 card */
273static int 283static int
274ioc4_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id) 284ioc4_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id)
@@ -378,6 +388,30 @@ ioc4_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id)
378 } 388 }
379 mutex_unlock(&ioc4_mutex); 389 mutex_unlock(&ioc4_mutex);
380 390
391 /* Request sgiioc4 IDE driver on boards that bring that functionality
392 * off of IOC4. The root filesystem may be hosted on a drive connected
393 * to IOC4, so we need to make sure the sgiioc4 driver is loaded as it
394 * won't be picked up by modprobes due to the ioc4 module owning the
395 * PCI device.
396 */
397 if (idd->idd_variant != IOC4_VARIANT_PCI_RT) {
398 struct work_struct *work;
399 work = kzalloc(sizeof(struct work_struct), GFP_KERNEL);
400 if (!work) {
401 printk(KERN_WARNING
402 "%s: IOC4 unable to allocate memory for "
403 "load of sub-modules.\n", __func__);
404 } else {
405 /* Request the module from a work procedure as the
406 * modprobe goes out to a userland helper and that
407 * will hang if done directly from ioc4_probe().
408 */
409 printk(KERN_INFO "IOC4 loading sgiioc4 submodule\n");
410 INIT_WORK(work, ioc4_load_modules);
411 schedule_work(work);
412 }
413 }
414
381 return 0; 415 return 0;
382 416
383out_misc_region: 417out_misc_region:
@@ -462,6 +496,8 @@ ioc4_init(void)
462static void __devexit 496static void __devexit
463ioc4_exit(void) 497ioc4_exit(void)
464{ 498{
499 /* Ensure ioc4_load_modules() has completed before exiting */
500 flush_scheduled_work();
465 pci_unregister_driver(&ioc4_driver); 501 pci_unregister_driver(&ioc4_driver);
466} 502}
467 503
diff --git a/drivers/misc/phantom.c b/drivers/misc/phantom.c
index abdebe347383..fa57b67593ae 100644
--- a/drivers/misc/phantom.c
+++ b/drivers/misc/phantom.c
@@ -6,7 +6,7 @@
6 * the Free Software Foundation; either version 2 of the License, or 6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version. 7 * (at your option) any later version.
8 * 8 *
9 * You need an userspace library to cooperate with this driver. It (and other 9 * You need a userspace library to cooperate with this driver. It (and other
10 * info) may be obtained here: 10 * info) may be obtained here:
11 * http://www.fi.muni.cz/~xslaby/phantom.html 11 * http://www.fi.muni.cz/~xslaby/phantom.html
12 * or alternatively, you might use OpenHaptics provided by Sensable. 12 * or alternatively, you might use OpenHaptics provided by Sensable.
diff --git a/drivers/misc/sgi-gru/grumain.c b/drivers/misc/sgi-gru/grumain.c
index e11e1ac50900..3d2fc216bae5 100644
--- a/drivers/misc/sgi-gru/grumain.c
+++ b/drivers/misc/sgi-gru/grumain.c
@@ -29,7 +29,7 @@ static struct device_driver gru_driver = {
29}; 29};
30 30
31static struct device gru_device = { 31static struct device gru_device = {
32 .bus_id = {0}, 32 .init_name = "",
33 .driver = &gru_driver, 33 .driver = &gru_driver,
34}; 34};
35 35
diff --git a/drivers/misc/sgi-xp/xp_main.c b/drivers/misc/sgi-xp/xp_main.c
index 9a2e77172d94..16f8dcab2da4 100644
--- a/drivers/misc/sgi-xp/xp_main.c
+++ b/drivers/misc/sgi-xp/xp_main.c
@@ -25,7 +25,7 @@ struct device_driver xp_dbg_name = {
25}; 25};
26 26
27struct device xp_dbg_subname = { 27struct device xp_dbg_subname = {
28 .bus_id = {0}, /* set to "" */ 28 .init_name = "", /* set to "" */
29 .driver = &xp_dbg_name 29 .driver = &xp_dbg_name
30}; 30};
31 31
diff --git a/drivers/misc/sgi-xp/xpc_main.c b/drivers/misc/sgi-xp/xpc_main.c
index e8d5cfbd32c2..89218f7cfaa7 100644
--- a/drivers/misc/sgi-xp/xpc_main.c
+++ b/drivers/misc/sgi-xp/xpc_main.c
@@ -59,12 +59,12 @@ struct device_driver xpc_dbg_name = {
59}; 59};
60 60
61struct device xpc_part_dbg_subname = { 61struct device xpc_part_dbg_subname = {
62 .bus_id = {0}, /* set to "part" at xpc_init() time */ 62 .init_name = "", /* set to "part" at xpc_init() time */
63 .driver = &xpc_dbg_name 63 .driver = &xpc_dbg_name
64}; 64};
65 65
66struct device xpc_chan_dbg_subname = { 66struct device xpc_chan_dbg_subname = {
67 .bus_id = {0}, /* set to "chan" at xpc_init() time */ 67 .init_name = "", /* set to "chan" at xpc_init() time */
68 .driver = &xpc_dbg_name 68 .driver = &xpc_dbg_name
69}; 69};
70 70
@@ -1258,8 +1258,8 @@ xpc_init(void)
1258 int ret; 1258 int ret;
1259 struct task_struct *kthread; 1259 struct task_struct *kthread;
1260 1260
1261 snprintf(xpc_part->bus_id, BUS_ID_SIZE, "part"); 1261 dev_set_name(xpc_part, "part");
1262 snprintf(xpc_chan->bus_id, BUS_ID_SIZE, "chan"); 1262 dev_set_name(xpc_chan, "chan");
1263 1263
1264 if (is_shub()) { 1264 if (is_shub()) {
1265 /* 1265 /*
diff --git a/drivers/misc/sgi-xp/xpnet.c b/drivers/misc/sgi-xp/xpnet.c
index e5f0a947c083..7957f525b2f4 100644
--- a/drivers/misc/sgi-xp/xpnet.c
+++ b/drivers/misc/sgi-xp/xpnet.c
@@ -133,7 +133,7 @@ struct device_driver xpnet_dbg_name = {
133}; 133};
134 134
135struct device xpnet_dbg_subname = { 135struct device xpnet_dbg_subname = {
136 .bus_id = {0}, /* set to "" */ 136 .init_name = "", /* set to "" */
137 .driver = &xpnet_dbg_name 137 .driver = &xpnet_dbg_name
138}; 138};
139 139
diff --git a/drivers/misc/tifm_7xx1.c b/drivers/misc/tifm_7xx1.c
index 67503ea71d21..be5672a98702 100644
--- a/drivers/misc/tifm_7xx1.c
+++ b/drivers/misc/tifm_7xx1.c
@@ -164,7 +164,7 @@ static void tifm_7xx1_switch_media(struct work_struct *work)
164 if (sock) { 164 if (sock) {
165 printk(KERN_INFO 165 printk(KERN_INFO
166 "%s : demand removing card from socket %u:%u\n", 166 "%s : demand removing card from socket %u:%u\n",
167 fm->dev.bus_id, fm->id, cnt); 167 dev_name(&fm->dev), fm->id, cnt);
168 fm->sockets[cnt] = NULL; 168 fm->sockets[cnt] = NULL;
169 sock_addr = sock->addr; 169 sock_addr = sock->addr;
170 spin_unlock_irqrestore(&fm->lock, flags); 170 spin_unlock_irqrestore(&fm->lock, flags);
@@ -354,8 +354,7 @@ static int tifm_7xx1_probe(struct pci_dev *dev,
354 fm->has_ms_pif = tifm_7xx1_has_ms_pif; 354 fm->has_ms_pif = tifm_7xx1_has_ms_pif;
355 pci_set_drvdata(dev, fm); 355 pci_set_drvdata(dev, fm);
356 356
357 fm->addr = ioremap(pci_resource_start(dev, 0), 357 fm->addr = pci_ioremap_bar(dev, 0);
358 pci_resource_len(dev, 0));
359 if (!fm->addr) 358 if (!fm->addr)
360 goto err_out_free; 359 goto err_out_free;
361 360
diff --git a/drivers/misc/tifm_core.c b/drivers/misc/tifm_core.c
index 82dc72a1484f..98bcba521da2 100644
--- a/drivers/misc/tifm_core.c
+++ b/drivers/misc/tifm_core.c
@@ -203,7 +203,7 @@ int tifm_add_adapter(struct tifm_adapter *fm)
203 if (rc) 203 if (rc)
204 return rc; 204 return rc;
205 205
206 snprintf(fm->dev.bus_id, BUS_ID_SIZE, "tifm%u", fm->id); 206 dev_set_name(&fm->dev, "tifm%u", fm->id);
207 rc = device_add(&fm->dev); 207 rc = device_add(&fm->dev);
208 if (rc) { 208 if (rc) {
209 spin_lock(&tifm_adapter_lock); 209 spin_lock(&tifm_adapter_lock);
@@ -266,9 +266,8 @@ struct tifm_dev *tifm_alloc_device(struct tifm_adapter *fm, unsigned int id,
266 sock->dev.dma_mask = fm->dev.parent->dma_mask; 266 sock->dev.dma_mask = fm->dev.parent->dma_mask;
267 sock->dev.release = tifm_free_device; 267 sock->dev.release = tifm_free_device;
268 268
269 snprintf(sock->dev.bus_id, BUS_ID_SIZE, 269 dev_set_name(&sock->dev, "tifm_%s%u:%u",
270 "tifm_%s%u:%u", tifm_media_type_name(type, 2), 270 tifm_media_type_name(type, 2), fm->id, id);
271 fm->id, id);
272 printk(KERN_INFO DRIVER_NAME 271 printk(KERN_INFO DRIVER_NAME
273 ": %s card detected in socket %u:%u\n", 272 ": %s card detected in socket %u:%u\n",
274 tifm_media_type_name(type, 0), fm->id, id); 273 tifm_media_type_name(type, 0), fm->id, id);