aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/atmel-ssc.c5
-rw-r--r--drivers/misc/dummy-irq.c6
-rw-r--r--drivers/misc/mei/bus.c2
-rw-r--r--drivers/misc/mei/init.c4
-rw-r--r--drivers/misc/mei/main.c17
-rw-r--r--drivers/misc/mei/nfc.c2
-rw-r--r--drivers/misc/mei/pci-me.c1
-rw-r--r--drivers/misc/sgi-gru/grufile.c1
-rw-r--r--drivers/misc/vmw_vmci/Kconfig2
-rw-r--r--drivers/misc/vmw_vmci/vmci_queue_pair.c2
10 files changed, 23 insertions, 19 deletions
diff --git a/drivers/misc/atmel-ssc.c b/drivers/misc/atmel-ssc.c
index c09c28f92055..1abd5ad59925 100644
--- a/drivers/misc/atmel-ssc.c
+++ b/drivers/misc/atmel-ssc.c
@@ -154,11 +154,6 @@ static int ssc_probe(struct platform_device *pdev)
154 ssc->pdata = (struct atmel_ssc_platform_data *)plat_dat; 154 ssc->pdata = (struct atmel_ssc_platform_data *)plat_dat;
155 155
156 regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); 156 regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
157 if (!regs) {
158 dev_dbg(&pdev->dev, "no mmio resource defined\n");
159 return -ENXIO;
160 }
161
162 ssc->regs = devm_ioremap_resource(&pdev->dev, regs); 157 ssc->regs = devm_ioremap_resource(&pdev->dev, regs);
163 if (IS_ERR(ssc->regs)) 158 if (IS_ERR(ssc->regs))
164 return PTR_ERR(ssc->regs); 159 return PTR_ERR(ssc->regs);
diff --git a/drivers/misc/dummy-irq.c b/drivers/misc/dummy-irq.c
index 7014167e2c61..c37eeedfe215 100644
--- a/drivers/misc/dummy-irq.c
+++ b/drivers/misc/dummy-irq.c
@@ -19,7 +19,7 @@
19#include <linux/irq.h> 19#include <linux/irq.h>
20#include <linux/interrupt.h> 20#include <linux/interrupt.h>
21 21
22static int irq; 22static int irq = -1;
23 23
24static irqreturn_t dummy_interrupt(int irq, void *dev_id) 24static irqreturn_t dummy_interrupt(int irq, void *dev_id)
25{ 25{
@@ -36,6 +36,10 @@ static irqreturn_t dummy_interrupt(int irq, void *dev_id)
36 36
37static int __init dummy_irq_init(void) 37static int __init dummy_irq_init(void)
38{ 38{
39 if (irq < 0) {
40 printk(KERN_ERR "dummy-irq: no IRQ given. Use irq=N\n");
41 return -EIO;
42 }
39 if (request_irq(irq, &dummy_interrupt, IRQF_SHARED, "dummy_irq", &irq)) { 43 if (request_irq(irq, &dummy_interrupt, IRQF_SHARED, "dummy_irq", &irq)) {
40 printk(KERN_ERR "dummy-irq: cannot register IRQ %d\n", irq); 44 printk(KERN_ERR "dummy-irq: cannot register IRQ %d\n", irq);
41 return -EIO; 45 return -EIO;
diff --git a/drivers/misc/mei/bus.c b/drivers/misc/mei/bus.c
index 1e935eacaa7f..9ecd49a7be1b 100644
--- a/drivers/misc/mei/bus.c
+++ b/drivers/misc/mei/bus.c
@@ -496,6 +496,8 @@ int mei_cl_disable_device(struct mei_cl_device *device)
496 } 496 }
497 } 497 }
498 498
499 device->event_cb = NULL;
500
499 mutex_unlock(&dev->device_lock); 501 mutex_unlock(&dev->device_lock);
500 502
501 if (!device->ops || !device->ops->disable) 503 if (!device->ops || !device->ops->disable)
diff --git a/drivers/misc/mei/init.c b/drivers/misc/mei/init.c
index 713d89fedc46..f580d30bb784 100644
--- a/drivers/misc/mei/init.c
+++ b/drivers/misc/mei/init.c
@@ -197,6 +197,8 @@ void mei_stop(struct mei_device *dev)
197{ 197{
198 dev_dbg(&dev->pdev->dev, "stopping the device.\n"); 198 dev_dbg(&dev->pdev->dev, "stopping the device.\n");
199 199
200 flush_scheduled_work();
201
200 mutex_lock(&dev->device_lock); 202 mutex_lock(&dev->device_lock);
201 203
202 cancel_delayed_work(&dev->timer_work); 204 cancel_delayed_work(&dev->timer_work);
@@ -210,8 +212,6 @@ void mei_stop(struct mei_device *dev)
210 212
211 mutex_unlock(&dev->device_lock); 213 mutex_unlock(&dev->device_lock);
212 214
213 flush_scheduled_work();
214
215 mei_watchdog_unregister(dev); 215 mei_watchdog_unregister(dev);
216} 216}
217EXPORT_SYMBOL_GPL(mei_stop); 217EXPORT_SYMBOL_GPL(mei_stop);
diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c
index 7c44c8dbae42..053139f61086 100644
--- a/drivers/misc/mei/main.c
+++ b/drivers/misc/mei/main.c
@@ -489,11 +489,16 @@ static int mei_ioctl_connect_client(struct file *file,
489 489
490 /* find ME client we're trying to connect to */ 490 /* find ME client we're trying to connect to */
491 i = mei_me_cl_by_uuid(dev, &data->in_client_uuid); 491 i = mei_me_cl_by_uuid(dev, &data->in_client_uuid);
492 if (i >= 0 && !dev->me_clients[i].props.fixed_address) { 492 if (i < 0 || dev->me_clients[i].props.fixed_address) {
493 cl->me_client_id = dev->me_clients[i].client_id; 493 dev_dbg(&dev->pdev->dev, "Cannot connect to FW Client UUID = %pUl\n",
494 cl->state = MEI_FILE_CONNECTING; 494 &data->in_client_uuid);
495 rets = -ENODEV;
496 goto end;
495 } 497 }
496 498
499 cl->me_client_id = dev->me_clients[i].client_id;
500 cl->state = MEI_FILE_CONNECTING;
501
497 dev_dbg(&dev->pdev->dev, "Connect to FW Client ID = %d\n", 502 dev_dbg(&dev->pdev->dev, "Connect to FW Client ID = %d\n",
498 cl->me_client_id); 503 cl->me_client_id);
499 dev_dbg(&dev->pdev->dev, "FW Client - Protocol Version = %d\n", 504 dev_dbg(&dev->pdev->dev, "FW Client - Protocol Version = %d\n",
@@ -527,11 +532,6 @@ static int mei_ioctl_connect_client(struct file *file,
527 goto end; 532 goto end;
528 } 533 }
529 534
530 if (cl->state != MEI_FILE_CONNECTING) {
531 rets = -ENODEV;
532 goto end;
533 }
534
535 535
536 /* prepare the output buffer */ 536 /* prepare the output buffer */
537 client = &data->out_client_properties; 537 client = &data->out_client_properties;
@@ -543,7 +543,6 @@ static int mei_ioctl_connect_client(struct file *file,
543 rets = mei_cl_connect(cl, file); 543 rets = mei_cl_connect(cl, file);
544 544
545end: 545end:
546 dev_dbg(&dev->pdev->dev, "free connect cb memory.");
547 return rets; 546 return rets;
548} 547}
549 548
diff --git a/drivers/misc/mei/nfc.c b/drivers/misc/mei/nfc.c
index 3adf8a70f26e..d0c6907dfd92 100644
--- a/drivers/misc/mei/nfc.c
+++ b/drivers/misc/mei/nfc.c
@@ -142,6 +142,8 @@ static void mei_nfc_free(struct mei_nfc_dev *ndev)
142 mei_cl_unlink(ndev->cl_info); 142 mei_cl_unlink(ndev->cl_info);
143 kfree(ndev->cl_info); 143 kfree(ndev->cl_info);
144 } 144 }
145
146 memset(ndev, 0, sizeof(struct mei_nfc_dev));
145} 147}
146 148
147static int mei_nfc_build_bus_name(struct mei_nfc_dev *ndev) 149static int mei_nfc_build_bus_name(struct mei_nfc_dev *ndev)
diff --git a/drivers/misc/mei/pci-me.c b/drivers/misc/mei/pci-me.c
index a727464e9c3f..0f268329bd3a 100644
--- a/drivers/misc/mei/pci-me.c
+++ b/drivers/misc/mei/pci-me.c
@@ -325,6 +325,7 @@ static int mei_me_pci_resume(struct device *device)
325 325
326 mutex_lock(&dev->device_lock); 326 mutex_lock(&dev->device_lock);
327 dev->dev_state = MEI_DEV_POWER_UP; 327 dev->dev_state = MEI_DEV_POWER_UP;
328 mei_clear_interrupts(dev);
328 mei_reset(dev, 1); 329 mei_reset(dev, 1);
329 mutex_unlock(&dev->device_lock); 330 mutex_unlock(&dev->device_lock);
330 331
diff --git a/drivers/misc/sgi-gru/grufile.c b/drivers/misc/sgi-gru/grufile.c
index 44d273c5e19d..0535d1e0bc78 100644
--- a/drivers/misc/sgi-gru/grufile.c
+++ b/drivers/misc/sgi-gru/grufile.c
@@ -172,6 +172,7 @@ static long gru_get_config_info(unsigned long arg)
172 nodesperblade = 2; 172 nodesperblade = 2;
173 else 173 else
174 nodesperblade = 1; 174 nodesperblade = 1;
175 memset(&info, 0, sizeof(info));
175 info.cpus = num_online_cpus(); 176 info.cpus = num_online_cpus();
176 info.nodes = num_online_nodes(); 177 info.nodes = num_online_nodes();
177 info.blades = info.nodes / nodesperblade; 178 info.blades = info.nodes / nodesperblade;
diff --git a/drivers/misc/vmw_vmci/Kconfig b/drivers/misc/vmw_vmci/Kconfig
index ea98f7e9ccd1..39c2ecadb273 100644
--- a/drivers/misc/vmw_vmci/Kconfig
+++ b/drivers/misc/vmw_vmci/Kconfig
@@ -4,7 +4,7 @@
4 4
5config VMWARE_VMCI 5config VMWARE_VMCI
6 tristate "VMware VMCI Driver" 6 tristate "VMware VMCI Driver"
7 depends on X86 && PCI && NET 7 depends on X86 && PCI
8 help 8 help
9 This is VMware's Virtual Machine Communication Interface. It enables 9 This is VMware's Virtual Machine Communication Interface. It enables
10 high-speed communication between host and guest in a virtual 10 high-speed communication between host and guest in a virtual
diff --git a/drivers/misc/vmw_vmci/vmci_queue_pair.c b/drivers/misc/vmw_vmci/vmci_queue_pair.c
index d94245dbd765..8ff2e5ee8fb8 100644
--- a/drivers/misc/vmw_vmci/vmci_queue_pair.c
+++ b/drivers/misc/vmw_vmci/vmci_queue_pair.c
@@ -23,7 +23,7 @@
23#include <linux/pagemap.h> 23#include <linux/pagemap.h>
24#include <linux/sched.h> 24#include <linux/sched.h>
25#include <linux/slab.h> 25#include <linux/slab.h>
26#include <linux/socket.h> 26#include <linux/uio.h>
27#include <linux/wait.h> 27#include <linux/wait.h>
28#include <linux/vmalloc.h> 28#include <linux/vmalloc.h>
29 29