aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/Kconfig17
-rw-r--r--drivers/misc/c2port/c2port-duramar2150.c1
-rw-r--r--drivers/misc/c2port/core.c4
-rw-r--r--drivers/misc/cb710/core.c1
-rw-r--r--drivers/misc/cs5535-mfgpt.c2
-rw-r--r--drivers/misc/lkdtm.c6
-rw-r--r--drivers/misc/vmw_balloon.c14
7 files changed, 20 insertions, 25 deletions
diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
index 6a1a092db146..c7795096d43b 100644
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -2,24 +2,14 @@
2# Misc strange devices 2# Misc strange devices
3# 3#
4 4
5# This one has to live outside of the MISC_DEVICES conditional, 5menu "Misc devices"
6# because it may be selected by drivers/platform/x86/hp_accel. 6
7config SENSORS_LIS3LV02D 7config SENSORS_LIS3LV02D
8 tristate 8 tristate
9 depends on INPUT 9 depends on INPUT
10 select INPUT_POLLDEV 10 select INPUT_POLLDEV
11 default n 11 default n
12 12
13menuconfig MISC_DEVICES
14 bool "Misc devices"
15 ---help---
16 Say Y here to get to see options for device drivers from various
17 different categories. This option alone does not add any kernel code.
18
19 If you say N, all options in this submenu will be skipped and disabled.
20
21if MISC_DEVICES
22
23config AD525X_DPOT 13config AD525X_DPOT
24 tristate "Analog Devices Digital Potentiometers" 14 tristate "Analog Devices Digital Potentiometers"
25 depends on (I2C || SPI) && SYSFS 15 depends on (I2C || SPI) && SYSFS
@@ -516,5 +506,4 @@ source "drivers/misc/ti-st/Kconfig"
516source "drivers/misc/lis3lv02d/Kconfig" 506source "drivers/misc/lis3lv02d/Kconfig"
517source "drivers/misc/carma/Kconfig" 507source "drivers/misc/carma/Kconfig"
518source "drivers/misc/altera-stapl/Kconfig" 508source "drivers/misc/altera-stapl/Kconfig"
519 509endmenu
520endif # MISC_DEVICES
diff --git a/drivers/misc/c2port/c2port-duramar2150.c b/drivers/misc/c2port/c2port-duramar2150.c
index 778fc3fdfb9b..5484301d57d9 100644
--- a/drivers/misc/c2port/c2port-duramar2150.c
+++ b/drivers/misc/c2port/c2port-duramar2150.c
@@ -15,6 +15,7 @@
15#include <linux/module.h> 15#include <linux/module.h>
16#include <linux/delay.h> 16#include <linux/delay.h>
17#include <linux/io.h> 17#include <linux/io.h>
18#include <linux/ioport.h>
18#include <linux/c2port.h> 19#include <linux/c2port.h>
19 20
20#define DATA_PORT 0x325 21#define DATA_PORT 0x325
diff --git a/drivers/misc/c2port/core.c b/drivers/misc/c2port/core.c
index 19fc7c1cb428..f428d86bfc10 100644
--- a/drivers/misc/c2port/core.c
+++ b/drivers/misc/c2port/core.c
@@ -984,9 +984,9 @@ static int __init c2port_init(void)
984 " - (C) 2007 Rodolfo Giometti\n"); 984 " - (C) 2007 Rodolfo Giometti\n");
985 985
986 c2port_class = class_create(THIS_MODULE, "c2port"); 986 c2port_class = class_create(THIS_MODULE, "c2port");
987 if (!c2port_class) { 987 if (IS_ERR(c2port_class)) {
988 printk(KERN_ERR "c2port: failed to allocate class\n"); 988 printk(KERN_ERR "c2port: failed to allocate class\n");
989 return -ENOMEM; 989 return PTR_ERR(c2port_class);
990 } 990 }
991 c2port_class->dev_attrs = c2port_attrs; 991 c2port_class->dev_attrs = c2port_attrs;
992 992
diff --git a/drivers/misc/cb710/core.c b/drivers/misc/cb710/core.c
index 68cd05b6d829..85cc7710193c 100644
--- a/drivers/misc/cb710/core.c
+++ b/drivers/misc/cb710/core.c
@@ -245,6 +245,7 @@ static int __devinit cb710_probe(struct pci_dev *pdev,
245 if (err) 245 if (err)
246 return err; 246 return err;
247 247
248 spin_lock_init(&chip->irq_lock);
248 chip->pdev = pdev; 249 chip->pdev = pdev;
249 chip->iobase = pcim_iomap_table(pdev)[0]; 250 chip->iobase = pcim_iomap_table(pdev)[0];
250 251
diff --git a/drivers/misc/cs5535-mfgpt.c b/drivers/misc/cs5535-mfgpt.c
index bc685bfc4c33..87a390de054c 100644
--- a/drivers/misc/cs5535-mfgpt.c
+++ b/drivers/misc/cs5535-mfgpt.c
@@ -262,7 +262,7 @@ static void __init reset_all_timers(void)
262 * In other cases (such as with VSAless OpenFirmware), the system firmware 262 * In other cases (such as with VSAless OpenFirmware), the system firmware
263 * leaves timers available for us to use. 263 * leaves timers available for us to use.
264 */ 264 */
265static int __init scan_timers(struct cs5535_mfgpt_chip *mfgpt) 265static int __devinit scan_timers(struct cs5535_mfgpt_chip *mfgpt)
266{ 266{
267 struct cs5535_mfgpt_timer timer = { .chip = mfgpt }; 267 struct cs5535_mfgpt_timer timer = { .chip = mfgpt };
268 unsigned long flags; 268 unsigned long flags;
diff --git a/drivers/misc/lkdtm.c b/drivers/misc/lkdtm.c
index 150cd7061b80..28adefe70f96 100644
--- a/drivers/misc/lkdtm.c
+++ b/drivers/misc/lkdtm.c
@@ -354,6 +354,7 @@ static void lkdtm_do_action(enum ctype which)
354static void lkdtm_handler(void) 354static void lkdtm_handler(void)
355{ 355{
356 unsigned long flags; 356 unsigned long flags;
357 bool do_it = false;
357 358
358 spin_lock_irqsave(&count_lock, flags); 359 spin_lock_irqsave(&count_lock, flags);
359 count--; 360 count--;
@@ -361,10 +362,13 @@ static void lkdtm_handler(void)
361 cp_name_to_str(cpoint), cp_type_to_str(cptype), count); 362 cp_name_to_str(cpoint), cp_type_to_str(cptype), count);
362 363
363 if (count == 0) { 364 if (count == 0) {
364 lkdtm_do_action(cptype); 365 do_it = true;
365 count = cpoint_count; 366 count = cpoint_count;
366 } 367 }
367 spin_unlock_irqrestore(&count_lock, flags); 368 spin_unlock_irqrestore(&count_lock, flags);
369
370 if (do_it)
371 lkdtm_do_action(cptype);
368} 372}
369 373
370static int lkdtm_register_cpoint(enum cname which) 374static int lkdtm_register_cpoint(enum cname which)
diff --git a/drivers/misc/vmw_balloon.c b/drivers/misc/vmw_balloon.c
index cd41d403c9df..cb56e270da11 100644
--- a/drivers/misc/vmw_balloon.c
+++ b/drivers/misc/vmw_balloon.c
@@ -314,7 +314,7 @@ static bool vmballoon_send_get_target(struct vmballoon *b, u32 *new_target)
314 * fear that guest will need it. Host may reject some pages, we need to 314 * fear that guest will need it. Host may reject some pages, we need to
315 * check the return value and maybe submit a different page. 315 * check the return value and maybe submit a different page.
316 */ 316 */
317static bool vmballoon_send_lock_page(struct vmballoon *b, unsigned long pfn, 317static int vmballoon_send_lock_page(struct vmballoon *b, unsigned long pfn,
318 unsigned int *hv_status) 318 unsigned int *hv_status)
319{ 319{
320 unsigned long status, dummy; 320 unsigned long status, dummy;
@@ -322,17 +322,17 @@ static bool vmballoon_send_lock_page(struct vmballoon *b, unsigned long pfn,
322 322
323 pfn32 = (u32)pfn; 323 pfn32 = (u32)pfn;
324 if (pfn32 != pfn) 324 if (pfn32 != pfn)
325 return false; 325 return -1;
326 326
327 STATS_INC(b->stats.lock); 327 STATS_INC(b->stats.lock);
328 328
329 *hv_status = status = VMWARE_BALLOON_CMD(LOCK, pfn, dummy); 329 *hv_status = status = VMWARE_BALLOON_CMD(LOCK, pfn, dummy);
330 if (vmballoon_check_status(b, status)) 330 if (vmballoon_check_status(b, status))
331 return true; 331 return 0;
332 332
333 pr_debug("%s - ppn %lx, hv returns %ld\n", __func__, pfn, status); 333 pr_debug("%s - ppn %lx, hv returns %ld\n", __func__, pfn, status);
334 STATS_INC(b->stats.lock_fail); 334 STATS_INC(b->stats.lock_fail);
335 return false; 335 return 1;
336} 336}
337 337
338/* 338/*
@@ -411,7 +411,7 @@ static int vmballoon_reserve_page(struct vmballoon *b, bool can_sleep)
411 struct page *page; 411 struct page *page;
412 gfp_t flags; 412 gfp_t flags;
413 unsigned int hv_status; 413 unsigned int hv_status;
414 bool locked = false; 414 int locked;
415 flags = can_sleep ? VMW_PAGE_ALLOC_CANSLEEP : VMW_PAGE_ALLOC_NOSLEEP; 415 flags = can_sleep ? VMW_PAGE_ALLOC_CANSLEEP : VMW_PAGE_ALLOC_NOSLEEP;
416 416
417 do { 417 do {
@@ -431,7 +431,7 @@ static int vmballoon_reserve_page(struct vmballoon *b, bool can_sleep)
431 431
432 /* inform monitor */ 432 /* inform monitor */
433 locked = vmballoon_send_lock_page(b, page_to_pfn(page), &hv_status); 433 locked = vmballoon_send_lock_page(b, page_to_pfn(page), &hv_status);
434 if (!locked) { 434 if (locked > 0) {
435 STATS_INC(b->stats.refused_alloc); 435 STATS_INC(b->stats.refused_alloc);
436 436
437 if (hv_status == VMW_BALLOON_ERROR_RESET || 437 if (hv_status == VMW_BALLOON_ERROR_RESET ||
@@ -449,7 +449,7 @@ static int vmballoon_reserve_page(struct vmballoon *b, bool can_sleep)
449 if (++b->n_refused_pages >= VMW_BALLOON_MAX_REFUSED) 449 if (++b->n_refused_pages >= VMW_BALLOON_MAX_REFUSED)
450 return -EIO; 450 return -EIO;
451 } 451 }
452 } while (!locked); 452 } while (locked != 0);
453 453
454 /* track allocated page */ 454 /* track allocated page */
455 list_add(&page->lru, &b->pages); 455 list_add(&page->lru, &b->pages);