Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ae5cdd40 authored by Linus Torvalds's avatar Linus Torvalds
Browse files


Minor char-misc fixes for 3.3-rc3

Nothing big here, some Kconfig fixes for the MISC_DEVICES config option
that was being used incorrectly, and some other minor bug fixes.

Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>

* tag 'char-misc-3.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  mmc: cb710 core: Add missing spin_lock_init for irq_lock of struct cb710_chip
  cs5535-mfgpt: don't call __init function from __devinit
  vmw_balloon: fix for a -Wuninitialized warning
  drivers: misc: Remove MISC_DEVICES config option
  c2port: fix build error for duramar2150 due to missing header.
parents fe250923 b5266ea6
Loading
Loading
Loading
Loading
+3 −14
Original line number Original line Diff line number Diff line
@@ -2,24 +2,14 @@
# Misc strange devices
# Misc strange devices
#
#


# This one has to live outside of the MISC_DEVICES conditional,
menu "Misc devices"
# because it may be selected by drivers/platform/x86/hp_accel.

config SENSORS_LIS3LV02D
config SENSORS_LIS3LV02D
	tristate
	tristate
	depends on INPUT
	depends on INPUT
	select INPUT_POLLDEV
	select INPUT_POLLDEV
	default n
	default n


menuconfig MISC_DEVICES
	bool "Misc devices"
	---help---
	  Say Y here to get to see options for device drivers from various
	  different categories. This option alone does not add any kernel code.

	  If you say N, all options in this submenu will be skipped and disabled.

if MISC_DEVICES

config AD525X_DPOT
config AD525X_DPOT
	tristate "Analog Devices Digital Potentiometers"
	tristate "Analog Devices Digital Potentiometers"
	depends on (I2C || SPI) && SYSFS
	depends on (I2C || SPI) && SYSFS
@@ -516,5 +506,4 @@ source "drivers/misc/ti-st/Kconfig"
source "drivers/misc/lis3lv02d/Kconfig"
source "drivers/misc/lis3lv02d/Kconfig"
source "drivers/misc/carma/Kconfig"
source "drivers/misc/carma/Kconfig"
source "drivers/misc/altera-stapl/Kconfig"
source "drivers/misc/altera-stapl/Kconfig"

endmenu
endif # MISC_DEVICES
+1 −0
Original line number Original line Diff line number Diff line
@@ -15,6 +15,7 @@
#include <linux/module.h>
#include <linux/module.h>
#include <linux/delay.h>
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/io.h>
#include <linux/ioport.h>
#include <linux/c2port.h>
#include <linux/c2port.h>


#define DATA_PORT	0x325
#define DATA_PORT	0x325
+1 −0
Original line number Original line Diff line number Diff line
@@ -245,6 +245,7 @@ static int __devinit cb710_probe(struct pci_dev *pdev,
	if (err)
	if (err)
		return err;
		return err;


	spin_lock_init(&chip->irq_lock);
	chip->pdev = pdev;
	chip->pdev = pdev;
	chip->iobase = pcim_iomap_table(pdev)[0];
	chip->iobase = pcim_iomap_table(pdev)[0];


+1 −1
Original line number Original line Diff line number Diff line
@@ -262,7 +262,7 @@ static void __init reset_all_timers(void)
 * In other cases (such as with VSAless OpenFirmware), the system firmware
 * In other cases (such as with VSAless OpenFirmware), the system firmware
 * leaves timers available for us to use.
 * leaves timers available for us to use.
 */
 */
static int __init scan_timers(struct cs5535_mfgpt_chip *mfgpt)
static int __devinit scan_timers(struct cs5535_mfgpt_chip *mfgpt)
{
{
	struct cs5535_mfgpt_timer timer = { .chip = mfgpt };
	struct cs5535_mfgpt_timer timer = { .chip = mfgpt };
	unsigned long flags;
	unsigned long flags;
+7 −7
Original line number Original line Diff line number Diff line
@@ -314,7 +314,7 @@ static bool vmballoon_send_get_target(struct vmballoon *b, u32 *new_target)
 * fear that guest will need it. Host may reject some pages, we need to
 * fear that guest will need it. Host may reject some pages, we need to
 * check the return value and maybe submit a different page.
 * check the return value and maybe submit a different page.
 */
 */
static bool vmballoon_send_lock_page(struct vmballoon *b, unsigned long pfn,
static int vmballoon_send_lock_page(struct vmballoon *b, unsigned long pfn,
				     unsigned int *hv_status)
				     unsigned int *hv_status)
{
{
	unsigned long status, dummy;
	unsigned long status, dummy;
@@ -322,17 +322,17 @@ static bool vmballoon_send_lock_page(struct vmballoon *b, unsigned long pfn,


	pfn32 = (u32)pfn;
	pfn32 = (u32)pfn;
	if (pfn32 != pfn)
	if (pfn32 != pfn)
		return false;
		return -1;


	STATS_INC(b->stats.lock);
	STATS_INC(b->stats.lock);


	*hv_status = status = VMWARE_BALLOON_CMD(LOCK, pfn, dummy);
	*hv_status = status = VMWARE_BALLOON_CMD(LOCK, pfn, dummy);
	if (vmballoon_check_status(b, status))
	if (vmballoon_check_status(b, status))
		return true;
		return 0;


	pr_debug("%s - ppn %lx, hv returns %ld\n", __func__, pfn, status);
	pr_debug("%s - ppn %lx, hv returns %ld\n", __func__, pfn, status);
	STATS_INC(b->stats.lock_fail);
	STATS_INC(b->stats.lock_fail);
	return false;
	return 1;
}
}


/*
/*
@@ -411,7 +411,7 @@ static int vmballoon_reserve_page(struct vmballoon *b, bool can_sleep)
	struct page *page;
	struct page *page;
	gfp_t flags;
	gfp_t flags;
	unsigned int hv_status;
	unsigned int hv_status;
	bool locked = false;
	int locked;
	flags = can_sleep ? VMW_PAGE_ALLOC_CANSLEEP : VMW_PAGE_ALLOC_NOSLEEP;
	flags = can_sleep ? VMW_PAGE_ALLOC_CANSLEEP : VMW_PAGE_ALLOC_NOSLEEP;


	do {
	do {
@@ -431,7 +431,7 @@ static int vmballoon_reserve_page(struct vmballoon *b, bool can_sleep)


		/* inform monitor */
		/* inform monitor */
		locked = vmballoon_send_lock_page(b, page_to_pfn(page), &hv_status);
		locked = vmballoon_send_lock_page(b, page_to_pfn(page), &hv_status);
		if (!locked) {
		if (locked > 0) {
			STATS_INC(b->stats.refused_alloc);
			STATS_INC(b->stats.refused_alloc);


			if (hv_status == VMW_BALLOON_ERROR_RESET ||
			if (hv_status == VMW_BALLOON_ERROR_RESET ||
@@ -449,7 +449,7 @@ static int vmballoon_reserve_page(struct vmballoon *b, bool can_sleep)
			if (++b->n_refused_pages >= VMW_BALLOON_MAX_REFUSED)
			if (++b->n_refused_pages >= VMW_BALLOON_MAX_REFUSED)
				return -EIO;
				return -EIO;
		}
		}
	} while (!locked);
	} while (locked != 0);


	/* track allocated page */
	/* track allocated page */
	list_add(&page->lru, &b->pages);
	list_add(&page->lru, &b->pages);
Loading