aboutsummaryrefslogtreecommitdiffstats
diff options
authorGreg Kroah-Hartman <gregkh@suse.de>2010-02-17 16:15:41 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2010-02-17 16:15:41 -0800
commita5f8ed0d9fbacf5195ef441dc8398a9924401cb7 (patch)
treedf7a7fba335e0ccd41ad20a0bb3412a33a65625d
parent613f3b6cf3cb68645b8fef3c35a7efd11a5a4cc1 (diff)
downloadpatches-a5f8ed0d9fbacf5195ef441dc8398a9924401cb7.tar.gz
more patches
-rw-r--r--driver-core/driver-core-fix-first-line-of-kernel-doc-for-a-few-functions.patch104
-rw-r--r--driver-core/sysdev-fix-missing-s390-conversion.patch35
-rw-r--r--driver-core/uio-add-a-driver-for-hilscher-netx-based-fieldbus-cards.patch225
-rw-r--r--driver-core/uio-minor-kconfig-fixes.patch38
-rw-r--r--driver-core/uio-remove-smx-cryptengine-driver.patch197
-rw-r--r--series28
-rw-r--r--staging/staging-comedi-bracing-fix-to-ni_atmio.c.patch97
-rw-r--r--staging/staging-comedi-fix-brace-coding-style-issue-in-ni_labpc.c.patch36
-rw-r--r--staging/staging-comedi-rti800-more-checkpatch-cleanups.patch92
-rw-r--r--staging/staging-dream-another-codestyle-patch.patch285
-rw-r--r--staging/staging-dream-codestyle-fix.patch119
-rw-r--r--staging/staging-dream-more-code-style-fixes.patch68
-rw-r--r--staging/staging-hv-add-proper-versioning-to-hv-drivers.patch149
-rw-r--r--staging/staging-hv-rename-struct-device_context-and-re-arrange-the-fields-inside.patch325
-rw-r--r--staging/staging-new-device-id-for-rtl8192e.patch33
-rw-r--r--staging/staging-r8187se-change-to-use-common-eeprom-routines-in-eeprom_93cx.patch358
-rw-r--r--staging/staging-r8187se-fix-for-led-not-following-radio-switch.patch36
-rw-r--r--staging/staging-vt6655-add-missing-curly-braces.patch43
-rw-r--r--staging/staging-wlan-ng-clean-up-assignments-in-if-statements.patch78
-rw-r--r--staging/staging-wlan-ng-multiple-safe-style-cleanups.patch1155
-rw-r--r--usb/usb-ehci-omap-update-todo-list-in-comments.patch32
-rw-r--r--usb/usb-ehci-omap-use-default-interrupt-threshold.patch32
-rw-r--r--usb/usb-ohci-da8xx-omap-l1x-glue-layer.patch509
-rw-r--r--usb/usb-omap-ehci-kill-2-compile-warnings.patch32
-rw-r--r--usb/usb-remove-debugging-message-for-uevent-constructions.patch40
-rw-r--r--usb/usb-serial-sierra-driver-adding-reset_resume-function.patch71
-rw-r--r--usb/usb-serial-sierra-driver-indat_callback-fix.patch58
-rw-r--r--usb/usb-xhci-fix-finding-extended-capabilities-registers.patch44
28 files changed, 4319 insertions, 0 deletions
diff --git a/driver-core/driver-core-fix-first-line-of-kernel-doc-for-a-few-functions.patch b/driver-core/driver-core-fix-first-line-of-kernel-doc-for-a-few-functions.patch
new file mode 100644
index 00000000000000..618458966bc7b5
--- /dev/null
+++ b/driver-core/driver-core-fix-first-line-of-kernel-doc-for-a-few-functions.patch
@@ -0,0 +1,104 @@
+From ben@decadent.org.uk Wed Feb 17 16:05:12 2010
+From: Ben Hutchings <ben@decadent.org.uk>
+Date: Sun, 14 Feb 2010 14:18:53 +0000
+Subject: Driver core: Fix first line of kernel-doc for a few functions
+To: Greg Kroah-Hartman <gregkh@suse.de>
+Message-ID: <1266157133.10567.14.camel@localhost>
+
+
+The function name must be followed by a space, hypen, space, and a
+short description.
+
+Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/base/firmware_class.c | 2 +-
+ drivers/base/platform.c | 16 ++++++++--------
+ 2 files changed, 9 insertions(+), 9 deletions(-)
+
+--- a/drivers/base/firmware_class.c
++++ b/drivers/base/firmware_class.c
+@@ -613,7 +613,7 @@ request_firmware_work_func(void *arg)
+ }
+
+ /**
+- * request_firmware_nowait: asynchronous version of request_firmware
++ * request_firmware_nowait - asynchronous version of request_firmware
+ * @module: module requesting the firmware
+ * @uevent: sends uevent to copy the firmware image if this flag
+ * is non-zero else the firmware copy must be done manually.
+--- a/drivers/base/platform.c
++++ b/drivers/base/platform.c
+@@ -128,7 +128,7 @@ struct platform_object {
+ };
+
+ /**
+- * platform_device_put
++ * platform_device_put - destroy a platform device
+ * @pdev: platform device to free
+ *
+ * Free all memory associated with a platform device. This function must
+@@ -152,7 +152,7 @@ static void platform_device_release(stru
+ }
+
+ /**
+- * platform_device_alloc
++ * platform_device_alloc - create a platform device
+ * @name: base name of the device we're adding
+ * @id: instance id
+ *
+@@ -177,7 +177,7 @@ struct platform_device *platform_device_
+ EXPORT_SYMBOL_GPL(platform_device_alloc);
+
+ /**
+- * platform_device_add_resources
++ * platform_device_add_resources - add resources to a platform device
+ * @pdev: platform device allocated by platform_device_alloc to add resources to
+ * @res: set of resources that needs to be allocated for the device
+ * @num: number of resources
+@@ -202,7 +202,7 @@ int platform_device_add_resources(struct
+ EXPORT_SYMBOL_GPL(platform_device_add_resources);
+
+ /**
+- * platform_device_add_data
++ * platform_device_add_data - add platform-specific data to a platform device
+ * @pdev: platform device allocated by platform_device_alloc to add resources to
+ * @data: platform specific data for this platform device
+ * @size: size of platform specific data
+@@ -344,7 +344,7 @@ void platform_device_unregister(struct p
+ EXPORT_SYMBOL_GPL(platform_device_unregister);
+
+ /**
+- * platform_device_register_simple
++ * platform_device_register_simple - add a platform-level device and its resources
+ * @name: base name of the device we're adding
+ * @id: instance id
+ * @res: set of resources that needs to be allocated for the device
+@@ -396,7 +396,7 @@ error:
+ EXPORT_SYMBOL_GPL(platform_device_register_simple);
+
+ /**
+- * platform_device_register_data
++ * platform_device_register_data - add a platform-level device with platform-specific data
+ * @parent: parent device for the device we're adding
+ * @name: base name of the device we're adding
+ * @id: instance id
+@@ -473,7 +473,7 @@ static void platform_drv_shutdown(struct
+ }
+
+ /**
+- * platform_driver_register
++ * platform_driver_register - register a driver for platform-level devices
+ * @drv: platform driver structure
+ */
+ int platform_driver_register(struct platform_driver *drv)
+@@ -491,7 +491,7 @@ int platform_driver_register(struct plat
+ EXPORT_SYMBOL_GPL(platform_driver_register);
+
+ /**
+- * platform_driver_unregister
++ * platform_driver_unregister - unregister a driver for platform-level devices
+ * @drv: platform driver structure
+ */
+ void platform_driver_unregister(struct platform_driver *drv)
diff --git a/driver-core/sysdev-fix-missing-s390-conversion.patch b/driver-core/sysdev-fix-missing-s390-conversion.patch
new file mode 100644
index 00000000000000..4601c2c15fbc94
--- /dev/null
+++ b/driver-core/sysdev-fix-missing-s390-conversion.patch
@@ -0,0 +1,35 @@
+From heiko.carstens@de.ibm.com Wed Feb 17 15:56:39 2010
+From: Heiko Carstens <heiko.carstens@de.ibm.com>
+Date: Fri, 12 Feb 2010 11:19:24 +0100
+Subject: sysdev: fix missing s390 conversion
+To: Greg Kroah-Hartman <gregkh@suse.de>
+Cc: Andi Kleen <ak@linux.intel.com>, Martin Schwidefsky <schwidefsky@de.ibm.com>, linux-kernel@vger.kernel.org
+Message-ID: <20100212101924.GA27548@osiris.boeblingen.de.ibm.com>
+
+From: Heiko Carstens <heiko.carstens@de.ibm.com>
+
+In linux-next "sysdev: Pass attribute in sysdev_class attributes show/store"
+forgot to convert one place in s390 code. Here is the missing part.
+
+Cc: Andi Kleen <ak@linux.intel.com>
+Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
+Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/s390/kernel/smp.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/arch/s390/kernel/smp.c
++++ b/arch/s390/kernel/smp.c
+@@ -1017,7 +1017,9 @@ static ssize_t __ref rescan_store(struct
+ static SYSDEV_CLASS_ATTR(rescan, 0200, NULL, rescan_store);
+ #endif /* CONFIG_HOTPLUG_CPU */
+
+-static ssize_t dispatching_show(struct sysdev_class *class, char *buf)
++static ssize_t dispatching_show(struct sysdev_class *class,
++ struct sysdev_class_attribute *attr,
++ char *buf)
+ {
+ ssize_t count;
+
diff --git a/driver-core/uio-add-a-driver-for-hilscher-netx-based-fieldbus-cards.patch b/driver-core/uio-add-a-driver-for-hilscher-netx-based-fieldbus-cards.patch
new file mode 100644
index 00000000000000..4b2298e055b53d
--- /dev/null
+++ b/driver-core/uio-add-a-driver-for-hilscher-netx-based-fieldbus-cards.patch
@@ -0,0 +1,225 @@
+From hjk@linutronix.de Wed Feb 17 15:34:20 2010
+From: "Hans J. Koch" <hjk@linutronix.de>
+Date: Tue, 9 Feb 2010 20:13:49 +0100
+Subject: UIO: Add a driver for Hilscher netX-based fieldbus cards
+Cc: Greg Kroah-Hartman <gregkh@suse.de>, Manuel Traut <manut@linutronix.de>
+Message-ID: <20100209191349.GE3229@local>
+Content-Disposition: inline
+
+
+This patch adds a Userspace IO driver for netX-based fieldbus cards by
+Hilscher (see http://www.hilscher.com). ATM, cifX and comX cards are
+supported. The userspace part for this driver is provided by Hilscher
+and should come with the card.
+The driver is in use for several months now and has been tested by
+people at Hilscher and Linutronix.
+
+Signed-off-by: Hans J. Koch <hjk@linutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/uio/Kconfig | 11 +++
+ drivers/uio/Makefile | 1
+ drivers/uio/uio_netx.c | 172 +++++++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 184 insertions(+)
+
+--- a/drivers/uio/Kconfig
++++ b/drivers/uio/Kconfig
+@@ -94,4 +94,15 @@ config UIO_PCI_GENERIC
+ primarily, for virtualization scenarios.
+ If you compile this as a module, it will be called uio_pci_generic.
+
++config UIO_NETX
++ tristate "Hilscher NetX Card driver"
++ depends on PCI
++ help
++ Driver for Hilscher NetX based fieldbus cards (cifX, comX).
++ This driver requires a userspace component that comes with the card
++ or is available from Hilscher (http://www.hilscher.com).
++
++ To compile this driver as a module, choose M here; the module
++ will be called uio_netx.
++
+ endif
+--- a/drivers/uio/Makefile
++++ b/drivers/uio/Makefile
+@@ -6,3 +6,4 @@ obj-$(CONFIG_UIO_SMX) += uio_smx.o
+ obj-$(CONFIG_UIO_AEC) += uio_aec.o
+ obj-$(CONFIG_UIO_SERCOS3) += uio_sercos3.o
+ obj-$(CONFIG_UIO_PCI_GENERIC) += uio_pci_generic.o
++obj-$(CONFIG_UIO_NETX) += uio_netx.o
+--- /dev/null
++++ b/drivers/uio/uio_netx.c
+@@ -0,0 +1,172 @@
++/*
++ * UIO driver for Hilscher NetX based fieldbus cards (cifX, comX).
++ * See http://www.hilscher.com for details.
++ *
++ * (C) 2007 Hans J. Koch <hjk@linutronix.de>
++ * (C) 2008 Manuel Traut <manut@linutronix.de>
++ *
++ * Licensed under GPL version 2 only.
++ *
++ */
++
++#include <linux/device.h>
++#include <linux/io.h>
++#include <linux/module.h>
++#include <linux/pci.h>
++#include <linux/uio_driver.h>
++
++#define PCI_VENDOR_ID_HILSCHER 0x15CF
++#define PCI_DEVICE_ID_HILSCHER_NETX 0x0000
++#define PCI_SUBDEVICE_ID_NXSB_PCA 0x3235
++#define PCI_SUBDEVICE_ID_NXPCA 0x3335
++
++#define DPM_HOST_INT_EN0 0xfff0
++#define DPM_HOST_INT_STAT0 0xffe0
++
++#define DPM_HOST_INT_MASK 0xe600ffff
++#define DPM_HOST_INT_GLOBAL_EN 0x80000000
++
++static irqreturn_t netx_handler(int irq, struct uio_info *dev_info)
++{
++ void __iomem *int_enable_reg = dev_info->mem[0].internal_addr
++ + DPM_HOST_INT_EN0;
++ void __iomem *int_status_reg = dev_info->mem[0].internal_addr
++ + DPM_HOST_INT_STAT0;
++
++ /* Is one of our interrupts enabled and active ? */
++ if (!(ioread32(int_enable_reg) & ioread32(int_status_reg)
++ & DPM_HOST_INT_MASK))
++ return IRQ_NONE;
++
++ /* Disable interrupt */
++ iowrite32(ioread32(int_enable_reg) & ~DPM_HOST_INT_GLOBAL_EN,
++ int_enable_reg);
++ return IRQ_HANDLED;
++}
++
++static int __devinit netx_pci_probe(struct pci_dev *dev,
++ const struct pci_device_id *id)
++{
++ struct uio_info *info;
++ int bar;
++
++ info = kzalloc(sizeof(struct uio_info), GFP_KERNEL);
++ if (!info)
++ return -ENOMEM;
++
++ if (pci_enable_device(dev))
++ goto out_free;
++
++ if (pci_request_regions(dev, "netx"))
++ goto out_disable;
++
++ switch (id->device) {
++ case PCI_DEVICE_ID_HILSCHER_NETX:
++ bar = 0;
++ info->name = "netx";
++ break;
++ default:
++ bar = 2;
++ info->name = "netx_plx";
++ }
++
++ /* BAR0 or 2 points to the card's dual port memory */
++ info->mem[0].addr = pci_resource_start(dev, bar);
++ if (!info->mem[0].addr)
++ goto out_release;
++ info->mem[0].internal_addr = ioremap(pci_resource_start(dev, bar),
++ pci_resource_len(dev, bar));
++
++ if (!info->mem[0].internal_addr)
++ goto out_release;
++
++ info->mem[0].size = pci_resource_len(dev, bar);
++ info->mem[0].memtype = UIO_MEM_PHYS;
++ info->irq = dev->irq;
++ info->irq_flags = IRQF_SHARED;
++ info->handler = netx_handler;
++ info->version = "0.0.1";
++
++ /* Make sure all interrupts are disabled */
++ iowrite32(0, info->mem[0].internal_addr + DPM_HOST_INT_EN0);
++
++ if (uio_register_device(&dev->dev, info))
++ goto out_unmap;
++
++ pci_set_drvdata(dev, info);
++ dev_info(&dev->dev, "Found %s card, registered UIO device.\n",
++ info->name);
++
++ return 0;
++
++out_unmap:
++ iounmap(info->mem[0].internal_addr);
++out_release:
++ pci_release_regions(dev);
++out_disable:
++ pci_disable_device(dev);
++out_free:
++ kfree(info);
++ return -ENODEV;
++}
++
++static void netx_pci_remove(struct pci_dev *dev)
++{
++ struct uio_info *info = pci_get_drvdata(dev);
++
++ /* Disable all interrupts */
++ iowrite32(0, info->mem[0].internal_addr + DPM_HOST_INT_EN0);
++ uio_unregister_device(info);
++ pci_release_regions(dev);
++ pci_disable_device(dev);
++ pci_set_drvdata(dev, NULL);
++ iounmap(info->mem[0].internal_addr);
++
++ kfree(info);
++}
++
++static struct pci_device_id netx_pci_ids[] = {
++ {
++ .vendor = PCI_VENDOR_ID_HILSCHER,
++ .device = PCI_DEVICE_ID_HILSCHER_NETX,
++ .subvendor = 0,
++ .subdevice = 0,
++ },
++ {
++ .vendor = PCI_VENDOR_ID_PLX,
++ .device = PCI_DEVICE_ID_PLX_9030,
++ .subvendor = PCI_VENDOR_ID_PLX,
++ .subdevice = PCI_SUBDEVICE_ID_NXSB_PCA,
++ },
++ {
++ .vendor = PCI_VENDOR_ID_PLX,
++ .device = PCI_DEVICE_ID_PLX_9030,
++ .subvendor = PCI_VENDOR_ID_PLX,
++ .subdevice = PCI_SUBDEVICE_ID_NXPCA,
++ },
++ { 0, }
++};
++
++static struct pci_driver netx_pci_driver = {
++ .name = "netx",
++ .id_table = netx_pci_ids,
++ .probe = netx_pci_probe,
++ .remove = netx_pci_remove,
++};
++
++static int __init netx_init_module(void)
++{
++ return pci_register_driver(&netx_pci_driver);
++}
++
++static void __exit netx_exit_module(void)
++{
++ pci_unregister_driver(&netx_pci_driver);
++}
++
++module_init(netx_init_module);
++module_exit(netx_exit_module);
++
++MODULE_DEVICE_TABLE(pci, netx_pci_ids);
++MODULE_LICENSE("GPL v2");
++MODULE_AUTHOR("Hans J. Koch, Manuel Traut");
diff --git a/driver-core/uio-minor-kconfig-fixes.patch b/driver-core/uio-minor-kconfig-fixes.patch
new file mode 100644
index 00000000000000..4d20fceca98ee8
--- /dev/null
+++ b/driver-core/uio-minor-kconfig-fixes.patch
@@ -0,0 +1,38 @@
+From john.ogness@linutronix.de Wed Feb 17 15:36:36 2010
+From: John Ogness <john.ogness@linutronix.de>
+Date: Thu, 11 Feb 2010 15:38:53 +0100
+Subject: UIO: minor Kconfig fixes
+Cc: "Greg Kroah-Hartman" <gregkh@suse.de>, "Michael S. Tsirkin" <mst@redhat.com>, "Hans J. Koch" <hjk@linutronix.de>
+Message-ID: <80vde3rg5e.fsf@merkur.tec.linutronix.de>
+
+
+Two trivial fixes for the Userspace IO Kconfig file:
+1) uio_sercos3 is a PCI driver, so let it depend on PCI.
+2) "default n" under UIO_PCI_GENERIC is luxury since it is already the default.
+
+Acked-by: John Ogness <john.ogness@linutronix.de>
+Signed-off-by: Hans J. Koch <hjk@linutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/uio/Kconfig | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/uio/Kconfig
++++ b/drivers/uio/Kconfig
+@@ -74,6 +74,7 @@ config UIO_AEC
+
+ config UIO_SERCOS3
+ tristate "Automata Sercos III PCI card driver"
++ depends on PCI
+ help
+ Userspace I/O interface for the Sercos III PCI card from
+ Automata GmbH. The userspace part of this driver will be
+@@ -87,7 +88,6 @@ config UIO_SERCOS3
+ config UIO_PCI_GENERIC
+ tristate "Generic driver for PCI 2.3 and PCI Express cards"
+ depends on PCI
+- default n
+ help
+ Generic driver that you can bind, dynamically, to any
+ PCI 2.3 compliant and PCI Express card. It is useful,
diff --git a/driver-core/uio-remove-smx-cryptengine-driver.patch b/driver-core/uio-remove-smx-cryptengine-driver.patch
new file mode 100644
index 00000000000000..6e4f5817f10acf
--- /dev/null
+++ b/driver-core/uio-remove-smx-cryptengine-driver.patch
@@ -0,0 +1,197 @@
+From hjk@linutronix.de Wed Feb 17 15:37:10 2010
+From: "Hans J. Koch" <hjk@linutronix.de>
+Date: Wed, 10 Feb 2010 20:12:42 +0100
+Subject: UIO: Remove SMX Cryptengine driver
+Cc: Greg Kroah-Hartman <gregkh@suse.de>, Ben Nizette <bn@niasdigital.com>
+Message-ID: <20100210191241.GD2946@local>
+Content-Disposition: inline
+
+
+Ben Nizette, the author of this driver, told me in a private mail that this
+project has been cancelled. He suggested to remove the driver for now, and
+will come back with a new version should the hardware really exist.
+This patch completely removes the driver.
+
+Signed-off-by: Hans J. Koch <hjk@linutronix.de>
+Acked-by: Ben Nizette <bn@niasdigital.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/uio/Kconfig | 11 ---
+ drivers/uio/Makefile | 1
+ drivers/uio/uio_smx.c | 140 --------------------------------------------------
+ 3 files changed, 152 deletions(-)
+
+--- a/drivers/uio/Kconfig
++++ b/drivers/uio/Kconfig
+@@ -44,17 +44,6 @@ config UIO_PDRV_GENIRQ
+
+ If you don't know what to do here, say N.
+
+-config UIO_SMX
+- tristate "SMX cryptengine UIO interface"
+- help
+- Userspace IO interface to the Cryptography engine found on the
+- Nias Digital SMX boards. These will be available from Q4 2008
+- from http://www.niasdigital.com. The userspace part of this
+- driver will be released under the GPL at the same time as the
+- hardware and will be able to be downloaded from the same site.
+-
+- If you compile this as a module, it will be called uio_smx.
+-
+ config UIO_AEC
+ tristate "AEC video timestamp device"
+ depends on PCI
+--- a/drivers/uio/Makefile
++++ b/drivers/uio/Makefile
+@@ -2,7 +2,6 @@ obj-$(CONFIG_UIO) += uio.o
+ obj-$(CONFIG_UIO_CIF) += uio_cif.o
+ obj-$(CONFIG_UIO_PDRV) += uio_pdrv.o
+ obj-$(CONFIG_UIO_PDRV_GENIRQ) += uio_pdrv_genirq.o
+-obj-$(CONFIG_UIO_SMX) += uio_smx.o
+ obj-$(CONFIG_UIO_AEC) += uio_aec.o
+ obj-$(CONFIG_UIO_SERCOS3) += uio_sercos3.o
+ obj-$(CONFIG_UIO_PCI_GENERIC) += uio_pci_generic.o
+--- a/drivers/uio/uio_smx.c
++++ /dev/null
+@@ -1,140 +0,0 @@
+-/*
+- * UIO SMX Cryptengine driver.
+- *
+- * (C) 2008 Nias Digital P/L <bn@niasdigital.com>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License version 2 as
+- * published by the Free Software Foundation.
+- *
+- */
+-
+-#include <linux/device.h>
+-#include <linux/module.h>
+-#include <linux/platform_device.h>
+-#include <linux/uio_driver.h>
+-#include <linux/io.h>
+-
+-#define DRV_NAME "smx-ce"
+-#define DRV_VERSION "0.03"
+-
+-#define SMX_CSR 0x00000000
+-#define SMX_EnD 0x00000001
+-#define SMX_RUN 0x00000002
+-#define SMX_DRDY 0x00000004
+-#define SMX_ERR 0x00000008
+-
+-static irqreturn_t smx_handler(int irq, struct uio_info *dev_info)
+-{
+- void __iomem *csr = dev_info->mem[0].internal_addr + SMX_CSR;
+-
+- u32 status = ioread32(csr);
+-
+- if (!(status & SMX_DRDY))
+- return IRQ_NONE;
+-
+- /* Disable interrupt */
+- iowrite32(status & ~SMX_DRDY, csr);
+- return IRQ_HANDLED;
+-}
+-
+-static int __devinit smx_ce_probe(struct platform_device *dev)
+-{
+-
+- int ret = -ENODEV;
+- struct uio_info *info;
+- struct resource *regs;
+-
+- info = kzalloc(sizeof(struct uio_info), GFP_KERNEL);
+- if (!info)
+- return -ENOMEM;
+-
+- regs = platform_get_resource(dev, IORESOURCE_MEM, 0);
+- if (!regs) {
+- dev_err(&dev->dev, "No memory resource specified\n");
+- goto out_free;
+- }
+-
+- info->mem[0].addr = regs->start;
+- if (!info->mem[0].addr) {
+- dev_err(&dev->dev, "Invalid memory resource\n");
+- goto out_free;
+- }
+-
+- info->mem[0].size = regs->end - regs->start + 1;
+- info->mem[0].internal_addr = ioremap(regs->start, info->mem[0].size);
+-
+- if (!info->mem[0].internal_addr) {
+- dev_err(&dev->dev, "Can't remap memory address range\n");
+- goto out_free;
+- }
+-
+- info->mem[0].memtype = UIO_MEM_PHYS;
+-
+- info->name = "smx-ce";
+- info->version = "0.03";
+-
+- info->irq = platform_get_irq(dev, 0);
+- if (info->irq < 0) {
+- ret = info->irq;
+- dev_err(&dev->dev, "No (or invalid) IRQ resource specified\n");
+- goto out_unmap;
+- }
+-
+- info->irq_flags = IRQF_SHARED;
+- info->handler = smx_handler;
+-
+- platform_set_drvdata(dev, info);
+-
+- ret = uio_register_device(&dev->dev, info);
+-
+- if (ret)
+- goto out_unmap;
+-
+- return 0;
+-
+-out_unmap:
+- iounmap(info->mem[0].internal_addr);
+-out_free:
+- kfree(info);
+-
+- return ret;
+-}
+-
+-static int __devexit smx_ce_remove(struct platform_device *dev)
+-{
+- struct uio_info *info = platform_get_drvdata(dev);
+-
+- uio_unregister_device(info);
+- platform_set_drvdata(dev, NULL);
+- iounmap(info->mem[0].internal_addr);
+-
+- kfree(info);
+-
+- return 0;
+-}
+-
+-static struct platform_driver smx_ce_driver = {
+- .probe = smx_ce_probe,
+- .remove = __devexit_p(smx_ce_remove),
+- .driver = {
+- .name = DRV_NAME,
+- .owner = THIS_MODULE,
+- },
+-};
+-
+-static int __init smx_ce_init_module(void)
+-{
+- return platform_driver_register(&smx_ce_driver);
+-}
+-module_init(smx_ce_init_module);
+-
+-static void __exit smx_ce_exit_module(void)
+-{
+- platform_driver_unregister(&smx_ce_driver);
+-}
+-module_exit(smx_ce_exit_module);
+-
+-MODULE_LICENSE("GPL v2");
+-MODULE_VERSION(DRV_VERSION);
+-MODULE_AUTHOR("Ben Nizette <bn@niasdigital.com>");
diff --git a/series b/series
index 7fcc723f9d9b35..6f83ee453fd0ae 100644
--- a/series
+++ b/series
@@ -44,6 +44,7 @@ driver-core/sysdev-convert-node-driver.patch
driver-core/sysdev-use-sysdev_class-attribute-arrays-in-node-driver.patch
driver-core/sysdev-add-sysdev_create-remove_files.patch
driver-core/sysdev-fix-type-of-sysdev-class-attribute-in-memory-driver.patch
+driver-core/sysdev-fix-missing-s390-conversion.patch
driver-core/sysdev-add-attribute-argument-to-class_attribute-show-store.patch
driver-core/driver-core-add-class_attr_string-for-simple-read-only-string.patch
driver-core/driver-core-convert-some-drivers-to-class_attr_string.patch
@@ -69,6 +70,10 @@ driver-core/media-move-omap24xxcam-s-probe-function-to-.devinit.text.patch
driver-core/auxdisplay-move-cfag12864bfb-s-probe-function-to-.devinit.text.patch
driver-core/net-move-am79c961-s-probe-function-to-.devinit.text.patch
driver-core/sysfs-differentiate-between-locking-links-and-non-links.patch
+driver-core/uio-add-a-driver-for-hilscher-netx-based-fieldbus-cards.patch
+driver-core/uio-minor-kconfig-fixes.patch
+driver-core/uio-remove-smx-cryptengine-driver.patch
+driver-core/driver-core-fix-first-line-of-kernel-doc-for-a-few-functions.patch
driver-core/driver-core-create-lock-unlock-functions-for-struct-device.patch
driver-core/drivers-base-convert-sema.patch
@@ -310,6 +315,14 @@ usb/usb-convert-concatenated-__file__-to-s-__file__.patch
usb/usb-extend-and-neaten-dbg-macros.patch
usb/usb-cp210x-add-81e8-zephyr-bioharness.patch
usb/tty-fix-various-bogus-warn-checks-in-the-usb-serial-layer.patch
+usb/usb-remove-debugging-message-for-uevent-constructions.patch
+usb/usb-xhci-fix-finding-extended-capabilities-registers.patch
+usb/usb-serial-sierra-driver-adding-reset_resume-function.patch
+usb/usb-serial-sierra-driver-indat_callback-fix.patch
+usb/usb-omap-ehci-kill-2-compile-warnings.patch
+usb/usb-ehci-omap-use-default-interrupt-threshold.patch
+usb/usb-ehci-omap-update-todo-list-in-comments.patch
+usb/usb-ohci-da8xx-omap-l1x-glue-layer.patch
#######################################
@@ -421,6 +434,8 @@ staging/staging-hv-remove-unneeded-onopen-callback.patch
staging/staging-hv-remove-unneeded-onclose-callback.patch
staging/staging-hv-remove-xen-legacy-code-and-check-for-hyper-v.patch
staging/staging-hv-fix-various-coding-style-issues-in-ringbuffer.c.patch
+staging/staging-hv-add-proper-versioning-to-hv-drivers.patch
+staging/staging-hv-rename-struct-device_context-and-re-arrange-the-fields-inside.patch
staging/staging-dt3155-use-pci_get_device.patch
staging/staging-rt2870-rtusb_probe-should-be-in-section-__devinit.patch
@@ -578,6 +593,19 @@ staging/staging-rar_register-fix-checkpatch-errors-and-debug-header-file.patch
staging/staging-rar_register-fix-checkpatch-errors-and-debug-program-file.patch
staging/staging-rar_register-add-suspend-and-resume-functions.patch
+staging/staging-comedi-rti800-more-checkpatch-cleanups.patch
+staging/staging-new-device-id-for-rtl8192e.patch
+staging/staging-dream-codestyle-fix.patch
+staging/staging-dream-another-codestyle-patch.patch
+staging/staging-dream-more-code-style-fixes.patch
+staging/staging-r8187se-change-to-use-common-eeprom-routines-in-eeprom_93cx.patch
+staging/staging-r8187se-fix-for-led-not-following-radio-switch.patch
+staging/staging-vt6655-add-missing-curly-braces.patch
+staging/staging-comedi-fix-brace-coding-style-issue-in-ni_labpc.c.patch
+staging/staging-comedi-bracing-fix-to-ni_atmio.c.patch
+staging-wlan-ng-clean-up-assignments-in-if-statements.patch
+staging-wlan-ng-multiple-safe-style-cleanups.patch
+
dvb-l64781.ko-broken-with-gcc-4.5.patch
diff --git a/staging/staging-comedi-bracing-fix-to-ni_atmio.c.patch b/staging/staging-comedi-bracing-fix-to-ni_atmio.c.patch
new file mode 100644
index 00000000000000..5eea52a37e3bd3
--- /dev/null
+++ b/staging/staging-comedi-bracing-fix-to-ni_atmio.c.patch
@@ -0,0 +1,97 @@
+From gman.1352@googlemail.com Wed Feb 17 16:04:11 2010
+From: Graham M Howe <gman.1352@googlemail.com>
+Date: Sat, 13 Feb 2010 20:21:43 +0000
+Subject: Staging: comedi: bracing fix to ni_atmio.c
+To: gregkh@suse.de, wfp5p@virginia.edu
+Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
+Message-ID: <1266092503-5115-1-git-send-email-user@graham-eeepc>
+
+Subject: Staging: comedi: bracing fix to ni_atmio.c
+
+This is a patch to ni_atmio.c file to fix up bracing style problems
+found by checkpatch.pl tool
+
+Signed-off-by: Graham M Howe <gman.1352@googlemail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/staging/comedi/drivers/ni_atmio.c | 34 +++++++++++++++---------------
+ 1 file changed, 17 insertions(+), 17 deletions(-)
+
+--- a/drivers/staging/comedi/drivers/ni_atmio.c
++++ b/drivers/staging/comedi/drivers/ni_atmio.c
+@@ -329,11 +329,11 @@ static uint16_t ni_atmio_win_in(struct c
+ }
+
+ static struct pnp_device_id device_ids[] = {
+- {.id = "NIC1900",.driver_data = 0},
+- {.id = "NIC2400",.driver_data = 0},
+- {.id = "NIC2500",.driver_data = 0},
+- {.id = "NIC2600",.driver_data = 0},
+- {.id = "NIC2700",.driver_data = 0},
++ {.id = "NIC1900", .driver_data = 0},
++ {.id = "NIC2400", .driver_data = 0},
++ {.id = "NIC2500", .driver_data = 0},
++ {.id = "NIC2600", .driver_data = 0},
++ {.id = "NIC2700", .driver_data = 0},
+ {.id = ""}
+ };
+
+@@ -362,9 +362,9 @@ static int ni_atmio_detach(struct comedi
+
+ if (dev->iobase)
+ release_region(dev->iobase, NI_SIZE);
+- if (dev->irq) {
++ if (dev->irq)
+ free_irq(dev->irq, dev);
+- }
++
+ if (devpriv->isapnp_dev)
+ pnp_device_detach(devpriv->isapnp_dev);
+
+@@ -387,8 +387,8 @@ static int ni_isapnp_find_board(struct p
+
+ if (pnp_device_attach(isapnp_dev) < 0) {
+ printk
+- ("ni_atmio: %s found but already active, skipping.\n",
+- ni_boards[i].name);
++ ("ni_atmio: %s found but already active, skipping.\n",
++ ni_boards[i].name);
+ continue;
+ }
+ if (pnp_activate_dev(isapnp_dev) < 0) {
+@@ -496,9 +496,9 @@ static int ni_atmio_attach(struct comedi
+ /* generic E series stuff in ni_mio_common.c */
+
+ ret = ni_E_init(dev, it);
+- if (ret < 0) {
++ if (ret < 0)
+ return ret;
+- }
++
+
+ return 0;
+ }
+@@ -509,16 +509,16 @@ static int ni_getboardtype(struct comedi
+ int i;
+
+ for (i = 0; i < n_ni_boards; i++) {
+- if (ni_boards[i].device_id == device_id) {
++ if (ni_boards[i].device_id == device_id)
+ return i;
+- }
++
+ }
+- if (device_id == 255) {
++ if (device_id == 255)
+ printk(" can't find board\n");
+- } else if (device_id == 0) {
++ else if (device_id == 0)
+ printk(" EEPROM read error (?) or device not found\n");
+- } else {
++ else
+ printk(" unknown device ID %d -- contact author\n", device_id);
+- }
++
+ return -1;
+ }
diff --git a/staging/staging-comedi-fix-brace-coding-style-issue-in-ni_labpc.c.patch b/staging/staging-comedi-fix-brace-coding-style-issue-in-ni_labpc.c.patch
new file mode 100644
index 00000000000000..187f005f3fc8e3
--- /dev/null
+++ b/staging/staging-comedi-fix-brace-coding-style-issue-in-ni_labpc.c.patch
@@ -0,0 +1,36 @@
+From Maurice@driverdev.linuxdriverproject.org Wed Feb 17 16:03:23 2010
+From: Maurice Dawson <maurice2699@btinternet.com>
+Date: Sat, 13 Feb 2010 16:31:04 +0000
+Subject: Staging: comedi: fix brace coding style issue in ni_labpc.c
+To: gregkh@suse.de, wfp5p@virginia.edu, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
+Cc: Maurice Dawson <maurice2699@btinternet.com>, Maurice <maurice@ubuntu.ubuntu-domain>
+Message-ID: <1266078664-2098-1-git-send-email-maurice@ubuntu.ubuntu-domain>
+
+
+This is a patch to the ni_labpc.c file that fixes up a brace warning
+found by the checkpatch.pl tool.
+
+Signed-off-by: Maurice Dawson <maurice2699@btinternet.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/staging/comedi/drivers/ni_labpc.c | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+--- a/drivers/staging/comedi/drivers/ni_labpc.c
++++ b/drivers/staging/comedi/drivers/ni_labpc.c
+@@ -483,12 +483,10 @@ int labpc_common_attach(struct comedi_de
+
+ printk("comedi%d: ni_labpc: %s, io 0x%lx", dev->minor, thisboard->name,
+ iobase);
+- if (irq) {
++ if (irq)
+ printk(", irq %u", irq);
+- }
+- if (dma_chan) {
++ if (dma_chan)
+ printk(", dma %u", dma_chan);
+- }
+ printk("\n");
+
+ if (iobase == 0) {
diff --git a/staging/staging-comedi-rti800-more-checkpatch-cleanups.patch b/staging/staging-comedi-rti800-more-checkpatch-cleanups.patch
new file mode 100644
index 00000000000000..7cec468e090d85
--- /dev/null
+++ b/staging/staging-comedi-rti800-more-checkpatch-cleanups.patch
@@ -0,0 +1,92 @@
+From b.adolphi@googlemail.com Wed Feb 17 15:26:19 2010
+From: Benjamin Adolphi <b.adolphi@googlemail.com>
+Date: Sat, 6 Feb 2010 15:12:32 +0100
+Subject: Staging: comedi: rti800: more Checkpatch cleanups
+To: Greg Kroah-Hartman <gregkh@suse.de>
+Cc: Benjamin Adolphi <b.adolphi@gmail.com>
+Message-ID: <1265465552-12113-1-git-send-email-b.adolphi@gmail.com>
+
+
+This fixes all checkpatch issues in the rti800 comedi driver.
+
+Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/staging/comedi/drivers/rti800.c | 20 +++++++++-----------
+ 1 file changed, 9 insertions(+), 11 deletions(-)
+
+--- a/drivers/staging/comedi/drivers/rti800.c
++++ b/drivers/staging/comedi/drivers/rti800.c
+@@ -225,7 +225,7 @@ static int rti800_ai_insn_read(struct co
+ for (t = RTI800_TIMEOUT; t; t--) {
+ status = inb(dev->iobase + RTI800_CSR);
+ if (status & RTI800_OVERRUN) {
+- printk("rti800: a/d overrun\n");
++ printk(KERN_WARNING "rti800: a/d overrun\n");
+ outb(0, dev->iobase + RTI800_CLRFLAGS);
+ return -EIO;
+ }
+@@ -234,7 +234,7 @@ static int rti800_ai_insn_read(struct co
+ udelay(1);
+ }
+ if (t == 0) {
+- printk("rti800: timeout\n");
++ printk(KERN_WARNING "rti800: timeout\n");
+ return -ETIME;
+ }
+ data[i] = inb(dev->iobase + RTI800_ADCLO);
+@@ -335,15 +335,15 @@ static int rti800_attach(struct comedi_d
+ struct comedi_subdevice *s;
+
+ iobase = it->options[0];
+- printk("comedi%d: rti800: 0x%04lx ", dev->minor, iobase);
++ printk(KERN_INFO "comedi%d: rti800: 0x%04lx\n", dev->minor, iobase);
+ if (!request_region(iobase, RTI800_SIZE, "rti800")) {
+- printk("I/O port conflict\n");
++ printk(KERN_WARNING "I/O port conflict\n");
+ return -EIO;
+ }
+ dev->iobase = iobase;
+
+ #ifdef DEBUG
+- printk("fingerprint=%x,%x,%x,%x,%x ",
++ printk(KERN_DEBUG "fingerprint=%x,%x,%x,%x,%x ",
+ inb(dev->iobase + 0),
+ inb(dev->iobase + 1),
+ inb(dev->iobase + 2),
+@@ -356,15 +356,15 @@ static int rti800_attach(struct comedi_d
+
+ irq = it->options[1];
+ if (irq) {
+- printk("( irq = %u )", irq);
++ printk(KERN_INFO "( irq = %u )\n", irq);
+ ret = request_irq(irq, rti800_interrupt, 0, "rti800", dev);
+ if (ret < 0) {
+- printk(" Failed to allocate IRQ\n");
++ printk(KERN_WARNING " Failed to allocate IRQ\n");
+ return ret;
+ }
+ dev->irq = irq;
+ } else {
+- printk("( no irq )");
++ printk(KERN_INFO "( no irq )\n");
+ }
+
+ dev->board_name = this_board->name;
+@@ -460,14 +460,12 @@ static int rti800_attach(struct comedi_d
+ s->type = COMEDI_SUBD_TIMER;
+ #endif
+
+- printk("\n");
+-
+ return 0;
+ }
+
+ static int rti800_detach(struct comedi_device *dev)
+ {
+- printk("comedi%d: rti800: remove\n", dev->minor);
++ printk(KERN_INFO "comedi%d: rti800: remove\n", dev->minor);
+
+ if (dev->iobase)
+ release_region(dev->iobase, RTI800_SIZE);
diff --git a/staging/staging-dream-another-codestyle-patch.patch b/staging/staging-dream-another-codestyle-patch.patch
new file mode 100644
index 00000000000000..2b626587f8b36d
--- /dev/null
+++ b/staging/staging-dream-another-codestyle-patch.patch
@@ -0,0 +1,285 @@
+From jochen.maes@sejo.be Wed Feb 17 15:41:47 2010
+From: Jochen Maes <jochen.maes@sejo.be>
+Date: Wed, 10 Feb 2010 10:27:14 +0100
+Subject: staging: dream: another Codestyle patch
+To: gregkh@suse.de
+Cc: pavel@ucw.cz, linux-kernel@vger.kernel.org, Jochen Maes <jochen.maes@sejo.be>
+Message-ID: <1265794034-17022-1-git-send-email-jochen.maes@sejo.be>
+
+
+Fixed code style issues.
+
+Signed-off-by: Jochen Maes <jochen.maes@sejo.be>
+Acked-by: Pavel Machek <pavel@ucw.cz>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/staging/dream/camera/msm_camera.c | 63 ++++++++++++++----------------
+ 1 file changed, 30 insertions(+), 33 deletions(-)
+
+--- a/drivers/staging/dream/camera/msm_camera.c
++++ b/drivers/staging/dream/camera/msm_camera.c
+@@ -2,7 +2,7 @@
+ * Copyright (C) 2008-2009 QUALCOMM Incorporated.
+ */
+
+-//FIXME: most allocations need not be GFP_ATOMIC
++/* FIXME: most allocations need not be GFP_ATOMIC
+ /* FIXME: management of mutexes */
+ /* FIXME: msm_pmem_region_lookup return values */
+ /* FIXME: way too many copy to/from user */
+@@ -76,14 +76,14 @@ static LIST_HEAD(msm_sensors);
+ list_del_init(&qcmd->list); \
+ kfree(qcmd); \
+ }; \
+-} while(0)
++} while (0)
+
+ #define MSM_DRAIN_QUEUE(sync, name) do { \
+ unsigned long flags; \
+ spin_lock_irqsave(&(sync)->name##_lock, flags); \
+ MSM_DRAIN_QUEUE_NOSYNC(sync, name); \
+ spin_unlock_irqrestore(&(sync)->name##_lock, flags); \
+-} while(0)
++} while (0)
+
+ static int check_overlap(struct hlist_head *ptype,
+ unsigned long paddr,
+@@ -361,7 +361,7 @@ static int __msm_get_frame(struct msm_sy
+ if (!frame->buffer) {
+ pr_err("%s: cannot get frame, invalid lookup address "
+ "y=%x cbcr=%x offset=%d\n",
+- __FUNCTION__,
++ __func__,
+ pphy->y_phy,
+ pphy->cbcr_phy,
+ frame->y_off);
+@@ -455,7 +455,7 @@ static int msm_disable_vfe(struct msm_sy
+ return rc;
+ }
+
+-static struct msm_queue_cmd* __msm_control(struct msm_sync *sync,
++static struct msm_queue_cmd *__msm_control(struct msm_sync *sync,
+ struct msm_control_device_queue *queue,
+ struct msm_queue_cmd *qcmd,
+ int timeout)
+@@ -592,8 +592,7 @@ end:
+ * a result of a successful completion, we are freeing the qcmd that
+ * we dequeued from queue->ctrl_status_q.
+ */
+- if (qcmd)
+- kfree(qcmd);
++ kfree(qcmd);
+
+ CDBG("msm_control: end rc = %d\n", rc);
+ return rc;
+@@ -670,7 +669,7 @@ static int msm_get_stats(struct msm_sync
+ &(stats.fd));
+ if (!stats.buffer) {
+ pr_err("%s: msm_pmem_stats_ptov_lookup error\n",
+- __FUNCTION__);
++ __func__);
+ rc = -EINVAL;
+ goto failure;
+ }
+@@ -718,8 +717,7 @@ static int msm_get_stats(struct msm_sync
+ buf.fmain.buffer =
+ (unsigned long)region.vaddr;
+ buf.fmain.fd = region.fd;
+- }
+- else {
++ } else {
+ pr_err("%s: pmem lookup failed\n",
+ __func__);
+ rc = -EINVAL;
+@@ -796,8 +794,7 @@ static int msm_get_stats(struct msm_sync
+ }
+
+ failure:
+- if (qcmd)
+- kfree(qcmd);
++ kfree(qcmd);
+
+ CDBG("msm_get_stats: %d\n", rc);
+ return rc;
+@@ -838,8 +835,8 @@ static int msm_ctrl_cmd_done(struct msm_
+ kfree(qcmd);
+ goto end;
+ }
+- }
+- else ctrlcmd->value = NULL;
++ } else
++ ctrlcmd->value = NULL;
+
+ end:
+ CDBG("msm_ctrl_cmd_done: end rc = %d\n", rc);
+@@ -869,14 +866,14 @@ static int msm_config_vfe(struct msm_syn
+ return -EFAULT;
+ }
+
+- switch(cfgcmd.cmd_type) {
++ switch (cfgcmd.cmd_type) {
+ case CMD_STATS_ENABLE:
+ axi_data.bufnum1 =
+ msm_pmem_region_lookup(&sync->stats,
+ MSM_PMEM_AEC_AWB, &region[0],
+ NUM_WB_EXP_STAT_OUTPUT_BUFFERS);
+ if (!axi_data.bufnum1) {
+- pr_err("%s: pmem region lookup error\n", __FUNCTION__);
++ pr_err("%s: pmem region lookup error\n", __func__);
+ return -EINVAL;
+ }
+ axi_data.region = &region[0];
+@@ -888,7 +885,7 @@ static int msm_config_vfe(struct msm_syn
+ MSM_PMEM_AF, &region[0],
+ NUM_AF_STAT_OUTPUT_BUFFERS);
+ if (!axi_data.bufnum1) {
+- pr_err("%s: pmem region lookup error\n", __FUNCTION__);
++ pr_err("%s: pmem region lookup error\n", __func__);
+ return -EINVAL;
+ }
+ axi_data.region = &region[0];
+@@ -899,7 +896,7 @@ static int msm_config_vfe(struct msm_syn
+ break;
+ default:
+ pr_err("%s: unknown command type %d\n",
+- __FUNCTION__, cfgcmd.cmd_type);
++ __func__, cfgcmd.cmd_type);
+ return -EINVAL;
+ }
+
+@@ -928,7 +925,7 @@ static int msm_frame_axi_cfg(struct msm_
+ msm_pmem_region_lookup(&sync->frame, pmem_type,
+ &region[0], 8);
+ if (!axi_data.bufnum1) {
+- pr_err("%s: pmem region lookup error\n", __FUNCTION__);
++ pr_err("%s: pmem region lookup error\n", __func__);
+ return -EINVAL;
+ }
+ break;
+@@ -939,7 +936,7 @@ static int msm_frame_axi_cfg(struct msm_
+ msm_pmem_region_lookup(&sync->frame, pmem_type,
+ &region[0], 8);
+ if (!axi_data.bufnum2) {
+- pr_err("%s: pmem region lookup error\n", __FUNCTION__);
++ pr_err("%s: pmem region lookup error\n", __func__);
+ return -EINVAL;
+ }
+ break;
+@@ -950,7 +947,7 @@ static int msm_frame_axi_cfg(struct msm_
+ msm_pmem_region_lookup(&sync->frame, pmem_type,
+ &region[0], 8);
+ if (!axi_data.bufnum1) {
+- pr_err("%s: pmem region lookup error\n", __FUNCTION__);
++ pr_err("%s: pmem region lookup error\n", __func__);
+ return -EINVAL;
+ }
+
+@@ -959,7 +956,7 @@ static int msm_frame_axi_cfg(struct msm_
+ msm_pmem_region_lookup(&sync->frame, pmem_type,
+ &region[axi_data.bufnum1], 8);
+ if (!axi_data.bufnum2) {
+- pr_err("%s: pmem region lookup error\n", __FUNCTION__);
++ pr_err("%s: pmem region lookup error\n", __func__);
+ return -EINVAL;
+ }
+ break;
+@@ -970,7 +967,7 @@ static int msm_frame_axi_cfg(struct msm_
+ msm_pmem_region_lookup(&sync->frame, pmem_type,
+ &region[0], 8);
+ if (!axi_data.bufnum2) {
+- pr_err("%s: pmem region lookup error\n", __FUNCTION__);
++ pr_err("%s: pmem region lookup error\n", __func__);
+ return -EINVAL;
+ }
+ break;
+@@ -981,7 +978,7 @@ static int msm_frame_axi_cfg(struct msm_
+
+ default:
+ pr_err("%s: unknown command type %d\n",
+- __FUNCTION__, cfgcmd->cmd_type);
++ __func__, cfgcmd->cmd_type);
+ return -EINVAL;
+ }
+
+@@ -1047,7 +1044,7 @@ static int __msm_put_frame_buf(struct ms
+ rc = sync->vfefn.vfe_config(&cfgcmd, &pphy);
+ } else {
+ pr_err("%s: msm_pmem_frame_vtop_lookup failed\n",
+- __FUNCTION__);
++ __func__);
+ rc = -EINVAL;
+ }
+
+@@ -1131,7 +1128,7 @@ static int msm_stats_axi_cfg(struct msm_
+ break;
+ default:
+ pr_err("%s: unknown command type %d\n",
+- __FUNCTION__, cfgcmd->cmd_type);
++ __func__, cfgcmd->cmd_type);
+ return -EINVAL;
+ }
+
+@@ -1140,7 +1137,7 @@ static int msm_stats_axi_cfg(struct msm_
+ msm_pmem_region_lookup(&sync->stats, pmem_type,
+ &region[0], NUM_WB_EXP_STAT_OUTPUT_BUFFERS);
+ if (!axi_data.bufnum1) {
+- pr_err("%s: pmem region lookup error\n", __FUNCTION__);
++ pr_err("%s: pmem region lookup error\n", __func__);
+ return -EINVAL;
+ }
+ axi_data.region = &region[0];
+@@ -1177,7 +1174,7 @@ static int msm_put_stats_buffer(struct m
+ cfgcmd.cmd_type = CMD_STATS_AF_BUF_RELEASE;
+ else {
+ pr_err("%s: invalid buf type %d\n",
+- __FUNCTION__,
++ __func__,
+ buf.type);
+ rc = -EINVAL;
+ goto put_done;
+@@ -1223,7 +1220,7 @@ static int msm_axi_config(struct msm_syn
+
+ default:
+ pr_err("%s: unknown command type %d\n",
+- __FUNCTION__,
++ __func__,
+ cfgcmd.cmd_type);
+ return -EINVAL;
+ }
+@@ -1622,7 +1619,7 @@ static int msm_release_control(struct in
+ int rc;
+ struct msm_control_device *ctrl_pmsm = filep->private_data;
+ struct msm_device *pmsm = ctrl_pmsm->pmsm;
+- printk("msm_camera: RELEASE %s\n", filep->f_path.dentry->d_name.name);
++ printk(KERN_INFO "msm_camera: RELEASE %s\n", filep->f_path.dentry->d_name.name);
+ rc = __msm_release(pmsm->sync);
+ if (!rc) {
+ MSM_DRAIN_QUEUE(&ctrl_pmsm->ctrl_q, ctrl_status_q);
+@@ -1636,7 +1633,7 @@ static int msm_release_frame(struct inod
+ {
+ int rc;
+ struct msm_device *pmsm = filep->private_data;
+- printk("msm_camera: RELEASE %s\n", filep->f_path.dentry->d_name.name);
++ printk(KERN_INFO "msm_camera: RELEASE %s\n", filep->f_path.dentry->d_name.name);
+ rc = __msm_release(pmsm->sync);
+ if (!rc) {
+ MSM_DRAIN_QUEUE(pmsm->sync, prev_frame_q);
+@@ -1720,7 +1717,7 @@ static void msm_vfe_sync(struct msm_vfe_
+ qcmd->type = qtype;
+
+ if (qtype == MSM_CAM_Q_VFE_MSG) {
+- switch(vdata->type) {
++ switch (vdata->type) {
+ case VFE_MSG_OUTPUT1:
+ case VFE_MSG_OUTPUT2:
+ qcmd_frame =
+@@ -1931,7 +1928,7 @@ static int __msm_v4l2_control(struct msm
+ memcpy(out->value, ctrl->value, ctrl->length);
+
+ end:
+- if (rcmd) kfree(rcmd);
++ kfree(rcmd);
+ CDBG("__msm_v4l2_control: end rc = %d\n", rc);
+ return rc;
+ }
diff --git a/staging/staging-dream-codestyle-fix.patch b/staging/staging-dream-codestyle-fix.patch
new file mode 100644
index 00000000000000..b4bd430ea12639
--- /dev/null
+++ b/staging/staging-dream-codestyle-fix.patch
@@ -0,0 +1,119 @@
+From jochen.maes@sejo.be Wed Feb 17 15:37:42 2010
+From: Jochen Maes <jochen.maes@sejo.be>
+Date: Wed, 10 Feb 2010 00:19:46 +0100
+Subject: staging: dream: Codestyle fix
+To: gregkh@suse.de
+Cc: linux-kernel@vger.kernel.org, Jochen Maes <jochen.maes@sejo.be>
+Message-ID: <1265757586-14726-1-git-send-email-jochen.maes@sejo.be>
+
+
+ Fixed Codestyle issues
+
+Signed-off-by: Jochen Maes <jochen.maes@sejo.be>
+Cc: Pavel Machek <pavel@ucw.cz>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/staging/dream/pmem.c | 26 ++++++++++++--------------
+ 1 file changed, 12 insertions(+), 14 deletions(-)
+
+--- a/drivers/staging/dream/pmem.c
++++ b/drivers/staging/dream/pmem.c
+@@ -37,17 +37,17 @@
+ * the file should not be released until put_pmem_file is called */
+ #define PMEM_FLAGS_BUSY 0x1
+ /* indicates that this is a suballocation of a larger master range */
+-#define PMEM_FLAGS_CONNECTED 0x1 << 1
++#define PMEM_FLAGS_CONNECTED ( 0x1 << 1 )
+ /* indicates this is a master and not a sub allocation and that it is mmaped */
+-#define PMEM_FLAGS_MASTERMAP 0x1 << 2
++#define PMEM_FLAGS_MASTERMAP ( 0x1 << 2 )
+ /* submap and unsubmap flags indicate:
+ * 00: subregion has never been mmaped
+ * 10: subregion has been mmaped, reference to the mm was taken
+ * 11: subretion has ben released, refernece to the mm still held
+ * 01: subretion has been released, reference to the mm has been released
+ */
+-#define PMEM_FLAGS_SUBMAP 0x1 << 3
+-#define PMEM_FLAGS_UNSUBMAP 0x1 << 4
++#define PMEM_FLAGS_SUBMAP ( 0x1 << 3 )
++#define PMEM_FLAGS_UNSUBMAP ( 0x1 << 4 )
+
+
+ struct pmem_data {
+@@ -91,7 +91,7 @@ struct pmem_region_node {
+
+ #define PMEM_DEBUG_MSGS 0
+ #if PMEM_DEBUG_MSGS
+-#define DLOG(fmt,args...) \
++#define DLOG(fmt, args...) \
+ do { printk(KERN_INFO "[%s:%s:%d] "fmt, __FILE__, __func__, __LINE__, \
+ ##args); } \
+ while (0)
+@@ -152,7 +152,7 @@ struct pmem_info {
+ static struct pmem_info pmem[PMEM_MAX_DEVICES];
+ static int id_count;
+
+-#define PMEM_IS_FREE(id, index) !(pmem[id].bitmap[index].allocated)
++#define PMEM_IS_FREE(id, index) ( !(pmem[id].bitmap[index].allocated) )
+ #define PMEM_ORDER(id, index) pmem[id].bitmap[index].order
+ #define PMEM_BUDDY_INDEX(id, index) (index ^ (1 << PMEM_ORDER(id, index)))
+ #define PMEM_NEXT_INDEX(id, index) (index + (1 << PMEM_ORDER(id, index)))
+@@ -708,9 +708,8 @@ int get_pmem_addr(struct file *file, uns
+ struct pmem_data *data;
+ int id;
+
+- if (!is_pmem_file(file) || !has_allocation(file)) {
++ if (!is_pmem_file(file) || !has_allocation(file))
+ return -1;
+- }
+
+ data = (struct pmem_data *)file->private_data;
+ if (data->index == -1) {
+@@ -789,9 +788,8 @@ void flush_pmem_file(struct file *file,
+ struct list_head *elt;
+ void *flush_start, *flush_end;
+
+- if (!is_pmem_file(file) || !has_allocation(file)) {
++ if (!is_pmem_file(file) || !has_allocation(file))
+ return;
+- }
+
+ id = get_id(file);
+ data = (struct pmem_data *)file->private_data;
+@@ -833,7 +831,7 @@ static int pmem_connect(unsigned long co
+ src_file = fget_light(connect, &put_needed);
+ DLOG("connect %p to %p\n", file, src_file);
+ if (!src_file) {
+- printk("pmem: src file not found!\n");
++ printk(KERN_INFO "pmem: src file not found!\n");
+ ret = -EINVAL;
+ goto err_no_file;
+ }
+@@ -846,7 +844,7 @@ static int pmem_connect(unsigned long co
+ src_data = (struct pmem_data *)src_file->private_data;
+
+ if (has_allocation(file) && (data->index != src_data->index)) {
+- printk("pmem: file is already mapped but doesn't match this"
++ printk(KERN_INFO "pmem: file is already mapped but doesn't match this"
+ " src_file!\n");
+ ret = -EINVAL;
+ goto err_bad_file;
+@@ -885,7 +883,7 @@ lock_mm:
+ mm = get_task_mm(data->task);
+ if (!mm) {
+ #if PMEM_DEBUG
+- printk("pmem: can't remap task is gone!\n");
++ printk(KERN_DEBUG "pmem: can't remap task is gone!\n");
+ #endif
+ up_read(&data->sem);
+ return -1;
+@@ -936,7 +934,7 @@ int pmem_remap(struct pmem_region *regio
+ if (unlikely(!PMEM_IS_PAGE_ALIGNED(region->offset) ||
+ !PMEM_IS_PAGE_ALIGNED(region->len))) {
+ #if PMEM_DEBUG
+- printk("pmem: request for unaligned pmem suballocation "
++ printk(KERN_DEBUG "pmem: request for unaligned pmem suballocation "
+ "%lx %lx\n", region->offset, region->len);
+ #endif
+ return -EINVAL;
diff --git a/staging/staging-dream-more-code-style-fixes.patch b/staging/staging-dream-more-code-style-fixes.patch
new file mode 100644
index 00000000000000..3e685ea6e0083e
--- /dev/null
+++ b/staging/staging-dream-more-code-style-fixes.patch
@@ -0,0 +1,68 @@
+From jochen.maes@sejo.be Wed Feb 17 15:43:00 2010
+From: Jochen Maes <jochen.maes@sejo.be>
+Date: Thu, 11 Feb 2010 17:10:42 +0100
+Subject: staging: dream: more Code style fixes
+To: gregkh@suse.de
+Cc: pavel@ucw.cz, linux-kernel@vger.kernel.org, Jochen Maes <jochen.maes@sejo.be>
+Message-ID: <1265904642-21535-1-git-send-email-jochen.maes@sejo.be>
+
+
+Removed parenthesis from return statements,
+split up assignment and if condition
+
+Signed-off-by: Jochen Maes <jochen.maes@sejo.be>
+Cc: Pavel Machek <pavel@ucw.cz>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/staging/dream/camera/s5k3e2fx.c | 22 ++++++++++++----------
+ 1 file changed, 12 insertions(+), 10 deletions(-)
+
+--- a/drivers/staging/dream/camera/s5k3e2fx.c
++++ b/drivers/staging/dream/camera/s5k3e2fx.c
+@@ -743,12 +743,14 @@ static int s5k3e2fx_sensor_open_init(con
+ }
+
+ /* initialize AF */
+- if ((rc = s5k3e2fx_i2c_write_b(s5k3e2fx_client->addr,
+- 0x3146, 0x3A)) < 0)
++ rc = s5k3e2fx_i2c_write_b(s5k3e2fx_client->addr,
++ 0x3146, 0x3A)
++ if (rc < 0)
+ goto init_fail1;
+
+- if ((rc = s5k3e2fx_i2c_write_b(s5k3e2fx_client->addr,
+- 0x3130, 0x03)) < 0)
++ rc = s5k3e2fx_i2c_write_b(s5k3e2fx_client->addr,
++ 0x3130, 0x03)
++ if (rc < 0)
+ goto init_fail1;
+
+ goto init_done;
+@@ -814,20 +816,20 @@ static uint16_t s5k3e2fx_get_prev_lines_
+
+ static uint16_t s5k3e2fx_get_prev_pixels_pl(void)
+ {
+- return (s5k3e2fx_reg_pat[S_RES_PREVIEW].size_w +
+- s5k3e2fx_reg_pat[S_RES_PREVIEW].blk_p);
++ return s5k3e2fx_reg_pat[S_RES_PREVIEW].size_w +
++ s5k3e2fx_reg_pat[S_RES_PREVIEW].blk_p;
+ }
+
+ static uint16_t s5k3e2fx_get_pict_lines_pf(void)
+ {
+- return (s5k3e2fx_reg_pat[S_RES_CAPTURE].size_h +
+- s5k3e2fx_reg_pat[S_RES_CAPTURE].blk_l);
++ return s5k3e2fx_reg_pat[S_RES_CAPTURE].size_h +
++ s5k3e2fx_reg_pat[S_RES_CAPTURE].blk_l;
+ }
+
+ static uint16_t s5k3e2fx_get_pict_pixels_pl(void)
+ {
+- return (s5k3e2fx_reg_pat[S_RES_CAPTURE].size_w +
+- s5k3e2fx_reg_pat[S_RES_CAPTURE].blk_p);
++ return s5k3e2fx_reg_pat[S_RES_CAPTURE].size_w +
++ s5k3e2fx_reg_pat[S_RES_CAPTURE].blk_p;
+ }
+
+ static uint32_t s5k3e2fx_get_pict_max_exp_lc(void)
diff --git a/staging/staging-hv-add-proper-versioning-to-hv-drivers.patch b/staging/staging-hv-add-proper-versioning-to-hv-drivers.patch
new file mode 100644
index 00000000000000..9316910dbe34dd
--- /dev/null
+++ b/staging/staging-hv-add-proper-versioning-to-hv-drivers.patch
@@ -0,0 +1,149 @@
+From hjanssen@microsoft.com Wed Feb 17 15:47:10 2010
+From: Hank Janssen <hjanssen@microsoft.com>
+Date: Thu, 11 Feb 2010 23:02:42 +0000
+Subject: Staging: hv: Add proper versioning to HV drivers
+Cc: Haiyang Zhang <haiyangz@microsoft.com>, "'gregkh@suse.de'" <gregkh@suse.de>
+Message-ID: <8AFC7968D54FB448A30D8F38F259C56212E883CB@TK5EX14MBXC118.redmond.corp.microsoft.com>
+
+
+Provide proper versioning information for all HV drivers.
+
+With removal of build time/date/and Minor number as requested by Greg KH
+
+Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
+Signed-off-by: Haiyang Zhang <haiyang@microsoft.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+---
+ drivers/staging/hv/VersionInfo.h | 22 +++++++++++++++++++---
+ drivers/staging/hv/Vmbus.c | 6 ++----
+ drivers/staging/hv/blkvsc_drv.c | 2 ++
+ drivers/staging/hv/netvsc_drv.c | 5 +++--
+ drivers/staging/hv/storvsc_drv.c | 2 ++
+ drivers/staging/hv/vmbus_drv.c | 2 ++
+ 6 files changed, 30 insertions(+), 9 deletions(-)
+
+--- a/drivers/staging/hv/VersionInfo.h
++++ b/drivers/staging/hv/VersionInfo.h
+@@ -24,8 +24,24 @@
+ #ifndef __HV_VERSION_INFO
+ #define __HV_VERSION_INFO
+
+-static const char VersionDate[] = __DATE__;
+-static const char VersionTime[] = __TIME__;
+-static const char VersionDesc[] = "Version 2.0";
++/*
++ * We use the same version numbering for all Hyper-V modules.
++ *
++ * Definition of versioning is as follows;
++ *
++ * Major Number Changes for these scenarios;
++ * 1. When a new version of Windows Hyper-V
++ * is released.
++ * 2. A Major change has occurred in the
++ * Linux IC's.
++ * (For example the merge for the first time
++ * into the kernel) Every time the Major Number
++ * changes, the Revision number is reset to 0.
++ * Minor Number Changes when new functionality is added
++ * to the Linux IC's that is not a bug fix.
++ *
++ */
++#define HV_DRV_VERSION "3.0"
++
+
+ #endif
+--- a/drivers/staging/hv/Vmbus.c
++++ b/drivers/staging/hv/Vmbus.c
+@@ -273,10 +273,8 @@ int VmbusInitialize(struct hv_driver *dr
+
+ DPRINT_ENTER(VMBUS);
+
+- DPRINT_INFO(VMBUS, "+++++++ Build Date=%s %s +++++++",
+- VersionDate, VersionTime);
+- DPRINT_INFO(VMBUS, "+++++++ Build Description=%s +++++++",
+- VersionDesc);
++ DPRINT_INFO(VMBUS, "+++++++ HV Driver version = %s +++++++",
++ HV_DRV_VERSION);
+ DPRINT_INFO(VMBUS, "+++++++ Vmbus supported version = %d +++++++",
+ VMBUS_REVISION_NUMBER);
+ DPRINT_INFO(VMBUS, "+++++++ Vmbus using SINT %d +++++++",
+--- a/drivers/staging/hv/blkvsc_drv.c
++++ b/drivers/staging/hv/blkvsc_drv.c
+@@ -31,6 +31,7 @@
+ #include <scsi/scsi_dbg.h>
+ #include "osd.h"
+ #include "logging.h"
++#include "VersionInfo.h"
+ #include "vmbus.h"
+ #include "StorVscApi.h"
+
+@@ -1507,6 +1508,7 @@ static void __exit blkvsc_exit(void)
+ }
+
+ MODULE_LICENSE("GPL");
++MODULE_VERSION(HV_DRV_VERSION);
+ module_param(blkvsc_ringbuffer_size, int, S_IRUGO);
+ module_init(blkvsc_init);
+ module_exit(blkvsc_exit);
+--- a/drivers/staging/hv/netvsc_drv.c
++++ b/drivers/staging/hv/netvsc_drv.c
+@@ -35,11 +35,10 @@
+ #include <net/pkt_sched.h>
+ #include "osd.h"
+ #include "logging.h"
++#include "VersionInfo.h"
+ #include "vmbus.h"
+ #include "NetVscApi.h"
+
+-MODULE_LICENSE("GPL");
+-
+ struct net_device_context {
+ /* point back to our device context */
+ struct device_context *device_ctx;
+@@ -603,6 +602,8 @@ static void __exit netvsc_exit(void)
+ DPRINT_EXIT(NETVSC_DRV);
+ }
+
++MODULE_LICENSE("GPL");
++MODULE_VERSION(HV_DRV_VERSION);
+ module_param(netvsc_ringbuffer_size, int, S_IRUGO);
+
+ module_init(netvsc_init);
+--- a/drivers/staging/hv/storvsc_drv.c
++++ b/drivers/staging/hv/storvsc_drv.c
+@@ -32,6 +32,7 @@
+ #include <scsi/scsi_dbg.h>
+ #include "osd.h"
+ #include "logging.h"
++#include "VersionInfo.h"
+ #include "vmbus.h"
+ #include "StorVscApi.h"
+
+@@ -990,6 +991,7 @@ static void __exit storvsc_exit(void)
+ }
+
+ MODULE_LICENSE("GPL");
++MODULE_VERSION(HV_DRV_VERSION);
+ module_param(storvsc_ringbuffer_size, int, S_IRUGO);
+ module_init(storvsc_init);
+ module_exit(storvsc_exit);
+--- a/drivers/staging/hv/vmbus_drv.c
++++ b/drivers/staging/hv/vmbus_drv.c
+@@ -24,6 +24,7 @@
+ #include <linux/irq.h>
+ #include <linux/interrupt.h>
+ #include <linux/sysctl.h>
++#include "VersionInfo.h"
+ #include "osd.h"
+ #include "logging.h"
+ #include "vmbus.h"
+@@ -974,6 +975,7 @@ static void __exit vmbus_exit(void)
+ }
+
+ MODULE_LICENSE("GPL");
++MODULE_VERSION(HV_DRV_VERSION);
+ module_param(vmbus_irq, int, S_IRUGO);
+ module_param(vmbus_loglevel, int, S_IRUGO);
+
diff --git a/staging/staging-hv-rename-struct-device_context-and-re-arrange-the-fields-inside.patch b/staging/staging-hv-rename-struct-device_context-and-re-arrange-the-fields-inside.patch
new file mode 100644
index 00000000000000..c85e74031c7982
--- /dev/null
+++ b/staging/staging-hv-rename-struct-device_context-and-re-arrange-the-fields-inside.patch
@@ -0,0 +1,325 @@
+From haiyangz@microsoft.com Wed Feb 17 15:48:12 2010
+From: Haiyang Zhang <haiyangz@microsoft.com>
+Date: Wed, 17 Feb 2010 20:58:47 +0000
+Subject: Staging: hv: Rename struct device_context and re-arrange the fields inside
+Cc: Hank Janssen <hjanssen@microsoft.com>, Haiyang Zhang <haiyangz@microsoft.com>, "'gregkh@suse.de'" <gregkh@suse.de>
+Message-ID: <1FB5E1D5CA062146B38059374562DF725A908A11@TK5EX14MBXC126.redmond.corp.microsoft.com>
+
+From: Haiyang Zhang <haiyangz@microsoft.com>
+
+Rename struct device_context and re-arrange the fields inside.
+
+Rename struct device_context to struct vm_device, and move struct device
+field to the end according to Document/driver-model standard.
+
+Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
+Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+---
+ drivers/staging/hv/blkvsc_drv.c | 8 ++++----
+ drivers/staging/hv/netvsc_drv.c | 10 +++++-----
+ drivers/staging/hv/storvsc_drv.c | 10 +++++-----
+ drivers/staging/hv/vmbus.h | 12 ++++++------
+ drivers/staging/hv/vmbus_drv.c | 36 ++++++++++++++++++------------------
+ 5 files changed, 38 insertions(+), 38 deletions(-)
+
+--- a/drivers/staging/hv/blkvsc_drv.c
++++ b/drivers/staging/hv/blkvsc_drv.c
+@@ -93,7 +93,7 @@ struct blkvsc_request {
+ /* Per device structure */
+ struct block_device_context {
+ /* point back to our device context */
+- struct device_context *device_ctx;
++ struct vm_device *device_ctx;
+ struct kmem_cache *request_pool;
+ spinlock_t lock;
+ struct gendisk *gd;
+@@ -255,7 +255,7 @@ static int blkvsc_probe(struct device *d
+ (struct blkvsc_driver_context *)driver_ctx;
+ struct storvsc_driver_object *storvsc_drv_obj =
+ &blkvsc_drv_ctx->drv_obj;
+- struct device_context *device_ctx = device_to_device_context(device);
++ struct vm_device *device_ctx = device_to_vm_device(device);
+ struct hv_device *device_obj = &device_ctx->device_obj;
+
+ struct block_device_context *blkdev = NULL;
+@@ -746,7 +746,7 @@ static int blkvsc_remove(struct device *
+ (struct blkvsc_driver_context *)driver_ctx;
+ struct storvsc_driver_object *storvsc_drv_obj =
+ &blkvsc_drv_ctx->drv_obj;
+- struct device_context *device_ctx = device_to_device_context(device);
++ struct vm_device *device_ctx = device_to_vm_device(device);
+ struct hv_device *device_obj = &device_ctx->device_obj;
+ struct block_device_context *blkdev = dev_get_drvdata(device);
+ unsigned long flags;
+@@ -866,7 +866,7 @@ static int blkvsc_submit_request(struct
+ void (*request_completion)(struct hv_storvsc_request *))
+ {
+ struct block_device_context *blkdev = blkvsc_req->dev;
+- struct device_context *device_ctx = blkdev->device_ctx;
++ struct vm_device *device_ctx = blkdev->device_ctx;
+ struct driver_context *driver_ctx =
+ driver_to_driver_context(device_ctx->device.driver);
+ struct blkvsc_driver_context *blkvsc_drv_ctx =
+--- a/drivers/staging/hv/netvsc_drv.c
++++ b/drivers/staging/hv/netvsc_drv.c
+@@ -41,7 +41,7 @@
+
+ struct net_device_context {
+ /* point back to our device context */
+- struct device_context *device_ctx;
++ struct vm_device *device_ctx;
+ struct net_device_stats stats;
+ };
+
+@@ -271,7 +271,7 @@ retry_send:
+ static void netvsc_linkstatus_callback(struct hv_device *device_obj,
+ unsigned int status)
+ {
+- struct device_context *device_ctx = to_device_context(device_obj);
++ struct vm_device *device_ctx = to_vm_device(device_obj);
+ struct net_device *net = dev_get_drvdata(&device_ctx->device);
+
+ DPRINT_ENTER(NETVSC_DRV);
+@@ -298,7 +298,7 @@ static void netvsc_linkstatus_callback(s
+ static int netvsc_recv_callback(struct hv_device *device_obj,
+ struct hv_netvsc_packet *packet)
+ {
+- struct device_context *device_ctx = to_device_context(device_obj);
++ struct vm_device *device_ctx = to_vm_device(device_obj);
+ struct net_device *net = dev_get_drvdata(&device_ctx->device);
+ struct net_device_context *net_device_ctx;
+ struct sk_buff *skb;
+@@ -390,7 +390,7 @@ static int netvsc_probe(struct device *d
+ struct netvsc_driver_context *net_drv_ctx =
+ (struct netvsc_driver_context *)driver_ctx;
+ struct netvsc_driver *net_drv_obj = &net_drv_ctx->drv_obj;
+- struct device_context *device_ctx = device_to_device_context(device);
++ struct vm_device *device_ctx = device_to_vm_device(device);
+ struct hv_device *device_obj = &device_ctx->device_obj;
+ struct net_device *net = NULL;
+ struct net_device_context *net_device_ctx;
+@@ -462,7 +462,7 @@ static int netvsc_remove(struct device *
+ struct netvsc_driver_context *net_drv_ctx =
+ (struct netvsc_driver_context *)driver_ctx;
+ struct netvsc_driver *net_drv_obj = &net_drv_ctx->drv_obj;
+- struct device_context *device_ctx = device_to_device_context(device);
++ struct vm_device *device_ctx = device_to_vm_device(device);
+ struct net_device *net = dev_get_drvdata(&device_ctx->device);
+ struct hv_device *device_obj = &device_ctx->device_obj;
+ int ret;
+--- a/drivers/staging/hv/storvsc_drv.c
++++ b/drivers/staging/hv/storvsc_drv.c
+@@ -41,7 +41,7 @@ struct host_device_context {
+ /* must be 1st field
+ * FIXME this is a bug */
+ /* point back to our device context */
+- struct device_context *device_ctx;
++ struct vm_device *device_ctx;
+ struct kmem_cache *request_pool;
+ unsigned int port;
+ unsigned char path;
+@@ -234,7 +234,7 @@ static int storvsc_probe(struct device *
+ (struct storvsc_driver_context *)driver_ctx;
+ struct storvsc_driver_object *storvsc_drv_obj =
+ &storvsc_drv_ctx->drv_obj;
+- struct device_context *device_ctx = device_to_device_context(device);
++ struct vm_device *device_ctx = device_to_vm_device(device);
+ struct hv_device *device_obj = &device_ctx->device_obj;
+ struct Scsi_Host *host;
+ struct host_device_context *host_device_ctx;
+@@ -330,7 +330,7 @@ static int storvsc_remove(struct device
+ (struct storvsc_driver_context *)driver_ctx;
+ struct storvsc_driver_object *storvsc_drv_obj =
+ &storvsc_drv_ctx->drv_obj;
+- struct device_context *device_ctx = device_to_device_context(device);
++ struct vm_device *device_ctx = device_to_vm_device(device);
+ struct hv_device *device_obj = &device_ctx->device_obj;
+ struct Scsi_Host *host = dev_get_drvdata(device);
+ struct host_device_context *host_device_ctx =
+@@ -631,7 +631,7 @@ static int storvsc_queuecommand(struct s
+ int ret;
+ struct host_device_context *host_device_ctx =
+ (struct host_device_context *)scmnd->device->host->hostdata;
+- struct device_context *device_ctx = host_device_ctx->device_ctx;
++ struct vm_device *device_ctx = host_device_ctx->device_ctx;
+ struct driver_context *driver_ctx =
+ driver_to_driver_context(device_ctx->device.driver);
+ struct storvsc_driver_context *storvsc_drv_ctx =
+@@ -870,7 +870,7 @@ static int storvsc_host_reset_handler(st
+ int ret;
+ struct host_device_context *host_device_ctx =
+ (struct host_device_context *)scmnd->device->host->hostdata;
+- struct device_context *device_ctx = host_device_ctx->device_ctx;
++ struct vm_device *device_ctx = host_device_ctx->device_ctx;
+
+ DPRINT_ENTER(STORVSC_DRV);
+
+--- a/drivers/staging/hv/vmbus.h
++++ b/drivers/staging/hv/vmbus.h
+@@ -43,23 +43,23 @@ struct driver_context {
+ void (*shutdown)(struct device *);
+ };
+
+-struct device_context {
++struct vm_device {
+ struct work_struct probe_failed_work_item;
+ struct hv_guid class_id;
+ struct hv_guid device_id;
+ int probe_error;
+- struct device device;
+ struct hv_device device_obj;
++ struct device device;
+ };
+
+-static inline struct device_context *to_device_context(struct hv_device *d)
++static inline struct vm_device *to_vm_device(struct hv_device *d)
+ {
+- return container_of(d, struct device_context, device_obj);
++ return container_of(d, struct vm_device, device_obj);
+ }
+
+-static inline struct device_context *device_to_device_context(struct device *d)
++static inline struct vm_device *device_to_vm_device(struct device *d)
+ {
+- return container_of(d, struct device_context, device);
++ return container_of(d, struct vm_device, device);
+ }
+
+ static inline struct driver_context *driver_to_driver_context(struct device_driver *d)
+--- a/drivers/staging/hv/vmbus_drv.c
++++ b/drivers/staging/hv/vmbus_drv.c
+@@ -48,7 +48,7 @@ struct vmbus_driver_context {
+ struct tasklet_struct event_dpc;
+
+ /* The bus root device */
+- struct device_context device_ctx;
++ struct vm_device device_ctx;
+ };
+
+ static int vmbus_match(struct device *device, struct device_driver *driver);
+@@ -136,7 +136,7 @@ static ssize_t vmbus_show_device_attr(st
+ struct device_attribute *dev_attr,
+ char *buf)
+ {
+- struct device_context *device_ctx = device_to_device_context(dev);
++ struct vm_device *device_ctx = device_to_vm_device(dev);
+ struct hv_device_info device_info;
+
+ memset(&device_info, 0, sizeof(struct hv_device_info));
+@@ -246,7 +246,7 @@ static int vmbus_bus_init(int (*drv_init
+ {
+ struct vmbus_driver_context *vmbus_drv_ctx = &g_vmbus_drv;
+ struct vmbus_driver *vmbus_drv_obj = &g_vmbus_drv.drv_obj;
+- struct device_context *dev_ctx = &g_vmbus_drv.device_ctx;
++ struct vm_device *dev_ctx = &g_vmbus_drv.device_ctx;
+ int ret;
+ unsigned int vector;
+
+@@ -308,7 +308,7 @@ static int vmbus_bus_init(int (*drv_init
+ DPRINT_INFO(VMBUS_DRV, "irq 0x%x vector 0x%x", vmbus_irq, vector);
+
+ /* Call to bus driver to add the root device */
+- memset(dev_ctx, 0, sizeof(struct device_context));
++ memset(dev_ctx, 0, sizeof(struct vm_device));
+
+ ret = vmbus_drv_obj->Base.OnDeviceAdd(&dev_ctx->device_obj, &vector);
+ if (ret != 0) {
+@@ -369,7 +369,7 @@ static void vmbus_bus_exit(void)
+ struct vmbus_driver *vmbus_drv_obj = &g_vmbus_drv.drv_obj;
+ struct vmbus_driver_context *vmbus_drv_ctx = &g_vmbus_drv;
+
+- struct device_context *dev_ctx = &g_vmbus_drv.device_ctx;
++ struct vm_device *dev_ctx = &g_vmbus_drv.device_ctx;
+
+ DPRINT_ENTER(VMBUS_DRV);
+
+@@ -472,13 +472,13 @@ static struct hv_device *vmbus_child_dev
+ struct hv_guid *instance,
+ void *context)
+ {
+- struct device_context *child_device_ctx;
++ struct vm_device *child_device_ctx;
+ struct hv_device *child_device_obj;
+
+ DPRINT_ENTER(VMBUS_DRV);
+
+ /* Allocate the new child device */
+- child_device_ctx = kzalloc(sizeof(struct device_context), GFP_KERNEL);
++ child_device_ctx = kzalloc(sizeof(struct vm_device), GFP_KERNEL);
+ if (!child_device_ctx) {
+ DPRINT_ERR(VMBUS_DRV,
+ "unable to allocate device_context for child device");
+@@ -527,10 +527,10 @@ static int vmbus_child_device_register(s
+ struct hv_device *child_device_obj)
+ {
+ int ret = 0;
+- struct device_context *root_device_ctx =
+- to_device_context(root_device_obj);
+- struct device_context *child_device_ctx =
+- to_device_context(child_device_obj);
++ struct vm_device *root_device_ctx =
++ to_vm_device(root_device_obj);
++ struct vm_device *child_device_ctx =
++ to_vm_device(child_device_obj);
+ static atomic_t device_num = ATOMIC_INIT(0);
+
+ DPRINT_ENTER(VMBUS_DRV);
+@@ -573,7 +573,7 @@ static int vmbus_child_device_register(s
+ */
+ static void vmbus_child_device_unregister(struct hv_device *device_obj)
+ {
+- struct device_context *device_ctx = to_device_context(device_obj);
++ struct vm_device *device_ctx = to_vm_device(device_obj);
+
+ DPRINT_ENTER(VMBUS_DRV);
+
+@@ -611,7 +611,7 @@ static void vmbus_child_device_destroy(s
+ */
+ static int vmbus_uevent(struct device *device, struct kobj_uevent_env *env)
+ {
+- struct device_context *device_ctx = device_to_device_context(device);
++ struct vm_device *device_ctx = device_to_vm_device(device);
+ int ret;
+
+ DPRINT_ENTER(VMBUS_DRV);
+@@ -688,7 +688,7 @@ static int vmbus_match(struct device *de
+ {
+ int match = 0;
+ struct driver_context *driver_ctx = driver_to_driver_context(driver);
+- struct device_context *device_ctx = device_to_device_context(device);
++ struct vm_device *device_ctx = device_to_vm_device(device);
+
+ DPRINT_ENTER(VMBUS_DRV);
+
+@@ -725,7 +725,7 @@ static int vmbus_match(struct device *de
+ */
+ static void vmbus_probe_failed_cb(struct work_struct *context)
+ {
+- struct device_context *device_ctx = (struct device_context *)context;
++ struct vm_device *device_ctx = (struct vm_device *)context;
+
+ DPRINT_ENTER(VMBUS_DRV);
+
+@@ -747,8 +747,8 @@ static int vmbus_probe(struct device *ch
+ int ret = 0;
+ struct driver_context *driver_ctx =
+ driver_to_driver_context(child_device->driver);
+- struct device_context *device_ctx =
+- device_to_device_context(child_device);
++ struct vm_device *device_ctx =
++ device_to_vm_device(child_device);
+
+ DPRINT_ENTER(VMBUS_DRV);
+
+@@ -872,7 +872,7 @@ static void vmbus_bus_release(struct dev
+ */
+ static void vmbus_device_release(struct device *device)
+ {
+- struct device_context *device_ctx = device_to_device_context(device);
++ struct vm_device *device_ctx = device_to_vm_device(device);
+
+ DPRINT_ENTER(VMBUS_DRV);
+
diff --git a/staging/staging-new-device-id-for-rtl8192e.patch b/staging/staging-new-device-id-for-rtl8192e.patch
new file mode 100644
index 00000000000000..49f1d4b1a124f0
--- /dev/null
+++ b/staging/staging-new-device-id-for-rtl8192e.patch
@@ -0,0 +1,33 @@
+From armyofthepenguin@gmail.com Wed Feb 17 15:32:50 2010
+From: Rodrigo P. Gomez <armyofthepenguin@gmail.com>
+Date: Mon, 8 Feb 2010 16:26:20 -0500
+Subject: Staging: new device id for rtl8192e
+To: "Greg Kroah-Hartman" <gregkh@suse.de>
+Message-ID: <201002081626.20359.armyofthepenguin@gmail.com>
+
+From: Rodrigo P. Gomez <armyofthepenguin@gmail.com>
+
+The rtl8192e driver generates the module r8192e_pci for devices which
+have (vendor,pci-id) values (0x10ec, 0x8192), among others. There is
+a new Realtek wireless chipset with pair value (0x10ec,0x8172) which
+this driver should work with. This patch adds the new pair to the list
+of devices supported.
+
+From: Rodrigo P. Gomez <armyofthepenguin@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/staging/rtl8192e/r8192E_core.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/staging/rtl8192e/r8192E_core.c
++++ b/drivers/staging/rtl8192e/r8192E_core.c
+@@ -107,7 +107,7 @@ static struct pci_device_id rtl8192_pci_
+ #else
+ /* Realtek */
+ { PCI_DEVICE(0x10ec, 0x8192) },
+-
++ { PCI_DEVICE(0x10ec, 0x8172) }, /* Toshiba Satellite 500D */
+ /* Corega */
+ { PCI_DEVICE(0x07aa, 0x0044) },
+ { PCI_DEVICE(0x07aa, 0x0047) },
diff --git a/staging/staging-r8187se-change-to-use-common-eeprom-routines-in-eeprom_93cx.patch b/staging/staging-r8187se-change-to-use-common-eeprom-routines-in-eeprom_93cx.patch
new file mode 100644
index 00000000000000..078bca36748d0d
--- /dev/null
+++ b/staging/staging-r8187se-change-to-use-common-eeprom-routines-in-eeprom_93cx.patch
@@ -0,0 +1,358 @@
+From Larry.Finger@lwfinger.net Wed Feb 17 15:43:53 2010
+From: Larry Finger <Larry.Finger@lwfinger.net>
+Date: Thu, 11 Feb 2010 12:07:35 -0600
+Subject: staging: r8187se: Change to use common eeprom routines in EEPROM_93CX
+To: Greg Kroah-Hartman <gregkh@suse.de>
+Cc: Bernhard Schiffner <bernhard@schiffner-limbach.de>, linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org
+Message-ID: <4b744767.Ro0tNpOT7EsZVlBG%Larry.Finger@lwfinger.net>
+
+
+The TODO list includes switching this driver to use the common EEPROM
+routines in EEPROM_93CX.
+
+Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
+Tested by: Bernhard Schiffner <bernhard@schiffner-limbach.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/staging/rtl8187se/Kconfig | 1
+ drivers/staging/rtl8187se/Makefile | 1
+ drivers/staging/rtl8187se/TODO | 1
+ drivers/staging/rtl8187se/r8180_93cx6.c | 146 --------------------------------
+ drivers/staging/rtl8187se/r8180_93cx6.h | 15 +--
+ drivers/staging/rtl8187se/r8180_core.c | 68 +++++++++++---
+ 6 files changed, 60 insertions(+), 172 deletions(-)
+
+--- a/drivers/staging/rtl8187se/Kconfig
++++ b/drivers/staging/rtl8187se/Kconfig
+@@ -3,6 +3,7 @@ config R8187SE
+ depends on PCI && WLAN
+ select WIRELESS_EXT
+ select WEXT_PRIV
++ select EEPROM_93CX6
+ default N
+ ---help---
+ If built as a module, it will be called r8187se.ko.
+--- a/drivers/staging/rtl8187se/Makefile
++++ b/drivers/staging/rtl8187se/Makefile
+@@ -18,7 +18,6 @@ EXTRA_CFLAGS += -DENABLE_LPS
+
+ r8187se-objs := \
+ r8180_core.o \
+- r8180_93cx6.o \
+ r8180_wx.o \
+ r8180_rtl8225z2.o \
+ r8185b_init.o \
+--- a/drivers/staging/rtl8187se/TODO
++++ b/drivers/staging/rtl8187se/TODO
+@@ -5,7 +5,6 @@ TODO:
+ - switch to use shared "librtl" instead of private ieee80211 stack
+ - switch to use LIB80211
+ - switch to use MAC80211
+-- switch to use EEPROM_93CX6
+ - use kernel coding style
+ - checkpatch.pl fixes
+ - sparse fixes
+--- a/drivers/staging/rtl8187se/r8180_93cx6.c
++++ /dev/null
+@@ -1,146 +0,0 @@
+-/*
+- This files contains card eeprom (93c46 or 93c56) programming routines,
+- memory is addressed by 16 bits words.
+-
+- This is part of rtl8180 OpenSource driver.
+- Copyright (C) Andrea Merello 2004 <andreamrl@tiscali.it>
+- Released under the terms of GPL (General Public Licence)
+-
+- Parts of this driver are based on the GPL part of the
+- official realtek driver.
+-
+- Parts of this driver are based on the rtl8180 driver skeleton
+- from Patric Schenke & Andres Salomon.
+-
+- Parts of this driver are based on the Intel Pro Wireless 2100 GPL driver.
+-
+- We want to tanks the Authors of those projects and the Ndiswrapper
+- project Authors.
+-*/
+-
+-#include "r8180_93cx6.h"
+-
+-void eprom_cs(struct net_device *dev, short bit)
+-{
+- if(bit)
+- write_nic_byte(dev, EPROM_CMD,
+- (1<<EPROM_CS_SHIFT) | \
+- read_nic_byte(dev, EPROM_CMD)); //enable EPROM
+- else
+- write_nic_byte(dev, EPROM_CMD, read_nic_byte(dev, EPROM_CMD)\
+- &~(1<<EPROM_CS_SHIFT)); //disable EPROM
+-
+- force_pci_posting(dev);
+- udelay(EPROM_DELAY);
+-}
+-
+-
+-void eprom_ck_cycle(struct net_device *dev)
+-{
+- write_nic_byte(dev, EPROM_CMD,
+- (1<<EPROM_CK_SHIFT) | read_nic_byte(dev,EPROM_CMD));
+- force_pci_posting(dev);
+- udelay(EPROM_DELAY);
+- write_nic_byte(dev, EPROM_CMD,
+- read_nic_byte(dev, EPROM_CMD) &~ (1<<EPROM_CK_SHIFT));
+- force_pci_posting(dev);
+- udelay(EPROM_DELAY);
+-}
+-
+-
+-void eprom_w(struct net_device *dev,short bit)
+-{
+- if(bit)
+- write_nic_byte(dev, EPROM_CMD, (1<<EPROM_W_SHIFT) | \
+- read_nic_byte(dev,EPROM_CMD));
+- else
+- write_nic_byte(dev, EPROM_CMD, read_nic_byte(dev,EPROM_CMD)\
+- &~(1<<EPROM_W_SHIFT));
+-
+- force_pci_posting(dev);
+- udelay(EPROM_DELAY);
+-}
+-
+-
+-short eprom_r(struct net_device *dev)
+-{
+- short bit;
+-
+- bit=(read_nic_byte(dev, EPROM_CMD) & (1<<EPROM_R_SHIFT) );
+- udelay(EPROM_DELAY);
+-
+- if(bit) return 1;
+- return 0;
+-}
+-
+-
+-void eprom_send_bits_string(struct net_device *dev, short b[], int len)
+-{
+- int i;
+-
+- for(i=0; i<len; i++){
+- eprom_w(dev, b[i]);
+- eprom_ck_cycle(dev);
+- }
+-}
+-
+-
+-u32 eprom_read(struct net_device *dev, u32 addr)
+-{
+- struct r8180_priv *priv = ieee80211_priv(dev);
+- short read_cmd[]={1,1,0};
+- short addr_str[8];
+- int i;
+- int addr_len;
+- u32 ret;
+-
+- ret=0;
+- //enable EPROM programming
+- write_nic_byte(dev, EPROM_CMD,
+- (EPROM_CMD_PROGRAM<<EPROM_CMD_OPERATING_MODE_SHIFT));
+- force_pci_posting(dev);
+- udelay(EPROM_DELAY);
+-
+- if (priv->epromtype==EPROM_93c56){
+- addr_str[7]=addr & 1;
+- addr_str[6]=addr & (1<<1);
+- addr_str[5]=addr & (1<<2);
+- addr_str[4]=addr & (1<<3);
+- addr_str[3]=addr & (1<<4);
+- addr_str[2]=addr & (1<<5);
+- addr_str[1]=addr & (1<<6);
+- addr_str[0]=addr & (1<<7);
+- addr_len=8;
+- }else{
+- addr_str[5]=addr & 1;
+- addr_str[4]=addr & (1<<1);
+- addr_str[3]=addr & (1<<2);
+- addr_str[2]=addr & (1<<3);
+- addr_str[1]=addr & (1<<4);
+- addr_str[0]=addr & (1<<5);
+- addr_len=6;
+- }
+- eprom_cs(dev, 1);
+- eprom_ck_cycle(dev);
+- eprom_send_bits_string(dev, read_cmd, 3);
+- eprom_send_bits_string(dev, addr_str, addr_len);
+-
+- //keep chip pin D to low state while reading.
+- //I'm unsure if it is necessary, but anyway shouldn't hurt
+- eprom_w(dev, 0);
+-
+- for(i=0;i<16;i++){
+- //eeprom needs a clk cycle between writing opcode&adr
+- //and reading data. (eeprom outs a dummy 0)
+- eprom_ck_cycle(dev);
+- ret |= (eprom_r(dev)<<(15-i));
+- }
+-
+- eprom_cs(dev, 0);
+- eprom_ck_cycle(dev);
+-
+- //disable EPROM programming
+- write_nic_byte(dev, EPROM_CMD,
+- (EPROM_CMD_NORMAL<<EPROM_CMD_OPERATING_MODE_SHIFT));
+- return ret;
+-}
+--- a/drivers/staging/rtl8187se/r8180_93cx6.h
++++ b/drivers/staging/rtl8187se/r8180_93cx6.h
+@@ -45,13 +45,10 @@
+
+ #define EPROM_TXPW_OFDM_CH1_2 0x20
+
+-//#define EPROM_TXPW_CH1_2 0x10
+-#define EPROM_TXPW_CH1_2 0x30
+-#define EPROM_TXPW_CH3_4 0x11
+-#define EPROM_TXPW_CH5_6 0x12
+-#define EPROM_TXPW_CH7_8 0x13
+-#define EPROM_TXPW_CH9_10 0x14
+-#define EPROM_TXPW_CH11_12 0x15
+-#define EPROM_TXPW_CH13_14 0x16
++#define EPROM_TXPW_CH1_2 0x30
++
++#define RTL818X_EEPROM_CMD_READ (1 << 0)
++#define RTL818X_EEPROM_CMD_WRITE (1 << 1)
++#define RTL818X_EEPROM_CMD_CK (1 << 2)
++#define RTL818X_EEPROM_CMD_CS (1 << 3)
+
+-u32 eprom_read(struct net_device *dev,u32 addr); //reads a 16 bits word
+--- a/drivers/staging/rtl8187se/r8180_core.c
++++ b/drivers/staging/rtl8187se/r8180_core.c
+@@ -31,6 +31,7 @@
+ #undef DUMMY_RX
+
+ #include <linux/syscalls.h>
++#include <linux/eeprom_93cx6.h>
+
+ #include "r8180_hw.h"
+ #include "r8180.h"
+@@ -2642,6 +2643,36 @@ static void rtl8180_link_detect_init(pli
+ }
+ //YJ,add,080828,end
+
++static void rtl8187se_eeprom_register_read(struct eeprom_93cx6 *eeprom)
++{
++ struct net_device *dev = eeprom->data;
++ u8 reg = read_nic_byte(dev, EPROM_CMD);
++
++ eeprom->reg_data_in = reg & RTL818X_EEPROM_CMD_WRITE;
++ eeprom->reg_data_out = reg & RTL818X_EEPROM_CMD_READ;
++ eeprom->reg_data_clock = reg & RTL818X_EEPROM_CMD_CK;
++ eeprom->reg_chip_select = reg & RTL818X_EEPROM_CMD_CS;
++}
++
++static void rtl8187se_eeprom_register_write(struct eeprom_93cx6 *eeprom)
++{
++ struct net_device *dev = eeprom->data;
++ u8 reg = 2 << 6;
++
++ if (eeprom->reg_data_in)
++ reg |= RTL818X_EEPROM_CMD_WRITE;
++ if (eeprom->reg_data_out)
++ reg |= RTL818X_EEPROM_CMD_READ;
++ if (eeprom->reg_data_clock)
++ reg |= RTL818X_EEPROM_CMD_CK;
++ if (eeprom->reg_chip_select)
++ reg |= RTL818X_EEPROM_CMD_CS;
++
++ write_nic_byte(dev, EPROM_CMD, reg);
++ read_nic_byte(dev, EPROM_CMD);
++ udelay(10);
++}
++
+ short rtl8180_init(struct net_device *dev)
+ {
+ struct r8180_priv *priv = ieee80211_priv(dev);
+@@ -2650,8 +2681,16 @@ short rtl8180_init(struct net_device *de
+ u32 usValue;
+ u16 tmpu16;
+ int i, j;
++ struct eeprom_93cx6 eeprom;
++ u16 eeprom_val;
++
++ eeprom.data = dev;
++ eeprom.register_read = rtl8187se_eeprom_register_read;
++ eeprom.register_write = rtl8187se_eeprom_register_write;
++ eeprom.width = PCI_EEPROM_WIDTH_93C46;
+
+- priv->channel_plan = eprom_read(dev, EEPROM_COUNTRY_CODE>>1) & 0xFF;
++ eeprom_93cx6_read(&eeprom, EEPROM_COUNTRY_CODE>>1, &eeprom_val);
++ priv->channel_plan = eeprom_val & 0xFF;
+ if(priv->channel_plan > COUNTRY_CODE_GLOBAL_DOMAIN){
+ printk("rtl8180_init:Error channel plan! Set to default.\n");
+ priv->channel_plan = 0;
+@@ -2879,7 +2918,8 @@ short rtl8180_init(struct net_device *de
+ // just for sync 85
+ priv->enable_gpio0 = 0;
+
+- usValue = eprom_read(dev, EEPROM_SW_REVD_OFFSET);
++ eeprom_93cx6_read(&eeprom, EEPROM_SW_REVD_OFFSET, &eeprom_val);
++ usValue = eeprom_val;
+ DMESG("usValue is 0x%x\n",usValue);
+ //3Read AntennaDiversity
+
+@@ -2919,27 +2959,23 @@ short rtl8180_init(struct net_device *de
+ else
+ priv->epromtype=EPROM_93c46;
+
+- dev->dev_addr[0]=eprom_read(dev,MAC_ADR) & 0xff;
+- dev->dev_addr[1]=(eprom_read(dev,MAC_ADR) & 0xff00)>>8;
+- dev->dev_addr[2]=eprom_read(dev,MAC_ADR+1) & 0xff;
+- dev->dev_addr[3]=(eprom_read(dev,MAC_ADR+1) & 0xff00)>>8;
+- dev->dev_addr[4]=eprom_read(dev,MAC_ADR+2) & 0xff;
+- dev->dev_addr[5]=(eprom_read(dev,MAC_ADR+2) & 0xff00)>>8;
++ eeprom_93cx6_multiread(&eeprom, 0x7, (__le16 *)
++ dev->dev_addr, 3);
+
+ for(i=1,j=0; i<14; i+=2,j++){
+- word = eprom_read(dev,EPROM_TXPW_CH1_2 + j);
++ eeprom_93cx6_read(&eeprom, EPROM_TXPW_CH1_2 + j, &word);
+ priv->chtxpwr[i]=word & 0xff;
+ priv->chtxpwr[i+1]=(word & 0xff00)>>8;
+ }
+ for (i = 1, j = 0; i < 14; i += 2, j++) {
+- word = eprom_read(dev, EPROM_TXPW_OFDM_CH1_2 + j);
++ eeprom_93cx6_read(&eeprom, EPROM_TXPW_OFDM_CH1_2 + j, &word);
+ priv->chtxpwr_ofdm[i] = word & 0xff;
+ priv->chtxpwr_ofdm[i+1] = (word & 0xff00) >> 8;
+ }
+
+ /* 3Read crystal calibtration and thermal meter indication on 87SE. */
++ eeprom_93cx6_read(&eeprom, EEPROM_RSV>>1, &tmpu16);
+
+- tmpu16 = eprom_read(dev, EEPROM_RSV >> 1);
+ /* Crystal calibration for Xin and Xout resp. */
+ priv->XtalCal_Xout = tmpu16 & EEPROM_XTAL_CAL_XOUT_MASK;
+ priv->XtalCal_Xin = (tmpu16 & EEPROM_XTAL_CAL_XIN_MASK) >> 4;
+@@ -2951,17 +2987,19 @@ short rtl8180_init(struct net_device *de
+ if ((tmpu16 & EEPROM_THERMAL_METER_ENABLE) >> 13)
+ priv->bTxPowerTrack = true;
+
+- word = eprom_read(dev,EPROM_TXPW_BASE);
++ eeprom_93cx6_read(&eeprom, EPROM_TXPW_BASE, &word);
+ priv->cck_txpwr_base = word & 0xf;
+ priv->ofdm_txpwr_base = (word>>4) & 0xf;
+
+- version = eprom_read(dev,EPROM_VERSION);
++ eeprom_93cx6_read(&eeprom, EPROM_VERSION, &version);
+ DMESG("EEPROM version %x",version);
+ priv->rcr_csense = 3;
+
+- priv->cs_treshold = (eprom_read(dev, ENERGY_TRESHOLD) & 0xff00) >> 8;
++ eeprom_93cx6_read(&eeprom, ENERGY_TRESHOLD, &eeprom_val);
++ priv->cs_treshold = (eeprom_val & 0xff00) >> 8;
+
+- priv->rf_chip = 0xff & eprom_read(dev, RFCHIPID);
++ eeprom_93cx6_read(&eeprom, RFCHIPID, &eeprom_val);
++ priv->rf_chip = 0xff & eeprom_val;
+
+ priv->rf_chip = RF_ZEBRA4;
+ priv->rf_sleep = rtl8225z4_rf_sleep;
diff --git a/staging/staging-r8187se-fix-for-led-not-following-radio-switch.patch b/staging/staging-r8187se-fix-for-led-not-following-radio-switch.patch
new file mode 100644
index 00000000000000..5cd634cbed1aa5
--- /dev/null
+++ b/staging/staging-r8187se-fix-for-led-not-following-radio-switch.patch
@@ -0,0 +1,36 @@
+From Larry.Finger@lwfinger.net Wed Feb 17 15:45:53 2010
+From: Larry Finger <Larry.Finger@lwfinger.net>
+Date: Thu, 11 Feb 2010 14:41:24 -0600
+Subject: Staging: r8187se: Fix for LED not following radio switch
+To: Greg Kroah-Hartman <gregkh@suse.de>
+Cc: Bernhard Schiffner <bernhard@schiffner-limbach.de>, linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org
+Message-ID: <4b746b74.8SETcYq7pcTkXOg9%Larry.Finger@lwfinger.net>
+
+
+The current driver does not follow the state of the RF switch.
+
+Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/staging/rtl8187se/r8180_core.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+--- a/drivers/staging/rtl8187se/r8180_core.c
++++ b/drivers/staging/rtl8187se/r8180_core.c
+@@ -4238,11 +4238,12 @@ void GPIOChangeRFWorkItemCallBack(struct
+ /* HW radio On/Off according to the value of FF51[4](config0) */
+ btConfig0 = btPSR = read_nic_byte(dev, CONFIG0);
+
+- /* Turn on LED. */
+- write_nic_byte(dev, PSR, btPSR | BIT3);
+-
+ eRfPowerStateToSet = (btConfig0 & BIT4) ? eRfOn : eRfOff;
+
++ /* Turn LED back on when radio enabled */
++ if (eRfPowerStateToSet == eRfOn)
++ write_nic_byte(dev, PSR, btPSR | BIT3);
++
+ if ((priv->ieee80211->bHwRadioOff == true) &&
+ (eRfPowerStateToSet == eRfOn)) {
+ priv->ieee80211->bHwRadioOff = false;
diff --git a/staging/staging-vt6655-add-missing-curly-braces.patch b/staging/staging-vt6655-add-missing-curly-braces.patch
new file mode 100644
index 00000000000000..5170cb3ef00943
--- /dev/null
+++ b/staging/staging-vt6655-add-missing-curly-braces.patch
@@ -0,0 +1,43 @@
+From error27@gmail.com Wed Feb 17 15:57:10 2010
+From: Dan Carpenter <error27@gmail.com>
+Date: Fri, 12 Feb 2010 14:48:01 +0300
+Subject: staging: vt6655: add missing curly braces
+To: Greg Kroah-Hartman <gregkh@suse.de>
+Cc: Jim Lieb <lieb@canonical.com>, Forest Bond <forest@alittletooquiet.net>, devel@driverdev.osuosl.org, kernel-janitors@vger.kernel.org
+Message-ID: <20100212114801.GA5975@bicker>
+Content-Disposition: inline
+
+
+It's clear from the indent levels and the context that there are supposed to
+be curly braces here.
+
+Signed-off-by: Dan Carpenter <error27@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/staging/vt6655/card.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/drivers/staging/vt6655/card.c
++++ b/drivers/staging/vt6655/card.c
+@@ -2788,16 +2788,18 @@ void CARDvUpdateBasicTopRate (PVOID pDev
+
+ //Determines the highest basic rate.
+ for (ii = RATE_54M; ii >= RATE_6M; ii --) {
+- if ( (pDevice->wBasicRate) & ((WORD)(1<<ii)) )
++ if ( (pDevice->wBasicRate) & ((WORD)(1<<ii)) ) {
+ byTopOFDM = ii;
+ break;
++ }
+ }
+ pDevice->byTopOFDMBasicRate = byTopOFDM;
+
+ for (ii = RATE_11M;; ii --) {
+- if ( (pDevice->wBasicRate) & ((WORD)(1<<ii)) )
++ if ( (pDevice->wBasicRate) & ((WORD)(1<<ii)) ) {
+ byTopCCK = ii;
+ break;
++ }
+ if (ii == RATE_1M)
+ break;
+ }
diff --git a/staging/staging-wlan-ng-clean-up-assignments-in-if-statements.patch b/staging/staging-wlan-ng-clean-up-assignments-in-if-statements.patch
new file mode 100644
index 00000000000000..e0b76e39d6ad8f
--- /dev/null
+++ b/staging/staging-wlan-ng-clean-up-assignments-in-if-statements.patch
@@ -0,0 +1,78 @@
+From svenne@krap.dk Wed Feb 17 16:05:37 2010
+From: Svenne Krap <svenne@krap.dk>
+Date: Sun, 14 Feb 2010 18:59:42 +0100
+Subject: Staging: wlan-ng: clean up assignments in if statements
+To: greg@kroah.com
+Cc: Svenne Krap <svenne@krap.dk>
+Message-ID: <1266170382-2507-1-git-send-email-svenne@krap.dk>
+
+
+Trivial changes to code-paths.
+
+Signed-off-by: Svenne Krap <svenne@krap.dk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+---
+ drivers/staging/wlan-ng/hfa384x_usb.c | 24 ++++++++++++++++--------
+ 1 file changed, 16 insertions(+), 8 deletions(-)
+
+--- a/drivers/staging/wlan-ng/hfa384x_usb.c
++++ b/drivers/staging/wlan-ng/hfa384x_usb.c
+@@ -1909,16 +1909,20 @@ int hfa384x_drvr_flashdl_enable(hfa384x_
+ return -EINVAL;
+
+ /* Retrieve the buffer loc&size and timeout */
+- if ((result = hfa384x_drvr_getconfig(hw, HFA384x_RID_DOWNLOADBUFFER,
+- &(hw->bufinfo),
+- sizeof(hw->bufinfo)))) {
++
++ result = hfa384x_drvr_getconfig(hw, HFA384x_RID_DOWNLOADBUFFER,
++ &(hw->bufinfo), sizeof(hw->bufinfo));
++ if (result) {
+ return result;
+ }
+ hw->bufinfo.page = le16_to_cpu(hw->bufinfo.page);
+ hw->bufinfo.offset = le16_to_cpu(hw->bufinfo.offset);
+ hw->bufinfo.len = le16_to_cpu(hw->bufinfo.len);
+- if ((result = hfa384x_drvr_getconfig16(hw, HFA384x_RID_MAXLOADTIME,
+- &(hw->dltimeout)))) {
++
++ result = hfa384x_drvr_getconfig16(hw, HFA384x_RID_MAXLOADTIME,
++ &(hw->dltimeout));
++
++ if (result) {
+ return result;
+ }
+ hw->dltimeout = le16_to_cpu(hw->dltimeout);
+@@ -3073,7 +3077,9 @@ static void hfa384x_usbctlxq_run(hfa384x
+
+ /* Now submit the URB and update the CTLX's state
+ */
+- if ((result = SUBMIT_URB(&hw->ctlx_urb, GFP_ATOMIC)) == 0) {
++
++ result = SUBMIT_URB(&hw->ctlx_urb, GFP_ATOMIC);
++ if (result == 0) {
+ /* This CTLX is now running on the active queue */
+ head->state = CTLX_REQ_SUBMITTED;
+
+@@ -3599,7 +3605,8 @@ static void hfa384x_int_rxmonitor(wlande
+ skblen - sizeof(p80211_caphdr_t));
+ }
+
+- if ((skb = dev_alloc_skb(skblen)) == NULL) {
++ skb = dev_alloc_skb(skblen);
++ if (skb == NULL) {
+ printk(KERN_ERR
+ "alloc_skb failed trying to allocate %d bytes\n",
+ skblen);
+@@ -3870,7 +3877,8 @@ retry:
+
+ delresp:
+ if (delete_resptimer) {
+- if ((timer_ok = del_timer(&hw->resptimer)) != 0) {
++ timer_ok = del_timer(&hw->resptimer);
++ if (timer_ok != 0) {
+ hw->resp_timer_done = 1;
+ }
+ }
diff --git a/staging/staging-wlan-ng-multiple-safe-style-cleanups.patch b/staging/staging-wlan-ng-multiple-safe-style-cleanups.patch
new file mode 100644
index 00000000000000..9192c8941675b5
--- /dev/null
+++ b/staging/staging-wlan-ng-multiple-safe-style-cleanups.patch
@@ -0,0 +1,1155 @@
+From svenne@krap.dk Wed Feb 17 16:06:05 2010
+From: Svenne Krap <svenne@krap.dk>
+Date: Sun, 14 Feb 2010 18:59:00 +0100
+Subject: Staging: wlan-ng: multiple safe style cleanups
+To: greg@kroah.com
+Cc: Svenne Krap <svenne@krap.dk>
+Message-ID: <1266170340-2411-1-git-send-email-svenne@krap.dk>
+
+
+Cleanups as suggested by checkpatch.pl utiltiy.
+.o's from before and after cleanup have matching SHA1s.
+
+Signed-off-by: Svenne Krap <svenne@krap.dk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/staging/wlan-ng/hfa384x.h | 72 ++++++++++++++++----------------
+ drivers/staging/wlan-ng/hfa384x_usb.c | 8 +--
+ drivers/staging/wlan-ng/p80211conv.c | 23 +++++-----
+ drivers/staging/wlan-ng/p80211conv.h | 4 -
+ drivers/staging/wlan-ng/p80211metadef.h | 18 ++++----
+ drivers/staging/wlan-ng/p80211mgmt.h | 42 +++++++++---------
+ drivers/staging/wlan-ng/p80211netdev.c | 7 +--
+ drivers/staging/wlan-ng/p80211netdev.h | 44 +++++++++----------
+ drivers/staging/wlan-ng/p80211req.c | 2
+ drivers/staging/wlan-ng/p80211req.h | 2
+ drivers/staging/wlan-ng/p80211types.h | 18 ++++----
+ drivers/staging/wlan-ng/p80211wext.c | 55 ++++++++++++------------
+ drivers/staging/wlan-ng/prism2fw.c | 60 ++++++++++++--------------
+ drivers/staging/wlan-ng/prism2mgmt.c | 4 -
+ drivers/staging/wlan-ng/prism2mgmt.h | 50 +++++++++++-----------
+ drivers/staging/wlan-ng/prism2mib.c | 6 +-
+ drivers/staging/wlan-ng/prism2sta.c | 18 ++++----
+ 17 files changed, 217 insertions(+), 216 deletions(-)
+
+--- a/drivers/staging/wlan-ng/hfa384x.h
++++ b/drivers/staging/wlan-ng/hfa384x.h
+@@ -115,8 +115,8 @@
+
+ /* Make a 32-bit flat address from AUX format 16-bit page and offset */
+ #define HFA384x_ADDR_AUX_MKFLAT(p, o) \
+- (((u32)(((u16)(p))&HFA384x_ADDR_AUX_PAGE_MASK)) << 7) | \
+- ((u32)(((u16)(o))&HFA384x_ADDR_AUX_OFF_MASK))
++ ((((u32)(((u16)(p))&HFA384x_ADDR_AUX_PAGE_MASK)) << 7) | \
++ ((u32)(((u16)(o))&HFA384x_ADDR_AUX_OFF_MASK)))
+
+ /* Make CMD format offset and page from a 32-bit flat address */
+ #define HFA384x_ADDR_CMD_MKPAGE(f) \
+@@ -402,7 +402,7 @@ typedef struct hfa384x_authenticateStati
+ /*-- Configuration Record: WPAData (data portion only) --*/
+ typedef struct hfa384x_WPAData {
+ u16 datalen;
+- u8 data[0]; // max 80
++ u8 data[0]; /* max 80 */
+ } __attribute__ ((packed)) hfa384x_WPAData_t;
+
+ /*--------------------------------------------------------------------
+@@ -1133,7 +1133,7 @@ struct hfa384x;
+
+ typedef void (*ctlx_cmdcb_t) (struct hfa384x *, const struct hfa384x_usbctlx *);
+
+-typedef void (*ctlx_usercb_t) (struct hfa384x * hw,
++typedef void (*ctlx_usercb_t) (struct hfa384x *hw,
+ void *ctlxresult, void *usercb_data);
+
+ typedef struct hfa384x_usbctlx {
+@@ -1320,25 +1320,25 @@ typedef struct hfa384x {
+
+ } hfa384x_t;
+
+-void hfa384x_create(hfa384x_t * hw, struct usb_device *usb);
+-void hfa384x_destroy(hfa384x_t * hw);
++void hfa384x_create(hfa384x_t *hw, struct usb_device *usb);
++void hfa384x_destroy(hfa384x_t *hw);
+
+ int
+-hfa384x_corereset(hfa384x_t * hw, int holdtime, int settletime, int genesis);
+-int hfa384x_drvr_commtallies(hfa384x_t * hw);
+-int hfa384x_drvr_disable(hfa384x_t * hw, u16 macport);
+-int hfa384x_drvr_enable(hfa384x_t * hw, u16 macport);
+-int hfa384x_drvr_flashdl_enable(hfa384x_t * hw);
+-int hfa384x_drvr_flashdl_disable(hfa384x_t * hw);
+-int hfa384x_drvr_flashdl_write(hfa384x_t * hw, u32 daddr, void *buf, u32 len);
+-int hfa384x_drvr_getconfig(hfa384x_t * hw, u16 rid, void *buf, u16 len);
+-int hfa384x_drvr_ramdl_enable(hfa384x_t * hw, u32 exeaddr);
+-int hfa384x_drvr_ramdl_disable(hfa384x_t * hw);
+-int hfa384x_drvr_ramdl_write(hfa384x_t * hw, u32 daddr, void *buf, u32 len);
+-int hfa384x_drvr_readpda(hfa384x_t * hw, void *buf, unsigned int len);
+-int hfa384x_drvr_setconfig(hfa384x_t * hw, u16 rid, void *buf, u16 len);
++hfa384x_corereset(hfa384x_t *hw, int holdtime, int settletime, int genesis);
++int hfa384x_drvr_commtallies(hfa384x_t *hw);
++int hfa384x_drvr_disable(hfa384x_t *hw, u16 macport);
++int hfa384x_drvr_enable(hfa384x_t *hw, u16 macport);
++int hfa384x_drvr_flashdl_enable(hfa384x_t *hw);
++int hfa384x_drvr_flashdl_disable(hfa384x_t *hw);
++int hfa384x_drvr_flashdl_write(hfa384x_t *hw, u32 daddr, void *buf, u32 len);
++int hfa384x_drvr_getconfig(hfa384x_t *hw, u16 rid, void *buf, u16 len);
++int hfa384x_drvr_ramdl_enable(hfa384x_t *hw, u32 exeaddr);
++int hfa384x_drvr_ramdl_disable(hfa384x_t *hw);
++int hfa384x_drvr_ramdl_write(hfa384x_t *hw, u32 daddr, void *buf, u32 len);
++int hfa384x_drvr_readpda(hfa384x_t *hw, void *buf, unsigned int len);
++int hfa384x_drvr_setconfig(hfa384x_t *hw, u16 rid, void *buf, u16 len);
+
+-static inline int hfa384x_drvr_getconfig16(hfa384x_t * hw, u16 rid, void *val)
++static inline int hfa384x_drvr_getconfig16(hfa384x_t *hw, u16 rid, void *val)
+ {
+ int result = 0;
+ result = hfa384x_drvr_getconfig(hw, rid, val, sizeof(u16));
+@@ -1347,44 +1347,44 @@ static inline int hfa384x_drvr_getconfig
+ return result;
+ }
+
+-static inline int hfa384x_drvr_setconfig16(hfa384x_t * hw, u16 rid, u16 val)
++static inline int hfa384x_drvr_setconfig16(hfa384x_t *hw, u16 rid, u16 val)
+ {
+ u16 value = cpu_to_le16(val);
+ return hfa384x_drvr_setconfig(hw, rid, &value, sizeof(value));
+ }
+
+ int
+-hfa384x_drvr_getconfig_async(hfa384x_t * hw,
++hfa384x_drvr_getconfig_async(hfa384x_t *hw,
+ u16 rid, ctlx_usercb_t usercb, void *usercb_data);
+
+ int
+-hfa384x_drvr_setconfig_async(hfa384x_t * hw,
++hfa384x_drvr_setconfig_async(hfa384x_t *hw,
+ u16 rid,
+ void *buf,
+ u16 len, ctlx_usercb_t usercb, void *usercb_data);
+
+ static inline int
+-hfa384x_drvr_setconfig16_async(hfa384x_t * hw, u16 rid, u16 val)
++hfa384x_drvr_setconfig16_async(hfa384x_t *hw, u16 rid, u16 val)
+ {
+ u16 value = cpu_to_le16(val);
+ return hfa384x_drvr_setconfig_async(hw, rid, &value, sizeof(value),
+ NULL, NULL);
+ }
+
+-int hfa384x_drvr_start(hfa384x_t * hw);
+-int hfa384x_drvr_stop(hfa384x_t * hw);
++int hfa384x_drvr_start(hfa384x_t *hw);
++int hfa384x_drvr_stop(hfa384x_t *hw);
+ int
+-hfa384x_drvr_txframe(hfa384x_t * hw, struct sk_buff *skb,
+- p80211_hdr_t * p80211_hdr, p80211_metawep_t * p80211_wep);
+-void hfa384x_tx_timeout(wlandevice_t * wlandev);
+-
+-int hfa384x_cmd_initialize(hfa384x_t * hw);
+-int hfa384x_cmd_enable(hfa384x_t * hw, u16 macport);
+-int hfa384x_cmd_disable(hfa384x_t * hw, u16 macport);
+-int hfa384x_cmd_allocate(hfa384x_t * hw, u16 len);
+-int hfa384x_cmd_monitor(hfa384x_t * hw, u16 enable);
++hfa384x_drvr_txframe(hfa384x_t *hw, struct sk_buff *skb,
++ p80211_hdr_t *p80211_hdr, p80211_metawep_t *p80211_wep);
++void hfa384x_tx_timeout(wlandevice_t *wlandev);
++
++int hfa384x_cmd_initialize(hfa384x_t *hw);
++int hfa384x_cmd_enable(hfa384x_t *hw, u16 macport);
++int hfa384x_cmd_disable(hfa384x_t *hw, u16 macport);
++int hfa384x_cmd_allocate(hfa384x_t *hw, u16 len);
++int hfa384x_cmd_monitor(hfa384x_t *hw, u16 enable);
+ int
+-hfa384x_cmd_download(hfa384x_t * hw,
++hfa384x_cmd_download(hfa384x_t *hw,
+ u16 mode, u16 lowaddr, u16 highaddr, u16 codelen);
+
+ #endif /* __KERNEL__ */
+--- a/drivers/staging/wlan-ng/hfa384x_usb.c
++++ b/drivers/staging/wlan-ng/hfa384x_usb.c
+@@ -126,7 +126,7 @@
+ #include <linux/usb.h>
+ #include <linux/byteorder/generic.h>
+
+-#define SUBMIT_URB(u,f) usb_submit_urb(u,f)
++#define SUBMIT_URB(u, f) usb_submit_urb(u, f)
+
+ #include "p80211types.h"
+ #include "p80211hdr.h"
+@@ -627,7 +627,7 @@ static hfa384x_usbctlx_t *usbctlx_alloc(
+ {
+ hfa384x_usbctlx_t *ctlx;
+
+- ctlx = kmalloc(sizeof(*ctlx), in_interrupt()? GFP_ATOMIC : GFP_KERNEL);
++ ctlx = kmalloc(sizeof(*ctlx), in_interrupt() ? GFP_ATOMIC : GFP_KERNEL);
+ if (ctlx != NULL) {
+ memset(ctlx, 0, sizeof(*ctlx));
+ init_completion(&ctlx->done);
+@@ -675,7 +675,7 @@ struct usbctlx_cmd_completor {
+ };
+ typedef struct usbctlx_cmd_completor usbctlx_cmd_completor_t;
+
+-static int usbctlx_cmd_completor_fn(usbctlx_completor_t * head)
++static int usbctlx_cmd_completor_fn(usbctlx_completor_t *head)
+ {
+ usbctlx_cmd_completor_t *complete = (usbctlx_cmd_completor_t *) head;
+ return usbctlx_get_status(complete->cmdresp, complete->result);
+@@ -3649,7 +3649,7 @@ static void hfa384x_int_rxmonitor(wlande
+ /* check for unencrypted stuff if WEP bit set. */
+ if (*(datap - hdrlen + 1) & 0x40) /* wep set */
+ if ((*(datap) == 0xaa) && (*(datap + 1) == 0xaa))
+- *(datap - hdrlen + 1) &= 0xbf; // clear wep; it's the 802.2 header!
++ *(datap - hdrlen + 1) &= 0xbf; /* clear wep; it's the 802.2 header! */
+ }
+
+ if (hw->sniff_fcs) {
+--- a/drivers/staging/wlan-ng/p80211conv.c
++++ b/drivers/staging/wlan-ng/p80211conv.c
+@@ -206,12 +206,12 @@ int skb_ether_to_p80211(wlandevice_t *wl
+ /* XXXX need to pick keynum other than default? */
+
+ p80211_wep->data = kmalloc(skb->len, GFP_ATOMIC);
+-
+- if ((foo = wep_encrypt(wlandev, skb->data, p80211_wep->data,
+- skb->len,
+- (wlandev->hostwep &
+- HOSTWEP_DEFAULTKEY_MASK),
+- p80211_wep->iv, p80211_wep->icv))) {
++ foo = wep_encrypt(wlandev, skb->data, p80211_wep->data,
++ skb->len,
++ (wlandev->hostwep &
++ HOSTWEP_DEFAULTKEY_MASK),
++ p80211_wep->iv, p80211_wep->icv);
++ if (foo) {
+ printk(KERN_WARNING
+ "Host en-WEP failed, dropping frame (%d).\n",
+ foo);
+@@ -323,11 +323,12 @@ int skb_p80211_to_ether(wlandevice_t *wl
+ skb->len);
+ return 1;
+ }
+- if ((foo = wep_decrypt(wlandev, skb->data + payload_offset + 4,
+- payload_length - 8, -1,
+- skb->data + payload_offset,
+- skb->data + payload_offset +
+- payload_length - 4))) {
++ foo = wep_decrypt(wlandev, skb->data + payload_offset + 4,
++ payload_length - 8, -1,
++ skb->data + payload_offset,
++ skb->data + payload_offset +
++ payload_length - 4);
++ if (foo) {
+ /* de-wep failed, drop skb. */
+ pr_debug("Host de-WEP failed, dropping frame (%d).\n",
+ foo);
+--- a/drivers/staging/wlan-ng/p80211conv.h
++++ b/drivers/staging/wlan-ng/p80211conv.h
+@@ -153,8 +153,8 @@ struct wlandevice;
+ int skb_p80211_to_ether(struct wlandevice *wlandev, u32 ethconv,
+ struct sk_buff *skb);
+ int skb_ether_to_p80211(struct wlandevice *wlandev, u32 ethconv,
+- struct sk_buff *skb, p80211_hdr_t * p80211_hdr,
+- p80211_metawep_t * p80211_wep);
++ struct sk_buff *skb, p80211_hdr_t *p80211_hdr,
++ p80211_metawep_t *p80211_wep);
+
+ int p80211_stt_findproto(u16 proto);
+
+--- a/drivers/staging/wlan-ng/p80211metadef.h
++++ b/drivers/staging/wlan-ng/p80211metadef.h
+@@ -190,9 +190,9 @@
+ (P80211DID_MKSECTION(2) | \
+ P80211DID_MKGROUP(1))
+ #define DIDmib_dot11mac_dot11OperationTable_dot11MACAddress \
+- (P80211DID_MKSECTION(2) | \
+- P80211DID_MKGROUP(1) | \
+- P80211DID_MKITEM(1) | 0x18000000)
++ ((P80211DID_MKSECTION(2) | \
++ P80211DID_MKGROUP(1) | \
++ P80211DID_MKITEM(1) | 0x18000000))
+ #define DIDmib_dot11mac_dot11OperationTable_dot11RTSThreshold \
+ (P80211DID_MKSECTION(2) | \
+ P80211DID_MKGROUP(1) | \
+@@ -210,18 +210,18 @@
+ P80211DID_MKGROUP(1) | \
+ P80211DID_MKITEM(5) | 0x18000000)
+ #define DIDmib_dot11mac_dot11OperationTable_dot11MaxTransmitMSDULifetime \
+- (P80211DID_MKSECTION(2) | \
+- P80211DID_MKGROUP(1) | \
+- P80211DID_MKITEM(6) | 0x10000000)
++ (P80211DID_MKSECTION(2) | \
++ P80211DID_MKGROUP(1) | \
++ P80211DID_MKITEM(6) | 0x10000000)
+ #define DIDmib_cat_dot11phy \
+ P80211DID_MKSECTION(3)
+ #define DIDmib_dot11phy_dot11PhyOperationTable \
+ (P80211DID_MKSECTION(3) | \
+ P80211DID_MKGROUP(1))
+ #define DIDmib_dot11phy_dot11PhyTxPowerTable_dot11CurrentTxPowerLevel \
+- (P80211DID_MKSECTION(3) | \
+- P80211DID_MKGROUP(3) | \
+- P80211DID_MKITEM(10) | 0x18000000)
++ (P80211DID_MKSECTION(3) | \
++ P80211DID_MKGROUP(3) | \
++ P80211DID_MKITEM(10) | 0x18000000)
+ #define DIDmib_dot11phy_dot11PhyDSSSTable \
+ (P80211DID_MKSECTION(3) | \
+ P80211DID_MKGROUP(5))
+--- a/drivers/staging/wlan-ng/p80211mgmt.h
++++ b/drivers/staging/wlan-ng/p80211mgmt.h
+@@ -100,7 +100,7 @@
+ #ifndef _P80211MGMT_H
+ #define _P80211MGMT_H
+
+-#ifndef _P80211HDR_H
++#ifndef _P80211HDR_H
+ #include "p80211hdr.h"
+ #endif
+
+@@ -496,25 +496,25 @@ typedef struct wlan_fr_deauthen {
+
+ } wlan_fr_deauthen_t;
+
+-void wlan_mgmt_encode_beacon(wlan_fr_beacon_t * f);
+-void wlan_mgmt_decode_beacon(wlan_fr_beacon_t * f);
+-void wlan_mgmt_encode_disassoc(wlan_fr_disassoc_t * f);
+-void wlan_mgmt_decode_disassoc(wlan_fr_disassoc_t * f);
+-void wlan_mgmt_encode_assocreq(wlan_fr_assocreq_t * f);
+-void wlan_mgmt_decode_assocreq(wlan_fr_assocreq_t * f);
+-void wlan_mgmt_encode_assocresp(wlan_fr_assocresp_t * f);
+-void wlan_mgmt_decode_assocresp(wlan_fr_assocresp_t * f);
+-void wlan_mgmt_encode_reassocreq(wlan_fr_reassocreq_t * f);
+-void wlan_mgmt_decode_reassocreq(wlan_fr_reassocreq_t * f);
+-void wlan_mgmt_encode_reassocresp(wlan_fr_reassocresp_t * f);
+-void wlan_mgmt_decode_reassocresp(wlan_fr_reassocresp_t * f);
+-void wlan_mgmt_encode_probereq(wlan_fr_probereq_t * f);
+-void wlan_mgmt_decode_probereq(wlan_fr_probereq_t * f);
+-void wlan_mgmt_encode_proberesp(wlan_fr_proberesp_t * f);
+-void wlan_mgmt_decode_proberesp(wlan_fr_proberesp_t * f);
+-void wlan_mgmt_encode_authen(wlan_fr_authen_t * f);
+-void wlan_mgmt_decode_authen(wlan_fr_authen_t * f);
+-void wlan_mgmt_encode_deauthen(wlan_fr_deauthen_t * f);
+-void wlan_mgmt_decode_deauthen(wlan_fr_deauthen_t * f);
++void wlan_mgmt_encode_beacon(wlan_fr_beacon_t *f);
++void wlan_mgmt_decode_beacon(wlan_fr_beacon_t *f);
++void wlan_mgmt_encode_disassoc(wlan_fr_disassoc_t *f);
++void wlan_mgmt_decode_disassoc(wlan_fr_disassoc_t *f);
++void wlan_mgmt_encode_assocreq(wlan_fr_assocreq_t *f);
++void wlan_mgmt_decode_assocreq(wlan_fr_assocreq_t *f);
++void wlan_mgmt_encode_assocresp(wlan_fr_assocresp_t *f);
++void wlan_mgmt_decode_assocresp(wlan_fr_assocresp_t *f);
++void wlan_mgmt_encode_reassocreq(wlan_fr_reassocreq_t *f);
++void wlan_mgmt_decode_reassocreq(wlan_fr_reassocreq_t *f);
++void wlan_mgmt_encode_reassocresp(wlan_fr_reassocresp_t *f);
++void wlan_mgmt_decode_reassocresp(wlan_fr_reassocresp_t *f);
++void wlan_mgmt_encode_probereq(wlan_fr_probereq_t *f);
++void wlan_mgmt_decode_probereq(wlan_fr_probereq_t *f);
++void wlan_mgmt_encode_proberesp(wlan_fr_proberesp_t *f);
++void wlan_mgmt_decode_proberesp(wlan_fr_proberesp_t *f);
++void wlan_mgmt_encode_authen(wlan_fr_authen_t *f);
++void wlan_mgmt_decode_authen(wlan_fr_authen_t *f);
++void wlan_mgmt_encode_deauthen(wlan_fr_deauthen_t *f);
++void wlan_mgmt_decode_deauthen(wlan_fr_deauthen_t *f);
+
+ #endif /* _P80211MGMT_H */
+--- a/drivers/staging/wlan-ng/p80211netdev.c
++++ b/drivers/staging/wlan-ng/p80211netdev.c
+@@ -586,7 +586,8 @@ static int p80211knetdev_do_ioctl(netdev
+ }
+
+ /* Allocate a buf of size req->len */
+- if ((msgbuf = kmalloc(req->len, GFP_KERNEL))) {
++ msgbuf = kmalloc(req->len, GFP_KERNEL);
++ if (msgbuf) {
+ if (copy_from_user(msgbuf, (void __user *)req->data, req->len))
+ result = -EFAULT;
+ else
+@@ -646,7 +647,7 @@ static int p80211knetdev_set_mac_address
+
+ /* Set up some convenience pointers. */
+ mibattr = &dot11req.mibattribute;
+- macaddr = (p80211item_pstr6_t *) & mibattr->data;
++ macaddr = (p80211item_pstr6_t *) &mibattr->data;
+ resultcode = &dot11req.resultcode;
+
+ /* Set up a dot11req_mibset */
+@@ -674,7 +675,7 @@ static int p80211knetdev_set_mac_address
+ resultcode->data = 0;
+
+ /* now fire the request */
+- result = p80211req_dorequest(dev->ml_priv, (u8 *) & dot11req);
++ result = p80211req_dorequest(dev->ml_priv, (u8 *) &dot11req);
+
+ /* If the request wasn't successful, report an error and don't
+ * change the netdev address
+--- a/drivers/staging/wlan-ng/p80211netdev.h
++++ b/drivers/staging/wlan-ng/p80211netdev.h
+@@ -179,16 +179,16 @@ typedef struct wlandevice {
+ unsigned int ethconv;
+
+ /* device methods (init by MSD, used by p80211 */
+- int (*open) (struct wlandevice * wlandev);
+- int (*close) (struct wlandevice * wlandev);
+- void (*reset) (struct wlandevice * wlandev);
+- int (*txframe) (struct wlandevice * wlandev, struct sk_buff * skb,
+- p80211_hdr_t * p80211_hdr,
+- p80211_metawep_t * p80211_wep);
+- int (*mlmerequest) (struct wlandevice * wlandev, p80211msg_t * msg);
+- int (*set_multicast_list) (struct wlandevice * wlandev,
+- netdevice_t * dev);
+- void (*tx_timeout) (struct wlandevice * wlandev);
++ int (*open) (struct wlandevice *wlandev);
++ int (*close) (struct wlandevice *wlandev);
++ void (*reset) (struct wlandevice *wlandev);
++ int (*txframe) (struct wlandevice *wlandev, struct sk_buff *skb,
++ p80211_hdr_t *p80211_hdr,
++ p80211_metawep_t *p80211_wep);
++ int (*mlmerequest) (struct wlandevice *wlandev, p80211msg_t *msg);
++ int (*set_multicast_list) (struct wlandevice *wlandev,
++ netdevice_t *dev);
++ void (*tx_timeout) (struct wlandevice *wlandev);
+
+ /* 802.11 State */
+ u8 bssid[WLAN_BSSID_LEN];
+@@ -227,16 +227,16 @@ typedef struct wlandevice {
+ } wlandevice_t;
+
+ /* WEP stuff */
+-int wep_change_key(wlandevice_t * wlandev, int keynum, u8 * key, int keylen);
+-int wep_decrypt(wlandevice_t * wlandev, u8 * buf, u32 len, int key_override,
+- u8 * iv, u8 * icv);
+-int wep_encrypt(wlandevice_t * wlandev, u8 * buf, u8 * dst, u32 len, int keynum,
+- u8 * iv, u8 * icv);
+-
+-int wlan_setup(wlandevice_t * wlandev);
+-int wlan_unsetup(wlandevice_t * wlandev);
+-int register_wlandev(wlandevice_t * wlandev);
+-int unregister_wlandev(wlandevice_t * wlandev);
+-void p80211netdev_rx(wlandevice_t * wlandev, struct sk_buff *skb);
+-void p80211netdev_hwremoved(wlandevice_t * wlandev);
++int wep_change_key(wlandevice_t *wlandev, int keynum, u8 *key, int keylen);
++int wep_decrypt(wlandevice_t *wlandev, u8 *buf, u32 len, int key_override,
++ u8 *iv, u8 *icv);
++int wep_encrypt(wlandevice_t *wlandev, u8 *buf, u8 *dst, u32 len, int keynum,
++ u8 *iv, u8 *icv);
++
++int wlan_setup(wlandevice_t *wlandev);
++int wlan_unsetup(wlandevice_t *wlandev);
++int register_wlandev(wlandevice_t *wlandev);
++int unregister_wlandev(wlandevice_t *wlandev);
++void p80211netdev_rx(wlandevice_t *wlandev, struct sk_buff *skb);
++void p80211netdev_hwremoved(wlandevice_t *wlandev);
+ #endif
+--- a/drivers/staging/wlan-ng/p80211req.c
++++ b/drivers/staging/wlan-ng/p80211req.c
+@@ -94,7 +94,7 @@ static int p80211req_mibset_mibget(wland
+ * Potentially blocks the caller, so it's a good idea to
+ * not call this function from an interrupt context.
+ ----------------------------------------------------------------*/
+-int p80211req_dorequest(wlandevice_t * wlandev, u8 * msgbuf)
++int p80211req_dorequest(wlandevice_t *wlandev, u8 *msgbuf)
+ {
+ int result = 0;
+ p80211msg_t *msg = (p80211msg_t *) msgbuf;
+--- a/drivers/staging/wlan-ng/p80211req.h
++++ b/drivers/staging/wlan-ng/p80211req.h
+@@ -48,6 +48,6 @@
+ #ifndef _LINUX_P80211REQ_H
+ #define _LINUX_P80211REQ_H
+
+-int p80211req_dorequest(wlandevice_t * wlandev, u8 * msgbuf);
++int p80211req_dorequest(wlandevice_t *wlandev, u8 *msgbuf);
+
+ #endif
+--- a/drivers/staging/wlan-ng/p80211types.h
++++ b/drivers/staging/wlan-ng/p80211types.h
+@@ -168,12 +168,12 @@
+ P80211DID_MASK_ISTABLE, \
+ P80211DID_LSB_ISTABLE)
+
+-#define P80211DID_MKID(s,g,i,n,t,a) (P80211DID_MKSECTION(s) | \
+- P80211DID_MKGROUP(g) | \
+- P80211DID_MKITEM(i) | \
+- P80211DID_MKINDEX(n) | \
+- P80211DID_MKISTABLE(t) | \
+- (a))
++#define P80211DID_MKID(s, g, i, n, t, a) (P80211DID_MKSECTION(s) | \
++ P80211DID_MKGROUP(g) | \
++ P80211DID_MKITEM(i) | \
++ P80211DID_MKINDEX(n) | \
++ P80211DID_MKISTABLE(t) | \
++ (a))
+
+ #define P80211DID_GET(a, m, l) ((((u32)(a)) >> (l)) & (m))
+
+@@ -340,11 +340,11 @@ struct catlistitem;
+ /* metadata items. Some components may choose to use more, */
+ /* less or different metadata items. */
+
+-typedef void (*p80211_totext_t) (struct catlistitem *, u32 did, u8 * itembuf,
++typedef void (*p80211_totext_t) (struct catlistitem *, u32 did, u8 *itembuf,
+ char *textbuf);
+-typedef void (*p80211_fromtext_t) (struct catlistitem *, u32 did, u8 * itembuf,
++typedef void (*p80211_fromtext_t) (struct catlistitem *, u32 did, u8 *itembuf,
+ char *textbuf);
+-typedef u32(*p80211_valid_t) (struct catlistitem *, u32 did, u8 * itembuf);
++typedef u32(*p80211_valid_t) (struct catlistitem *, u32 did, u8 *itembuf);
+
+ /*----------------------------------------------------------------*/
+ /* Enumeration Lists */
+--- a/drivers/staging/wlan-ng/p80211wext.c
++++ b/drivers/staging/wlan-ng/p80211wext.c
+@@ -138,7 +138,7 @@ static int p80211wext_dorequest(wlandevi
+ mibitem.did = did;
+ mibitem.data = data;
+ memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
+- result = p80211req_dorequest(wlandev, (u8 *) & msg);
++ result = p80211req_dorequest(wlandev, (u8 *) &msg);
+
+ return result;
+ }
+@@ -175,7 +175,7 @@ static int p80211wext_autojoin(wlandevic
+ memcpy(msg.ssid.data.data, ssid, data.length);
+ msg.ssid.data.len = data.length;
+
+- result = p80211req_dorequest(wlandev, (u8 *) & msg);
++ result = p80211req_dorequest(wlandev, (u8 *) &msg);
+
+ if (result) {
+ err = -EFAULT;
+@@ -212,7 +212,7 @@ struct iw_statistics *p80211wext_get_wir
+ if (wlandev->mlmerequest == NULL)
+ return NULL;
+
+- retval = wlandev->mlmerequest(wlandev, (p80211msg_t *) & quality);
++ retval = wlandev->mlmerequest(wlandev, (p80211msg_t *) &quality);
+
+ wstats->qual.qual = qual_as_percent(quality.link.data); /* overall link quality */
+ wstats->qual.level = quality.level.data; /* instant signal level */
+@@ -273,7 +273,7 @@ static int p80211wext_giwfreq(netdevice_
+ memset(&mibitem, 0, sizeof(mibitem));
+ mibitem.did = DIDmib_dot11phy_dot11PhyDSSSTable_dot11CurrentChannel;
+ memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
+- result = p80211req_dorequest(wlandev, (u8 *) & msg);
++ result = p80211req_dorequest(wlandev, (u8 *) &msg);
+
+ if (result) {
+ err = -EFAULT;
+@@ -321,7 +321,7 @@ static int p80211wext_siwfreq(netdevice_
+ mibitem.data = p80211_mhz_to_channel(freq->m);
+
+ memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
+- result = p80211req_dorequest(wlandev, (u8 *) & msg);
++ result = p80211req_dorequest(wlandev, (u8 *) &msg);
+
+ if (result) {
+ err = -EFAULT;
+@@ -403,7 +403,7 @@ static int p80211wext_siwmode(netdevice_
+ mibitem.did = DIDmib_p2_p2Static_p2CnfPortType;
+ mibitem.data = (*mode == IW_MODE_ADHOC) ? 0 : 1;
+ memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
+- result = p80211req_dorequest(wlandev, (u8 *) & msg);
++ result = p80211req_dorequest(wlandev, (u8 *) &msg);
+
+ if (result)
+ err = -EFAULT;
+@@ -553,7 +553,8 @@ static int p80211wext_siwencode(netdevic
+ }
+
+ /* Check the Key index first. */
+- if ((i = (erq->flags & IW_ENCODE_INDEX))) {
++ i = (erq->flags & IW_ENCODE_INDEX);
++ if (i) {
+
+ if ((i < 1) || (i > NUM_WEPKEYS)) {
+ err = -EINVAL;
+@@ -625,7 +626,7 @@ static int p80211wext_siwencode(netdevic
+
+ msg.msgcode = DIDmsg_dot11req_mibset;
+ memcpy(&msg.mibattribute.data, &pstr, sizeof(pstr));
+- result = p80211req_dorequest(wlandev, (u8 *) & msg);
++ result = p80211req_dorequest(wlandev, (u8 *) &msg);
+
+ if (result) {
+ err = -EFAULT;
+@@ -733,7 +734,7 @@ static int p80211wext_siwessid(netdevice
+ msg.ssid.data.len = length;
+
+ pr_debug("autojoin_ssid for %s \n", essid);
+- result = p80211req_dorequest(wlandev, (u8 *) & msg);
++ result = p80211req_dorequest(wlandev, (u8 *) &msg);
+ pr_debug("autojoin_ssid %d\n", result);
+
+ if (result) {
+@@ -778,7 +779,7 @@ static int p80211wext_giwrate(netdevice_
+ memset(&mibitem, 0, sizeof(mibitem));
+ mibitem.did = DIDmib_p2_p2MAC_p2CurrentTxRate;
+ memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
+- result = p80211req_dorequest(wlandev, (u8 *) & msg);
++ result = p80211req_dorequest(wlandev, (u8 *) &msg);
+
+ if (result) {
+ err = -EFAULT;
+@@ -830,7 +831,7 @@ static int p80211wext_giwrts(netdevice_t
+ memset(&mibitem, 0, sizeof(mibitem));
+ mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11RTSThreshold;
+ memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
+- result = p80211req_dorequest(wlandev, (u8 *) & msg);
++ result = p80211req_dorequest(wlandev, (u8 *) &msg);
+
+ if (result) {
+ err = -EFAULT;
+@@ -871,7 +872,7 @@ static int p80211wext_siwrts(netdevice_t
+ mibitem.data = rts->value;
+
+ memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
+- result = p80211req_dorequest(wlandev, (u8 *) & msg);
++ result = p80211req_dorequest(wlandev, (u8 *) &msg);
+
+ if (result) {
+ err = -EFAULT;
+@@ -897,7 +898,7 @@ static int p80211wext_giwfrag(netdevice_
+ mibitem.did =
+ DIDmib_dot11mac_dot11OperationTable_dot11FragmentationThreshold;
+ memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
+- result = p80211req_dorequest(wlandev, (u8 *) & msg);
++ result = p80211req_dorequest(wlandev, (u8 *) &msg);
+
+ if (result) {
+ err = -EFAULT;
+@@ -940,7 +941,7 @@ static int p80211wext_siwfrag(netdevice_
+ mibitem.data = frag->value;
+
+ memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
+- result = p80211req_dorequest(wlandev, (u8 *) & msg);
++ result = p80211req_dorequest(wlandev, (u8 *) &msg);
+
+ if (result) {
+ err = -EFAULT;
+@@ -975,7 +976,7 @@ static int p80211wext_giwretry(netdevice
+ mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11ShortRetryLimit;
+
+ memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
+- result = p80211req_dorequest(wlandev, (u8 *) & msg);
++ result = p80211req_dorequest(wlandev, (u8 *) &msg);
+
+ if (result) {
+ err = -EFAULT;
+@@ -989,7 +990,7 @@ static int p80211wext_giwretry(netdevice
+ mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11LongRetryLimit;
+
+ memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
+- result = p80211req_dorequest(wlandev, (u8 *) & msg);
++ result = p80211req_dorequest(wlandev, (u8 *) &msg);
+
+ if (result) {
+ err = -EFAULT;
+@@ -1004,7 +1005,7 @@ static int p80211wext_giwretry(netdevice
+ DIDmib_dot11mac_dot11OperationTable_dot11MaxTransmitMSDULifetime;
+
+ memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
+- result = p80211req_dorequest(wlandev, (u8 *) & msg);
++ result = p80211req_dorequest(wlandev, (u8 *) &msg);
+
+ if (result) {
+ err = -EFAULT;
+@@ -1067,7 +1068,7 @@ static int p80211wext_siwretry(netdevice
+ mibitem.data = rrq->value /= 1024;
+
+ memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
+- result = p80211req_dorequest(wlandev, (u8 *) & msg);
++ result = p80211req_dorequest(wlandev, (u8 *) &msg);
+
+ if (result) {
+ err = -EFAULT;
+@@ -1081,7 +1082,7 @@ static int p80211wext_siwretry(netdevice
+
+ memcpy(&msg.mibattribute.data, &mibitem,
+ sizeof(mibitem));
+- result = p80211req_dorequest(wlandev, (u8 *) & msg);
++ result = p80211req_dorequest(wlandev, (u8 *) &msg);
+
+ if (result) {
+ err = -EFAULT;
+@@ -1096,7 +1097,7 @@ static int p80211wext_siwretry(netdevice
+
+ memcpy(&msg.mibattribute.data, &mibitem,
+ sizeof(mibitem));
+- result = p80211req_dorequest(wlandev, (u8 *) & msg);
++ result = p80211req_dorequest(wlandev, (u8 *) &msg);
+
+ if (result) {
+ err = -EFAULT;
+@@ -1134,7 +1135,7 @@ static int p80211wext_siwtxpow(netdevice
+ else
+ mibitem.data = rrq->value;
+ memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
+- result = p80211req_dorequest(wlandev, (u8 *) & msg);
++ result = p80211req_dorequest(wlandev, (u8 *) &msg);
+
+ if (result) {
+ err = -EFAULT;
+@@ -1162,7 +1163,7 @@ static int p80211wext_giwtxpow(netdevice
+ DIDmib_dot11phy_dot11PhyTxPowerTable_dot11CurrentTxPowerLevel;
+
+ memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
+- result = p80211req_dorequest(wlandev, (u8 *) & msg);
++ result = p80211req_dorequest(wlandev, (u8 *) &msg);
+
+ if (result) {
+ err = -EFAULT;
+@@ -1310,7 +1311,7 @@ static int p80211wext_siwscan(netdevice_
+ msg.maxchanneltime.data = 250;
+ msg.minchanneltime.data = 200;
+
+- result = p80211req_dorequest(wlandev, (u8 *) & msg);
++ result = p80211req_dorequest(wlandev, (u8 *) &msg);
+ if (result)
+ err = prism2_result2err(msg.resultcode.data);
+
+@@ -1429,7 +1430,7 @@ static int p80211wext_giwscan(netdevice_
+ msg.msgcode = DIDmsg_dot11req_scan_results;
+ msg.bssindex.data = i;
+
+- result = p80211req_dorequest(wlandev, (u8 *) & msg);
++ result = p80211req_dorequest(wlandev, (u8 *) &msg);
+ if ((result != 0) ||
+ (msg.resultcode.data != P80211ENUM_resultcode_success)) {
+ break;
+@@ -1504,7 +1505,7 @@ static int p80211wext_set_encodeext(stru
+ memcpy(wlandev->wep_keys[idx], ext->key, ext->key_len);
+
+ memset(&msg, 0, sizeof(msg));
+- pstr = (p80211item_pstr32_t *) & msg.mibattribute.data;
++ pstr = (p80211item_pstr32_t *) &msg.mibattribute.data;
+ memcpy(pstr->data.data, ext->key, ext->key_len);
+ pstr->data.len = ext->key_len;
+ switch (idx) {
+@@ -1528,7 +1529,7 @@ static int p80211wext_set_encodeext(stru
+ break;
+ }
+ msg.msgcode = DIDmsg_dot11req_mibset;
+- result = p80211req_dorequest(wlandev, (u8 *) & msg);
++ result = p80211req_dorequest(wlandev, (u8 *) &msg);
+ pr_debug("result (%d)\n", result);
+ }
+ return result;
+@@ -1752,7 +1753,7 @@ struct iw_handler_def p80211wext_handler
+ .get_wireless_stats = p80211wext_get_wireless_stats
+ };
+
+-int p80211wext_event_associated(wlandevice_t * wlandev, int assoc)
++int p80211wext_event_associated(wlandevice_t *wlandev, int assoc)
+ {
+ union iwreq_data data;
+
+--- a/drivers/staging/wlan-ng/prism2fw.c
++++ b/drivers/staging/wlan-ng/prism2fw.c
+@@ -265,7 +265,7 @@ int prism2_fwapply(const struct ihex_bin
+ /* Build the PDA we're going to use. */
+ if (read_cardpda(&pda, wlandev)) {
+ printk(KERN_ERR "load_cardpda failed, exiting.\n");
+- return (1);
++ return 1;
+ }
+
+ /* read the card's PRI-SUP */
+@@ -287,9 +287,8 @@ int prism2_fwapply(const struct ihex_bin
+
+ /* DIDmsg_dot11req_mibget */
+ prism2mgmt_mibset_mibget(wlandev, &getmsg);
+- if (getmsg.resultcode.data != P80211ENUM_resultcode_success) {
++ if (getmsg.resultcode.data != P80211ENUM_resultcode_success)
+ printk(KERN_ERR "Couldn't fetch PRI-SUP info\n");
+- }
+
+ /* Already in host order */
+ priid.role = *data++;
+@@ -302,19 +301,19 @@ int prism2_fwapply(const struct ihex_bin
+ result = read_fwfile(rfptr);
+ if (result) {
+ printk(KERN_ERR "Failed to read the data exiting.\n");
+- return (1);
++ return 1;
+ }
+
+ result = validate_identity();
+
+ if (result) {
+ printk(KERN_ERR "Incompatible firmware image.\n");
+- return (1);
++ return 1;
+ }
+
+ if (startaddr == 0x00000000) {
+ printk(KERN_ERR "Can't RAM download a Flash image!\n");
+- return (1);
++ return 1;
+ }
+
+ /* Make the image chunks */
+@@ -324,20 +323,20 @@ int prism2_fwapply(const struct ihex_bin
+ result = plugimage(fchunk, nfchunks, s3plug, ns3plug, &pda);
+ if (result) {
+ printk(KERN_ERR "Failed to plug data.\n");
+- return (1);
++ return 1;
+ }
+
+ /* Insert any CRCs */
+ if (crcimage(fchunk, nfchunks, s3crc, ns3crc)) {
+ printk(KERN_ERR "Failed to insert all CRCs\n");
+- return (1);
++ return 1;
+ }
+
+ /* Write the image */
+ result = writeimage(wlandev, fchunk, nfchunks);
+ if (result) {
+ printk(KERN_ERR "Failed to ramwrite image data.\n");
+- return (1);
++ return 1;
+ }
+
+ /* clear any allocated memory */
+@@ -435,9 +434,8 @@ void free_chunks(imgchunk_t *fchunk, uns
+ {
+ int i;
+ for (i = 0; i < *nfchunks; i++) {
+- if (fchunk[i].data != NULL) {
++ if (fchunk[i].data != NULL)
+ kfree(fchunk[i].data);
+- }
+ }
+ *nfchunks = 0;
+ memset(fchunk, 0, sizeof(*fchunk));
+@@ -532,7 +530,7 @@ int mkimage(imgchunk_t *clist, unsigned
+ if (clist[i].data == NULL) {
+ printk(KERN_ERR
+ "failed to allocate image space, exitting.\n");
+- return (1);
++ return 1;
+ }
+ memset(clist[i].data, 0, clist[i].len);
+ pr_debug("chunk[%d]: addr=0x%06x len=%d\n",
+@@ -546,15 +544,14 @@ int mkimage(imgchunk_t *clist, unsigned
+ for (j = 0; j < *ccnt; j++) {
+ cstart = clist[j].addr;
+ cend = cstart + clist[j].len - 1;
+- if (s3start >= cstart && s3end <= cend) {
++ if (s3start >= cstart && s3end <= cend)
+ break;
+- }
+ }
+ if (((unsigned int)j) >= (*ccnt)) {
+ printk(KERN_ERR
+ "s3rec(a=0x%06x,l=%d), no chunk match, exiting.\n",
+ s3start, s3data[i].len);
+- return (1);
++ return 1;
+ }
+ coffset = s3start - cstart;
+ memcpy(clist[j].data + coffset, s3data[i].data, s3data[i].len);
+@@ -587,7 +584,7 @@ int mkpdrlist(pda_t *pda)
+ curroff = 0;
+ while (curroff < (HFA384x_PDA_LEN_MAX / 2) &&
+ le16_to_cpu(pda16[curroff + 1]) != HFA384x_PDR_END_OF_PDA) {
+- pda->rec[pda->nrec] = (hfa384x_pdrec_t *) & (pda16[curroff]);
++ pda->rec[pda->nrec] = (hfa384x_pdrec_t *) &(pda16[curroff]);
+
+ if (le16_to_cpu(pda->rec[pda->nrec]->code) == HFA384x_PDR_NICID) {
+ memcpy(&nicid, &pda->rec[pda->nrec]->data.nicid,
+@@ -624,10 +621,10 @@ int mkpdrlist(pda_t *pda)
+ printk(KERN_ERR
+ "no end record found or invalid lengths in "
+ "PDR data, exiting. %x %d\n", curroff, pda->nrec);
+- return (1);
++ return 1;
+ }
+ if (le16_to_cpu(pda16[curroff + 1]) == HFA384x_PDR_END_OF_PDA) {
+- pda->rec[pda->nrec] = (hfa384x_pdrec_t *) & (pda16[curroff]);
++ pda->rec[pda->nrec] = (hfa384x_pdrec_t *) &(pda16[curroff]);
+ (pda->nrec)++;
+ }
+ return result;
+@@ -870,7 +867,7 @@ int read_fwfile(const struct ihex_binrec
+ ptr16 = (u16 *) record->data;
+
+ /* parse what was an S3 srec and put it in the right array */
+- switch(addr) {
++ switch (addr) {
+ case S3ADDR_START:
+ startaddr = *ptr32;
+ pr_debug(" S7 start addr, record=%d "
+@@ -891,7 +888,7 @@ int read_fwfile(const struct ihex_binrec
+ s3plug[ns3plug].len);
+
+ ns3plug++;
+- if ( ns3plug == S3PLUG_MAX ) {
++ if (ns3plug == S3PLUG_MAX) {
+ printk(KERN_ERR "S3 plugrec limit reached - aborting\n");
+ return 1;
+ }
+@@ -908,7 +905,7 @@ int read_fwfile(const struct ihex_binrec
+ s3crc[ns3crc].len,
+ s3crc[ns3crc].dowrite);
+ ns3crc++;
+- if ( ns3crc == S3CRC_MAX ) {
++ if (ns3crc == S3CRC_MAX) {
+ printk(KERN_ERR "S3 crcrec limit reached - aborting\n");
+ return 1;
+ }
+@@ -922,12 +919,12 @@ int read_fwfile(const struct ihex_binrec
+ rcnt,
+ s3info[ns3info].len,
+ s3info[ns3info].type);
+- if ( ((s3info[ns3info].len - 1) * sizeof(u16)) > sizeof(s3info[ns3info].info) ) {
++ if (((s3info[ns3info].len - 1) * sizeof(u16)) > sizeof(s3info[ns3info].info)) {
+ printk(KERN_ERR " S3 inforec length too long - aborting\n");
+ return 1;
+ }
+
+- tmpinfo = (u16*)&(s3info[ns3info].info.version);
++ tmpinfo = (u16 *)&(s3info[ns3info].info.version);
+ pr_debug(" info=");
+ for (i = 0; i < s3info[ns3info].len - 1; i++) {
+ tmpinfo[i] = *(ptr16 + 2 + i);
+@@ -936,7 +933,7 @@ int read_fwfile(const struct ihex_binrec
+ pr_debug("\n");
+
+ ns3info++;
+- if ( ns3info == S3INFO_MAX ) {
++ if (ns3info == S3INFO_MAX) {
+ printk(KERN_ERR "S3 inforec limit reached - aborting\n");
+ return 1;
+ }
+@@ -946,7 +943,7 @@ int read_fwfile(const struct ihex_binrec
+ s3data[ns3data].len = len;
+ s3data[ns3data].data = (uint8_t *) record->data;
+ ns3data++;
+- if ( ns3data == S3DATA_MAX ) {
++ if (ns3data == S3DATA_MAX) {
+ printk(KERN_ERR "S3 datarec limit reached - aborting\n");
+ return 1;
+ }
+@@ -1024,7 +1021,7 @@ int writeimage(wlandevice_t *wlandev, im
+ rstatemsg.enable.data = P80211ENUM_truth_true;
+ rstatemsg.exeaddr.data = startaddr;
+
+- msgp = (p80211msg_t *) & rstatemsg;
++ msgp = (p80211msg_t *) &rstatemsg;
+ result = prism2mgmt_ramdl_state(wlandev, msgp);
+ if (result) {
+ printk(KERN_ERR
+@@ -1064,7 +1061,7 @@ int writeimage(wlandevice_t *wlandev, im
+ ("Sending xxxdl_write message addr=%06x len=%d.\n",
+ currdaddr, currlen);
+
+- msgp = (p80211msg_t *) & rwritemsg;
++ msgp = (p80211msg_t *) &rwritemsg;
+ result = prism2mgmt_ramdl_write(wlandev, msgp);
+
+ /* Check the results */
+@@ -1091,7 +1088,7 @@ int writeimage(wlandevice_t *wlandev, im
+ rstatemsg.enable.data = P80211ENUM_truth_false;
+ rstatemsg.exeaddr.data = 0;
+
+- msgp = (p80211msg_t *) & rstatemsg;
++ msgp = (p80211msg_t *) &rstatemsg;
+ result = prism2mgmt_ramdl_state(wlandev, msgp);
+ if (result) {
+ printk(KERN_ERR
+@@ -1162,7 +1159,7 @@ int validate_identity(void)
+ /* SEC compat range */
+ if ((s3info[i].info.compat.role == 1) &&
+ (s3info[i].info.compat.id == 4)) {
+-
++ /* FIXME: isn't something missing here? */
+ }
+
+ break;
+@@ -1197,8 +1194,9 @@ int validate_identity(void)
+ pr_debug("Unknown inforec type %d\n", s3info[i].type);
+ }
+ }
+- // walk through
++ /* walk through */
+
+- if (trump && (result != 2)) result = 0;
++ if (trump && (result != 2))
++ result = 0;
+ return result;
+ }
+--- a/drivers/staging/wlan-ng/prism2mgmt.c
++++ b/drivers/staging/wlan-ng/prism2mgmt.c
+@@ -541,7 +541,7 @@ int prism2mgmt_start(wlandevice_t *wland
+ /*** STATION ***/
+ /* Set the REQUIRED config items */
+ /* SSID */
+- pstr = (p80211pstrd_t *) & (msg->ssid.data);
++ pstr = (p80211pstrd_t *) &(msg->ssid.data);
+ prism2mgmt_pstr2bytestr(p2bytestr, pstr);
+ result = hfa384x_drvr_setconfig(hw, HFA384x_RID_CNFOWNSSID,
+ bytebuf, HFA384x_RID_CNFOWNSSID_LEN);
+@@ -1034,7 +1034,7 @@ int prism2mgmt_autojoin(wlandevice_t *wl
+
+ /* Set the ssid */
+ memset(bytebuf, 0, 256);
+- pstr = (p80211pstrd_t *) & (msg->ssid.data);
++ pstr = (p80211pstrd_t *) &(msg->ssid.data);
+ prism2mgmt_pstr2bytestr(p2bytestr, pstr);
+ result = hfa384x_drvr_setconfig(hw, HFA384x_RID_CNFDESIREDSSID,
+ bytebuf,
+--- a/drivers/staging/wlan-ng/prism2mgmt.h
++++ b/drivers/staging/wlan-ng/prism2mgmt.h
+@@ -63,43 +63,43 @@
+ extern int prism2_reset_holdtime;
+ extern int prism2_reset_settletime;
+
+-u32 prism2sta_ifstate(wlandevice_t * wlandev, u32 ifstate);
++u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate);
+
+-void prism2sta_ev_info(wlandevice_t * wlandev, hfa384x_InfFrame_t * inf);
+-void prism2sta_ev_txexc(wlandevice_t * wlandev, u16 status);
+-void prism2sta_ev_tx(wlandevice_t * wlandev, u16 status);
+-void prism2sta_ev_rx(wlandevice_t * wlandev, struct sk_buff *skb);
+-void prism2sta_ev_alloc(wlandevice_t * wlandev);
+-
+-int prism2mgmt_mibset_mibget(wlandevice_t * wlandev, void *msgp);
+-int prism2mgmt_scan(wlandevice_t * wlandev, void *msgp);
+-int prism2mgmt_scan_results(wlandevice_t * wlandev, void *msgp);
+-int prism2mgmt_start(wlandevice_t * wlandev, void *msgp);
+-int prism2mgmt_wlansniff(wlandevice_t * wlandev, void *msgp);
+-int prism2mgmt_readpda(wlandevice_t * wlandev, void *msgp);
+-int prism2mgmt_ramdl_state(wlandevice_t * wlandev, void *msgp);
+-int prism2mgmt_ramdl_write(wlandevice_t * wlandev, void *msgp);
+-int prism2mgmt_flashdl_state(wlandevice_t * wlandev, void *msgp);
+-int prism2mgmt_flashdl_write(wlandevice_t * wlandev, void *msgp);
+-int prism2mgmt_autojoin(wlandevice_t * wlandev, void *msgp);
++void prism2sta_ev_info(wlandevice_t *wlandev, hfa384x_InfFrame_t *inf);
++void prism2sta_ev_txexc(wlandevice_t *wlandev, u16 status);
++void prism2sta_ev_tx(wlandevice_t *wlandev, u16 status);
++void prism2sta_ev_rx(wlandevice_t *wlandev, struct sk_buff *skb);
++void prism2sta_ev_alloc(wlandevice_t *wlandev);
++
++int prism2mgmt_mibset_mibget(wlandevice_t *wlandev, void *msgp);
++int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp);
++int prism2mgmt_scan_results(wlandevice_t *wlandev, void *msgp);
++int prism2mgmt_start(wlandevice_t *wlandev, void *msgp);
++int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp);
++int prism2mgmt_readpda(wlandevice_t *wlandev, void *msgp);
++int prism2mgmt_ramdl_state(wlandevice_t *wlandev, void *msgp);
++int prism2mgmt_ramdl_write(wlandevice_t *wlandev, void *msgp);
++int prism2mgmt_flashdl_state(wlandevice_t *wlandev, void *msgp);
++int prism2mgmt_flashdl_write(wlandevice_t *wlandev, void *msgp);
++int prism2mgmt_autojoin(wlandevice_t *wlandev, void *msgp);
+
+ /*---------------------------------------------------------------
+ * conversion functions going between wlan message data types and
+ * Prism2 data types
+ ---------------------------------------------------------------*/
+ /* byte area conversion functions*/
+-void prism2mgmt_pstr2bytearea(u8 * bytearea, p80211pstrd_t * pstr);
+-void prism2mgmt_bytearea2pstr(u8 * bytearea, p80211pstrd_t * pstr, int len);
++void prism2mgmt_pstr2bytearea(u8 *bytearea, p80211pstrd_t *pstr);
++void prism2mgmt_bytearea2pstr(u8 *bytearea, p80211pstrd_t *pstr, int len);
+
+ /* byte string conversion functions*/
+-void prism2mgmt_pstr2bytestr(hfa384x_bytestr_t * bytestr, p80211pstrd_t * pstr);
+-void prism2mgmt_bytestr2pstr(hfa384x_bytestr_t * bytestr, p80211pstrd_t * pstr);
++void prism2mgmt_pstr2bytestr(hfa384x_bytestr_t *bytestr, p80211pstrd_t *pstr);
++void prism2mgmt_bytestr2pstr(hfa384x_bytestr_t *bytestr, p80211pstrd_t *pstr);
+
+ /* functions to convert Group Addresses */
+-void prism2mgmt_get_grpaddr(u32 did, p80211pstrd_t * pstr, hfa384x_t * priv);
++void prism2mgmt_get_grpaddr(u32 did, p80211pstrd_t *pstr, hfa384x_t *priv);
+ int prism2mgmt_set_grpaddr(u32 did,
+- u8 * prism2buf, p80211pstrd_t * pstr,
+- hfa384x_t * priv);
++ u8 *prism2buf, p80211pstrd_t *pstr,
++ hfa384x_t *priv);
+ int prism2mgmt_get_grpaddr_index(u32 did);
+
+ void prism2sta_processing_defer(struct work_struct *data);
+--- a/drivers/staging/wlan-ng/prism2mib.c
++++ b/drivers/staging/wlan-ng/prism2mib.c
+@@ -114,7 +114,7 @@ static int prism2mib_flag(mibrec_t *mib,
+
+ static int prism2mib_wepdefaultkey(mibrec_t *mib,
+ int isget,
+- wlandevice_t * wlandev,
++ wlandevice_t *wlandev,
+ hfa384x_t *hw,
+ p80211msg_dot11req_mibset_t *msg,
+ void *data);
+@@ -726,7 +726,7 @@ static int prism2mib_priv(mibrec_t *mib,
+ if (isget) {
+ hfa384x_drvr_getconfig(hw,
+ HFA384x_RID_CNFWPADATA,
+- (u8 *) & wpa,
++ (u8 *) &wpa,
+ sizeof(wpa));
+ pstr->len = le16_to_cpu(wpa.datalen);
+ memcpy(pstr->data, wpa.data, pstr->len);
+@@ -737,7 +737,7 @@ static int prism2mib_priv(mibrec_t *mib,
+ result =
+ hfa384x_drvr_setconfig(hw,
+ HFA384x_RID_CNFWPADATA,
+- (u8 *) & wpa,
++ (u8 *) &wpa,
+ sizeof(wpa));
+ }
+ break;
+--- a/drivers/staging/wlan-ng/prism2sta.c
++++ b/drivers/staging/wlan-ng/prism2sta.c
+@@ -1023,13 +1023,13 @@ static void prism2sta_inf_tallies(wlande
+
+ cnt = sizeof(hfa384x_CommTallies32_t) / sizeof(u32);
+ if (inf->framelen > 22) {
+- dst = (u32 *) & hw->tallies;
+- src32 = (u32 *) & inf->info.commtallies32;
++ dst = (u32 *) &hw->tallies;
++ src32 = (u32 *) &inf->info.commtallies32;
+ for (i = 0; i < cnt; i++, dst++, src32++)
+ *dst += le32_to_cpu(*src32);
+ } else {
+- dst = (u32 *) & hw->tallies;
+- src16 = (u16 *) & inf->info.commtallies16;
++ dst = (u32 *) &hw->tallies;
++ src16 = (u16 *) &inf->info.commtallies16;
+ for (i = 0; i < cnt; i++, dst++, src16++)
+ *dst += le16_to_cpu(*src16);
+ }
+@@ -1280,7 +1280,7 @@ void prism2sta_processing_defer(struct w
+ HFA384x_RID_CURRENTSSID, result);
+ goto failed;
+ }
+- prism2mgmt_bytestr2pstr((hfa384x_bytestr_t *) & ssid,
++ prism2mgmt_bytestr2pstr((hfa384x_bytestr_t *) &ssid,
+ (p80211pstrd_t *) &
+ wlandev->ssid);
+
+@@ -1368,8 +1368,8 @@ void prism2sta_processing_defer(struct w
+ HFA384x_RID_CURRENTSSID, result);
+ goto failed;
+ }
+- prism2mgmt_bytestr2pstr((hfa384x_bytestr_t *) & ssid,
+- (p80211pstrd_t *) & wlandev->ssid);
++ prism2mgmt_bytestr2pstr((hfa384x_bytestr_t *) &ssid,
++ (p80211pstrd_t *) &wlandev->ssid);
+
+ hw->link_status = HFA384x_LINK_CONNECTED;
+ netif_carrier_on(wlandev->netdev);
+@@ -2028,8 +2028,8 @@ void prism2sta_commsqual_defer(struct wo
+ HFA384x_RID_CURRENTSSID, result);
+ goto done;
+ }
+- prism2mgmt_bytestr2pstr((hfa384x_bytestr_t *) & ssid,
+- (p80211pstrd_t *) & wlandev->ssid);
++ prism2mgmt_bytestr2pstr((hfa384x_bytestr_t *) &ssid,
++ (p80211pstrd_t *) &wlandev->ssid);
+
+ /* Reschedule timer */
+ mod_timer(&hw->commsqual_timer, jiffies + HZ);
diff --git a/usb/usb-ehci-omap-update-todo-list-in-comments.patch b/usb/usb-ehci-omap-update-todo-list-in-comments.patch
new file mode 100644
index 00000000000000..ad3403cd681033
--- /dev/null
+++ b/usb/usb-ehci-omap-update-todo-list-in-comments.patch
@@ -0,0 +1,32 @@
+From gadiyar@ti.com Wed Feb 17 15:58:37 2010
+From: Anand Gadiyar <gadiyar@ti.com>
+Date: Fri, 12 Feb 2010 17:49:00 +0530
+Subject: USB: ehci: omap: Update TODO list in comments
+Cc: Anand Gadiyar <gadiyar@ti.com>
+Message-ID: <1265977140-9701-3-git-send-email-gadiyar@ti.com>
+
+
+DPLL5 programming was moved out of this file before submission.
+Update the TODO list in the comments to reflect this
+
+Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/ehci-omap.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/drivers/usb/host/ehci-omap.c
++++ b/drivers/usb/host/ehci-omap.c
+@@ -26,10 +26,9 @@
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+- * TODO (last updated Feb 23rd, 2009):
++ * TODO (last updated Feb 12, 2010):
+ * - add kernel-doc
+ * - enable AUTOIDLE
+- * - move DPLL5 programming to clock fw
+ * - add suspend/resume
+ * - move workarounds to board-files
+ */
diff --git a/usb/usb-ehci-omap-use-default-interrupt-threshold.patch b/usb/usb-ehci-omap-use-default-interrupt-threshold.patch
new file mode 100644
index 00000000000000..1b8a8ea3ae45e7
--- /dev/null
+++ b/usb/usb-ehci-omap-use-default-interrupt-threshold.patch
@@ -0,0 +1,32 @@
+From gadiyar@ti.com Wed Feb 17 15:58:21 2010
+From: Anand Gadiyar <gadiyar@ti.com>
+Date: Fri, 12 Feb 2010 17:48:59 +0530
+Subject: USB: ehci: omap: use default interrupt threshold
+Cc: Anand Gadiyar <gadiyar@ti.com>
+Message-ID: <1265977140-9701-2-git-send-email-gadiyar@ti.com>
+
+
+The current driver reduces the interrupt threshold to 1 microframe.
+This was an accidental change and is not really required.
+The default of 8 microframes will do just fine. So change it back.
+
+Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/ehci-omap.c | 4 ----
+ 1 file changed, 4 deletions(-)
+
+--- a/drivers/usb/host/ehci-omap.c
++++ b/drivers/usb/host/ehci-omap.c
+@@ -651,10 +651,6 @@ static int ehci_hcd_omap_probe(struct pl
+ /* cache this readonly data; minimize chip reads */
+ omap->ehci->hcs_params = readl(&omap->ehci->caps->hcs_params);
+
+- /* SET 1 micro-frame Interrupt interval */
+- writel(readl(&omap->ehci->regs->command) | (1 << 16),
+- &omap->ehci->regs->command);
+-
+ ret = usb_add_hcd(hcd, irq, IRQF_DISABLED | IRQF_SHARED);
+ if (ret) {
+ dev_dbg(&pdev->dev, "failed to add hcd with err %d\n", ret);
diff --git a/usb/usb-ohci-da8xx-omap-l1x-glue-layer.patch b/usb/usb-ohci-da8xx-omap-l1x-glue-layer.patch
new file mode 100644
index 00000000000000..97150959e11251
--- /dev/null
+++ b/usb/usb-ohci-da8xx-omap-l1x-glue-layer.patch
@@ -0,0 +1,509 @@
+From sshtylyov@ru.mvista.com Wed Feb 17 16:00:08 2010
+From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
+Date: Fri, 12 Feb 2010 23:52:34 +0400
+Subject: USB: OHCI: DA8xx/OMAP-L1x glue layer
+To: linux-usb@vger.kernel.org, gregkh@suse.de
+Cc: davinci-linux-open-source@linux.davincidsp.com
+Message-ID: <201002122252.34541.sshtylyov@ru.mvista.com>
+
+Texas Instruments DA8xx/OMAP-L1x OHCI glue layer.
+
+This OHCI implementation is not without quirks: there's only one physical port
+despite the root hub reporting two; the port's power control and over-current
+status bits are not connected to any pins, however, at least on the DA830 EVM
+board, those signals are connected via GPIO, thus the provision was made for
+overriding the OHCI port power and over-current bits at the board level...
+
+Signed-off-by: Mikhail Cherkashin <mcherkashin@ru.mvista.com>
+Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/Kconfig | 1
+ drivers/usb/host/ohci-da8xx.c | 456 ++++++++++++++++++++++++++++++++++++++++++
+ drivers/usb/host/ohci-hcd.c | 5
+ 3 files changed, 462 insertions(+)
+
+--- a/drivers/usb/Kconfig
++++ b/drivers/usb/Kconfig
+@@ -40,6 +40,7 @@ config USB_ARCH_HAS_OHCI
+ default y if ARCH_PNX4008 && I2C
+ default y if MFD_TC6393XB
+ default y if ARCH_W90X900
++ default y if ARCH_DAVINCI_DA8XX
+ # PPC:
+ default y if STB03xxx
+ default y if PPC_MPC52xx
+--- /dev/null
++++ b/drivers/usb/host/ohci-da8xx.c
+@@ -0,0 +1,456 @@
++/*
++ * OHCI HCD (Host Controller Driver) for USB.
++ *
++ * TI DA8xx (OMAP-L1x) Bus Glue
++ *
++ * Derived from: ohci-omap.c and ohci-s3c2410.c
++ * Copyright (C) 2008-2009 MontaVista Software, Inc. <source@mvista.com>
++ *
++ * This file is licensed under the terms of the GNU General Public License
++ * version 2. This program is licensed "as is" without any warranty of any
++ * kind, whether express or implied.
++ */
++
++#include <linux/interrupt.h>
++#include <linux/jiffies.h>
++#include <linux/platform_device.h>
++#include <linux/clk.h>
++
++#include <mach/da8xx.h>
++#include <mach/usb.h>
++
++#ifndef CONFIG_ARCH_DAVINCI_DA8XX
++#error "This file is DA8xx bus glue. Define CONFIG_ARCH_DAVINCI_DA8XX."
++#endif
++
++#define CFGCHIP2 DA8XX_SYSCFG_VIRT(DA8XX_CFGCHIP2_REG)
++
++static struct clk *usb11_clk;
++static struct clk *usb20_clk;
++
++/* Over-current indicator change bitmask */
++static volatile u16 ocic_mask;
++
++static void ohci_da8xx_clock(int on)
++{
++ u32 cfgchip2;
++
++ cfgchip2 = __raw_readl(CFGCHIP2);
++ if (on) {
++ clk_enable(usb11_clk);
++
++ /*
++ * If USB 1.1 reference clock is sourced from USB 2.0 PHY, we
++ * need to enable the USB 2.0 module clocking, start its PHY,
++ * and not allow it to stop the clock during USB 2.0 suspend.
++ */
++ if (!(cfgchip2 & CFGCHIP2_USB1PHYCLKMUX)) {
++ clk_enable(usb20_clk);
++
++ cfgchip2 &= ~(CFGCHIP2_RESET | CFGCHIP2_PHYPWRDN);
++ cfgchip2 |= CFGCHIP2_PHY_PLLON;
++ __raw_writel(cfgchip2, CFGCHIP2);
++
++ pr_info("Waiting for USB PHY clock good...\n");
++ while (!(__raw_readl(CFGCHIP2) & CFGCHIP2_PHYCLKGD))
++ cpu_relax();
++ }
++
++ /* Enable USB 1.1 PHY */
++ cfgchip2 |= CFGCHIP2_USB1SUSPENDM;
++ } else {
++ clk_disable(usb11_clk);
++ if (!(cfgchip2 & CFGCHIP2_USB1PHYCLKMUX))
++ clk_disable(usb20_clk);
++
++ /* Disable USB 1.1 PHY */
++ cfgchip2 &= ~CFGCHIP2_USB1SUSPENDM;
++ }
++ __raw_writel(cfgchip2, CFGCHIP2);
++}
++
++/*
++ * Handle the port over-current indicator change.
++ */
++static void ohci_da8xx_ocic_handler(struct da8xx_ohci_root_hub *hub,
++ unsigned port)
++{
++ ocic_mask |= 1 << port;
++
++ /* Once over-current is detected, the port needs to be powered down */
++ if (hub->get_oci(port) > 0)
++ hub->set_power(port, 0);
++}
++
++static int ohci_da8xx_init(struct usb_hcd *hcd)
++{
++ struct device *dev = hcd->self.controller;
++ struct da8xx_ohci_root_hub *hub = dev->platform_data;
++ struct ohci_hcd *ohci = hcd_to_ohci(hcd);
++ int result;
++ u32 rh_a;
++
++ dev_dbg(dev, "starting USB controller\n");
++
++ ohci_da8xx_clock(1);
++
++ /*
++ * DA8xx only have 1 port connected to the pins but the HC root hub
++ * register A reports 2 ports, thus we'll have to override it...
++ */
++ ohci->num_ports = 1;
++
++ result = ohci_init(ohci);
++ if (result < 0)
++ return result;
++
++ /*
++ * Since we're providing a board-specific root hub port power control
++ * and over-current reporting, we have to override the HC root hub A
++ * register's default value, so that ohci_hub_control() could return
++ * the correct hub descriptor...
++ */
++ rh_a = ohci_readl(ohci, &ohci->regs->roothub.a);
++ if (hub->set_power) {
++ rh_a &= ~RH_A_NPS;
++ rh_a |= RH_A_PSM;
++ }
++ if (hub->get_oci) {
++ rh_a &= ~RH_A_NOCP;
++ rh_a |= RH_A_OCPM;
++ }
++ rh_a &= ~RH_A_POTPGT;
++ rh_a |= hub->potpgt << 24;
++ ohci_writel(ohci, rh_a, &ohci->regs->roothub.a);
++
++ return result;
++}
++
++static void ohci_da8xx_stop(struct usb_hcd *hcd)
++{
++ ohci_stop(hcd);
++ ohci_da8xx_clock(0);
++}
++
++static int ohci_da8xx_start(struct usb_hcd *hcd)
++{
++ struct ohci_hcd *ohci = hcd_to_ohci(hcd);
++ int result;
++
++ result = ohci_run(ohci);
++ if (result < 0)
++ ohci_da8xx_stop(hcd);
++
++ return result;
++}
++
++/*
++ * Update the status data from the hub with the over-current indicator change.
++ */
++static int ohci_da8xx_hub_status_data(struct usb_hcd *hcd, char *buf)
++{
++ int length = ohci_hub_status_data(hcd, buf);
++
++ /* See if we have OCIC bit set on port 1 */
++ if (ocic_mask & (1 << 1)) {
++ dev_dbg(hcd->self.controller, "over-current indicator change "
++ "on port 1\n");
++
++ if (!length)
++ length = 1;
++
++ buf[0] |= 1 << 1;
++ }
++ return length;
++}
++
++/*
++ * Look at the control requests to the root hub and see if we need to override.
++ */
++static int ohci_da8xx_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
++ u16 wIndex, char *buf, u16 wLength)
++{
++ struct device *dev = hcd->self.controller;
++ struct da8xx_ohci_root_hub *hub = dev->platform_data;
++ int temp;
++
++ switch (typeReq) {
++ case GetPortStatus:
++ /* Check the port number */
++ if (wIndex != 1)
++ break;
++
++ dev_dbg(dev, "GetPortStatus(%u)\n", wIndex);
++
++ temp = roothub_portstatus(hcd_to_ohci(hcd), wIndex - 1);
++
++ /* The port power status (PPS) bit defaults to 1 */
++ if (hub->get_power && hub->get_power(wIndex) == 0)
++ temp &= ~RH_PS_PPS;
++
++ /* The port over-current indicator (POCI) bit is always 0 */
++ if (hub->get_oci && hub->get_oci(wIndex) > 0)
++ temp |= RH_PS_POCI;
++
++ /* The over-current indicator change (OCIC) bit is 0 too */
++ if (ocic_mask & (1 << wIndex))
++ temp |= RH_PS_OCIC;
++
++ put_unaligned(cpu_to_le32(temp), (__le32 *)buf);
++ return 0;
++ case SetPortFeature:
++ temp = 1;
++ goto check_port;
++ case ClearPortFeature:
++ temp = 0;
++
++check_port:
++ /* Check the port number */
++ if (wIndex != 1)
++ break;
++
++ switch (wValue) {
++ case USB_PORT_FEAT_POWER:
++ dev_dbg(dev, "%sPortFeature(%u): %s\n",
++ temp ? "Set" : "Clear", wIndex, "POWER");
++
++ if (!hub->set_power)
++ return -EPIPE;
++
++ return hub->set_power(wIndex, temp) ? -EPIPE : 0;
++ case USB_PORT_FEAT_C_OVER_CURRENT:
++ dev_dbg(dev, "%sPortFeature(%u): %s\n",
++ temp ? "Set" : "Clear", wIndex,
++ "C_OVER_CURRENT");
++
++ if (temp)
++ ocic_mask |= 1 << wIndex;
++ else
++ ocic_mask &= ~(1 << wIndex);
++ return 0;
++ }
++ }
++
++ return ohci_hub_control(hcd, typeReq, wValue, wIndex, buf, wLength);
++}
++
++static const struct hc_driver ohci_da8xx_hc_driver = {
++ .description = hcd_name,
++ .product_desc = "DA8xx OHCI",
++ .hcd_priv_size = sizeof(struct ohci_hcd),
++
++ /*
++ * generic hardware linkage
++ */
++ .irq = ohci_irq,
++ .flags = HCD_USB11 | HCD_MEMORY,
++
++ /*
++ * basic lifecycle operations
++ */
++ .reset = ohci_da8xx_init,
++ .start = ohci_da8xx_start,
++ .stop = ohci_da8xx_stop,
++ .shutdown = ohci_shutdown,
++
++ /*
++ * managing i/o requests and associated device resources
++ */
++ .urb_enqueue = ohci_urb_enqueue,
++ .urb_dequeue = ohci_urb_dequeue,
++ .endpoint_disable = ohci_endpoint_disable,
++
++ /*
++ * scheduling support
++ */
++ .get_frame_number = ohci_get_frame,
++
++ /*
++ * root hub support
++ */
++ .hub_status_data = ohci_da8xx_hub_status_data,
++ .hub_control = ohci_da8xx_hub_control,
++
++#ifdef CONFIG_PM
++ .bus_suspend = ohci_bus_suspend,
++ .bus_resume = ohci_bus_resume,
++#endif
++ .start_port_reset = ohci_start_port_reset,
++};
++
++/*-------------------------------------------------------------------------*/
++
++
++/**
++ * usb_hcd_da8xx_probe - initialize DA8xx-based HCDs
++ * Context: !in_interrupt()
++ *
++ * Allocates basic resources for this USB host controller, and
++ * then invokes the start() method for the HCD associated with it
++ * through the hotplug entry's driver_data.
++ */
++static int usb_hcd_da8xx_probe(const struct hc_driver *driver,
++ struct platform_device *pdev)
++{
++ struct da8xx_ohci_root_hub *hub = pdev->dev.platform_data;
++ struct usb_hcd *hcd;
++ struct resource *mem;
++ int error, irq;
++
++ if (hub == NULL)
++ return -ENODEV;
++
++ usb11_clk = clk_get(&pdev->dev, "usb11");
++ if (IS_ERR(usb11_clk))
++ return PTR_ERR(usb11_clk);
++
++ usb20_clk = clk_get(&pdev->dev, "usb20");
++ if (IS_ERR(usb20_clk)) {
++ error = PTR_ERR(usb20_clk);
++ goto err0;
++ }
++
++ hcd = usb_create_hcd(driver, &pdev->dev, dev_name(&pdev->dev));
++ if (!hcd) {
++ error = -ENOMEM;
++ goto err1;
++ }
++
++ mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++ if (!mem) {
++ error = -ENODEV;
++ goto err2;
++ }
++ hcd->rsrc_start = mem->start;
++ hcd->rsrc_len = mem->end - mem->start + 1;
++
++ if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
++ dev_dbg(&pdev->dev, "request_mem_region failed\n");
++ error = -EBUSY;
++ goto err2;
++ }
++
++ hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len);
++ if (!hcd->regs) {
++ dev_err(&pdev->dev, "ioremap failed\n");
++ error = -ENOMEM;
++ goto err3;
++ }
++
++ ohci_hcd_init(hcd_to_ohci(hcd));
++
++ irq = platform_get_irq(pdev, 0);
++ if (irq < 0) {
++ error = -ENODEV;
++ goto err4;
++ }
++ error = usb_add_hcd(hcd, irq, IRQF_DISABLED);
++ if (error)
++ goto err4;
++
++ if (hub->ocic_notify) {
++ error = hub->ocic_notify(ohci_da8xx_ocic_handler);
++ if (!error)
++ return 0;
++ }
++
++ usb_remove_hcd(hcd);
++err4:
++ iounmap(hcd->regs);
++err3:
++ release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
++err2:
++ usb_put_hcd(hcd);
++err1:
++ clk_put(usb20_clk);
++err0:
++ clk_put(usb11_clk);
++ return error;
++}
++
++/**
++ * usb_hcd_da8xx_remove - shutdown processing for DA8xx-based HCDs
++ * @dev: USB Host Controller being removed
++ * Context: !in_interrupt()
++ *
++ * Reverses the effect of usb_hcd_da8xx_probe(), first invoking
++ * the HCD's stop() method. It is always called from a thread
++ * context, normally "rmmod", "apmd", or something similar.
++ */
++static inline void
++usb_hcd_da8xx_remove(struct usb_hcd *hcd, struct platform_device *pdev)
++{
++ struct da8xx_ohci_root_hub *hub = pdev->dev.platform_data;
++
++ hub->ocic_notify(NULL);
++ usb_remove_hcd(hcd);
++ iounmap(hcd->regs);
++ release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
++ usb_put_hcd(hcd);
++ clk_put(usb20_clk);
++ clk_put(usb11_clk);
++}
++
++static int ohci_hcd_da8xx_drv_probe(struct platform_device *dev)
++{
++ return usb_hcd_da8xx_probe(&ohci_da8xx_hc_driver, dev);
++}
++
++static int ohci_hcd_da8xx_drv_remove(struct platform_device *dev)
++{
++ struct usb_hcd *hcd = platform_get_drvdata(dev);
++
++ usb_hcd_da8xx_remove(hcd, dev);
++ platform_set_drvdata(dev, NULL);
++
++ return 0;
++}
++
++#ifdef CONFIG_PM
++static int ohci_da8xx_suspend(struct platform_device *dev, pm_message_t message)
++{
++ struct usb_hcd *hcd = platform_get_drvdata(dev);
++ struct ohci_hcd *ohci = hcd_to_ohci(hcd);
++
++ if (time_before(jiffies, ohci->next_statechange))
++ msleep(5);
++ ohci->next_statechange = jiffies;
++
++ ohci_da8xx_clock(0);
++ hcd->state = HC_STATE_SUSPENDED;
++ dev->dev.power.power_state = PMSG_SUSPEND;
++ return 0;
++}
++
++static int ohci_da8xx_resume(struct platform_device *dev)
++{
++ struct usb_hcd *hcd = platform_get_drvdata(dev);
++ struct ohci_hcd *ohci = hcd_to_ohci(hcd);
++
++ if (time_before(jiffies, ohci->next_statechange))
++ msleep(5);
++ ohci->next_statechange = jiffies;
++
++ ohci_da8xx_clock(1);
++ dev->dev.power.power_state = PMSG_ON;
++ usb_hcd_resume_root_hub(hcd);
++ return 0;
++}
++#endif
++
++/*
++ * Driver definition to register with platform structure.
++ */
++static struct platform_driver ohci_hcd_da8xx_driver = {
++ .probe = ohci_hcd_da8xx_drv_probe,
++ .remove = ohci_hcd_da8xx_drv_remove,
++ .shutdown = usb_hcd_platform_shutdown,
++#ifdef CONFIG_PM
++ .suspend = ohci_da8xx_suspend,
++ .resume = ohci_da8xx_resume,
++#endif
++ .driver = {
++ .owner = THIS_MODULE,
++ .name = "ohci",
++ },
++};
+--- a/drivers/usb/host/ohci-hcd.c
++++ b/drivers/usb/host/ohci-hcd.c
+@@ -1051,6 +1051,11 @@ MODULE_LICENSE ("GPL");
+ #define PLATFORM_DRIVER usb_hcd_pnx4008_driver
+ #endif
+
++#ifdef CONFIG_ARCH_DAVINCI_DA8XX
++#include "ohci-da8xx.c"
++#define PLATFORM_DRIVER ohci_hcd_da8xx_driver
++#endif
++
+ #if defined(CONFIG_CPU_SUBTYPE_SH7720) || \
+ defined(CONFIG_CPU_SUBTYPE_SH7721) || \
+ defined(CONFIG_CPU_SUBTYPE_SH7763) || \
diff --git a/usb/usb-omap-ehci-kill-2-compile-warnings.patch b/usb/usb-omap-ehci-kill-2-compile-warnings.patch
new file mode 100644
index 00000000000000..6ca4a23150cf92
--- /dev/null
+++ b/usb/usb-omap-ehci-kill-2-compile-warnings.patch
@@ -0,0 +1,32 @@
+From gadiyar@ti.com Wed Feb 17 15:57:55 2010
+From: Anand Gadiyar <gadiyar@ti.com>
+Date: Fri, 12 Feb 2010 17:54:59 +0530
+Subject: USB: omap: ehci: kill 2 compile warnings
+Cc: Anand Gadiyar <gadiyar@ti.com>
+Message-ID: <1265977499-10791-1-git-send-email-gadiyar@ti.com>
+
+
+Kill these compile warnings:
+CC [M] drivers/usb/host/ehci-hcd.o
+drivers/usb/host/ehci-dbg.c:45: warning: 'dbg_hcs_params' defined but not used
+drivers/usb/host/ehci-dbg.c:89: warning: 'dbg_hcc_params' defined but not used
+
+Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/ehci-omap.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/usb/host/ehci-omap.c
++++ b/drivers/usb/host/ehci-omap.c
+@@ -645,6 +645,9 @@ static int ehci_hcd_omap_probe(struct pl
+ omap->ehci->regs = hcd->regs
+ + HC_LENGTH(readl(&omap->ehci->caps->hc_capbase));
+
++ dbg_hcs_params(omap->ehci, "reset");
++ dbg_hcc_params(omap->ehci, "reset");
++
+ /* cache this readonly data; minimize chip reads */
+ omap->ehci->hcs_params = readl(&omap->ehci->caps->hcs_params);
+
diff --git a/usb/usb-remove-debugging-message-for-uevent-constructions.patch b/usb/usb-remove-debugging-message-for-uevent-constructions.patch
new file mode 100644
index 00000000000000..31c80c5d0cf0af
--- /dev/null
+++ b/usb/usb-remove-debugging-message-for-uevent-constructions.patch
@@ -0,0 +1,40 @@
+From stern@rowland.harvard.edu Wed Feb 17 15:32:21 2010
+From: Alan Stern <stern@rowland.harvard.edu>
+Date: Mon, 8 Feb 2010 09:45:12 -0500 (EST)
+Subject: USB: remove debugging message for uevent constructions
+To: Greg KH <greg@kroah.com>
+Cc: USB list <linux-usb@vger.kernel.org>
+Message-ID: <Pine.LNX.4.44L0.1002080943460.1809-100000@iolanthe.rowland.org>
+
+
+This patch (as1332) removes an unneeded and annoying debugging message
+announcing all USB uevent constructions.
+
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Cc: stable <stable@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/core/driver.c | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+--- a/drivers/usb/core/driver.c
++++ b/drivers/usb/core/driver.c
+@@ -710,9 +710,6 @@ static int usb_uevent(struct device *dev
+ {
+ struct usb_device *usb_dev;
+
+- /* driver is often null here; dev_dbg() would oops */
+- pr_debug("usb %s: uevent\n", dev_name(dev));
+-
+ if (is_usb_device(dev)) {
+ usb_dev = to_usb_device(dev);
+ } else if (is_usb_interface(dev)) {
+@@ -724,6 +721,7 @@ static int usb_uevent(struct device *dev
+ }
+
+ if (usb_dev->devnum < 0) {
++ /* driver is often null here; dev_dbg() would oops */
+ pr_debug("usb %s: already deleted?\n", dev_name(dev));
+ return -ENODEV;
+ }
diff --git a/usb/usb-serial-sierra-driver-adding-reset_resume-function.patch b/usb/usb-serial-sierra-driver-adding-reset_resume-function.patch
new file mode 100644
index 00000000000000..2a2662dbb72420
--- /dev/null
+++ b/usb/usb-serial-sierra-driver-adding-reset_resume-function.patch
@@ -0,0 +1,71 @@
+From epasheva@sierrawireless.com Wed Feb 17 15:54:33 2010
+From: Elina Pasheva <epasheva@sierrawireless.com>
+Date: Thu, 11 Feb 2010 18:37:40 -0800
+Subject: USB: serial: sierra driver adding reset_resume function
+To: <gregkh@suse.de>
+Cc: <epasheva@sierrawireless.com>, <rfiler@sierrawireless.com>, <linux_usb@vger.kernel.org>
+Message-ID: <1265942260.6621.12.camel@Linuxdev4-laptop>
+
+From: Elina Pasheva <epasheva@sierrawireless.com>
+
+This patch adds a new function to the sierra.c driver, sierra_reset_resume().
+This new function completes the suite of Dynamic Power Management commands
+in the sierra.c driver.
+
+Signed-off-by: Elina Pasheva <epasheva@sierrawireless.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+ drivers/usb/serial/sierra.c | 30 ++++++++++++++++++++----------
+ 1 file changed, 20 insertions(+), 10 deletions(-)
+
+--- a/drivers/usb/serial/sierra.c
++++ b/drivers/usb/serial/sierra.c
+@@ -304,16 +304,6 @@ static const struct usb_device_id id_tab
+ };
+ MODULE_DEVICE_TABLE(usb, id_table);
+
+-static struct usb_driver sierra_driver = {
+- .name = "sierra",
+- .probe = usb_serial_probe,
+- .disconnect = usb_serial_disconnect,
+- .suspend = usb_serial_suspend,
+- .resume = usb_serial_resume,
+- .id_table = id_table,
+- .no_dynamic_id = 1,
+- .supports_autosuspend = 1,
+-};
+
+ struct sierra_port_private {
+ spinlock_t lock; /* lock the structure */
+@@ -1061,11 +1051,31 @@ static int sierra_resume(struct usb_seri
+
+ return ec ? -EIO : 0;
+ }
++
++static int sierra_reset_resume(struct usb_interface *intf)
++{
++ struct usb_serial *serial = usb_get_intfdata(intf);
++ dev_err(&serial->dev->dev, "%s\n", __func__);
++ return usb_serial_resume(intf);
++}
+ #else
+ #define sierra_suspend NULL
+ #define sierra_resume NULL
++#define sierra_reset_resume NULL
+ #endif
+
++static struct usb_driver sierra_driver = {
++ .name = "sierra",
++ .probe = usb_serial_probe,
++ .disconnect = usb_serial_disconnect,
++ .suspend = usb_serial_suspend,
++ .resume = usb_serial_resume,
++ .reset_resume = sierra_reset_resume,
++ .id_table = id_table,
++ .no_dynamic_id = 1,
++ .supports_autosuspend = 1,
++};
++
+ static struct usb_serial_driver sierra_device = {
+ .driver = {
+ .owner = THIS_MODULE,
diff --git a/usb/usb-serial-sierra-driver-indat_callback-fix.patch b/usb/usb-serial-sierra-driver-indat_callback-fix.patch
new file mode 100644
index 00000000000000..d0b84b48599b3d
--- /dev/null
+++ b/usb/usb-serial-sierra-driver-indat_callback-fix.patch
@@ -0,0 +1,58 @@
+From epasheva@sierrawireless.com Wed Feb 17 15:55:21 2010
+From: Elina Pasheva <epasheva@sierrawireless.com>
+Date: Mon, 15 Feb 2010 14:50:14 -0800
+Subject: USB: serial: sierra driver indat_callback fix
+To: <gregkh@suse.de>
+Cc: <rfiler@sierrawireless.com>, <epasheva@sierrawireless.com>
+Message-ID: <1266274214.7265.7.camel@Linuxdev4-laptop>
+
+
+From: Elina Pasheva <epasheva@sierrawireless.com>
+
+A crash has been reported with sierra driver on disconnect with
+Ubuntu/Lucid distribution based on kernel-2.6.32.
+The cause of the crash was determined as "NULL tty pointer was being
+referenced" and the NULL pointer was passed by sierra_indat_callback().
+
+This patch modifies sierra_indat_callback() function to check for NULL
+tty structure pointer. This modification prevents a crash from happening
+when the device is disconnected.
+
+This patch fixes the bug reported in Launchpad:
+ https://bugs.launchpad.net/ubuntu/+source/linux/+bug/511157
+
+Signed-off-by: Elina Pasheva <epasheva@sierrawireless.com>
+Cc: stable <stable@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/sierra.c | 17 ++++++++++-------
+ 1 file changed, 10 insertions(+), 7 deletions(-)
+
+--- a/drivers/usb/serial/sierra.c
++++ b/drivers/usb/serial/sierra.c
+@@ -594,14 +594,17 @@ static void sierra_indat_callback(struct
+ } else {
+ if (urb->actual_length) {
+ tty = tty_port_tty_get(&port->port);
++ if (tty) {
++ tty_buffer_request_room(tty,
++ urb->actual_length);
++ tty_insert_flip_string(tty, data,
++ urb->actual_length);
++ tty_flip_buffer_push(tty);
+
+- tty_buffer_request_room(tty, urb->actual_length);
+- tty_insert_flip_string(tty, data, urb->actual_length);
+- tty_flip_buffer_push(tty);
+-
+- tty_kref_put(tty);
+- usb_serial_debug_data(debug, &port->dev, __func__,
+- urb->actual_length, data);
++ tty_kref_put(tty);
++ usb_serial_debug_data(debug, &port->dev,
++ __func__, urb->actual_length, data);
++ }
+ } else {
+ dev_dbg(&port->dev, "%s: empty read urb"
+ " received\n", __func__);
diff --git a/usb/usb-xhci-fix-finding-extended-capabilities-registers.patch b/usb/usb-xhci-fix-finding-extended-capabilities-registers.patch
new file mode 100644
index 00000000000000..f1dd194d8a8374
--- /dev/null
+++ b/usb/usb-xhci-fix-finding-extended-capabilities-registers.patch
@@ -0,0 +1,44 @@
+From laface.tw@gmail.com Wed Feb 17 15:40:37 2010
+From: Edward Shao <laface.tw@gmail.com>
+Date: Thu, 11 Feb 2010 03:37:30 +0800
+Subject: USB: xhci: Fix finding extended capabilities registers
+To: linux-usb@vger.kernel.org
+Cc: sarah.a.sharp@linux.intel.com, gregkh@suse.de
+Message-ID: <1265830650-3732-1-git-send-email-laface.tw@gmail.com>
+
+
+According "5.3.6 Capability Parameters (HCCPARAMS)" of xHCI rev0.96 spec,
+value of xECP register indicates a relative offset, in 32-bit words,
+from Base to the beginning of the first extended capability.
+The wrong calculation will cause BIOS handoff fail (not handoff from BIOS)
+in some platform with BIOS USB legacy sup support.
+
+Signed-off-by: Edward Shao <laface.tw@gmail.com>
+Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+Cc: stable <stable@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/xhci-ext-caps.h | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/host/xhci-ext-caps.h
++++ b/drivers/usb/host/xhci-ext-caps.h
+@@ -101,12 +101,15 @@ static inline int xhci_find_next_cap_off
+
+ next = readl(base + ext_offset);
+
+- if (ext_offset == XHCI_HCC_PARAMS_OFFSET)
++ if (ext_offset == XHCI_HCC_PARAMS_OFFSET) {
+ /* Find the first extended capability */
+ next = XHCI_HCC_EXT_CAPS(next);
+- else
++ ext_offset = 0;
++ } else {
+ /* Find the next extended capability */
+ next = XHCI_EXT_CAPS_NEXT(next);
++ }
++
+ if (!next)
+ return 0;
+ /*