aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-04-18 02:56:30 -0400
committerDavid S. Miller <davem@davemloft.net>2008-04-18 02:56:30 -0400
commit1e42198609d73ed1a9adcba2af275c24c2678420 (patch)
tree32fd4d9073bfc0f3909af8f9fb4bcff38951d01a /drivers
parent794eb6bf20ebf992c040ea831cd3a9c64b0c1f7a (diff)
parent4b119e21d0c66c22e8ca03df05d9de623d0eb50f (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/bus.c7
-rw-r--r--drivers/acpi/processor_core.c2
-rw-r--r--drivers/acpi/thermal.c2
-rw-r--r--drivers/acpi/video.c2
-rw-r--r--drivers/ata/libata-core.c41
-rw-r--r--drivers/ata/pata_ali.c40
-rw-r--r--drivers/ata/pata_sil680.c2
-rw-r--r--drivers/ata/sata_fsl.c8
-rw-r--r--drivers/ata/sata_svw.c4
-rw-r--r--drivers/block/cciss.c1
-rw-r--r--drivers/block/ub.c38
-rw-r--r--drivers/char/drm/i915_drv.h4
-rw-r--r--drivers/char/hpet.c51
-rw-r--r--drivers/dma/fsldma.c8
-rw-r--r--drivers/firmware/dmi_scan.c2
-rw-r--r--drivers/i2c/busses/i2c-davinci.c17
-rw-r--r--drivers/i2c/busses/i2c-ibm_iic.c2
-rw-r--r--drivers/i2c/busses/i2c-tiny-usb.c12
-rw-r--r--drivers/ide/mips/au1xxx-ide.c18
-rw-r--r--drivers/ide/pci/it821x.c2
-rw-r--r--drivers/ide/pci/siimage.c2
-rw-r--r--drivers/input/mouse/appletouch.c13
-rw-r--r--drivers/leds/leds-ams-delta.c2
-rw-r--r--drivers/leds/leds-atmel-pwm.c3
-rw-r--r--drivers/leds/leds-clevo-mail.c1
-rw-r--r--drivers/leds/leds-cm-x270.c2
-rw-r--r--drivers/leds/leds-cobalt-qube.c3
-rw-r--r--drivers/leds/leds-corgi.c2
-rw-r--r--drivers/leds/leds-gpio.c1
-rw-r--r--drivers/leds/leds-h1940.c2
-rw-r--r--drivers/leds/leds-hp6xx.c4
-rw-r--r--drivers/leds/leds-s3c24xx.c1
-rw-r--r--drivers/leds/leds-spitz.c2
-rw-r--r--drivers/leds/leds-tosa.c2
-rw-r--r--drivers/md/raid5.c51
-rw-r--r--drivers/media/Makefile3
-rw-r--r--drivers/media/dvb/frontends/s5h1409.c2
-rw-r--r--drivers/media/video/bt8xx/bt832.c12
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-devattr.c39
-rw-r--r--drivers/misc/atmel-ssc.c2
-rw-r--r--drivers/misc/atmel_pwm.c1
-rw-r--r--drivers/misc/hdpuftrs/hdpu_cpustate.c2
-rw-r--r--drivers/misc/hdpuftrs/hdpu_nexus.c2
-rw-r--r--drivers/mmc/host/at91_mci.c1
-rw-r--r--drivers/mmc/host/au1xmmc.c2
-rw-r--r--drivers/mmc/host/imxmmc.c2
-rw-r--r--drivers/mmc/host/omap.c3
-rw-r--r--drivers/mmc/host/pxamci.c2
-rw-r--r--drivers/mmc/host/wbsd.c1
-rw-r--r--drivers/mtd/chips/cfi_cmdset_0001.c10
-rw-r--r--drivers/mtd/chips/cfi_cmdset_0002.c1
-rw-r--r--drivers/mtd/chips/cfi_cmdset_0020.c1
-rw-r--r--drivers/net/b44.c52
-rw-r--r--drivers/net/fec_mpc52xx.c1
-rw-r--r--drivers/net/fec_mpc52xx_phy.c1
-rw-r--r--drivers/net/netconsole.c5
-rw-r--r--drivers/net/ps3_gelic_wireless.c11
-rw-r--r--drivers/net/smc91x.h8
-rw-r--r--drivers/net/virtio_net.c1
-rw-r--r--drivers/net/wireless/b43/dma.c27
-rw-r--r--drivers/net/wireless/b43legacy/dma.c55
-rw-r--r--drivers/net/wireless/b43legacy/main.c2
-rw-r--r--drivers/net/wireless/rtl8187_dev.c3
-rw-r--r--drivers/parport/parport_pc.c3
-rw-r--r--drivers/pcmcia/at91_cf.c1
-rw-r--r--drivers/pcmcia/omap_cf.c2
-rw-r--r--drivers/pcmcia/pxa2xx_base.c2
-rw-r--r--drivers/rtc/Kconfig1
-rw-r--r--drivers/rtc/rtc-at32ap700x.c2
-rw-r--r--drivers/rtc/rtc-at91rm9200.c1
-rw-r--r--drivers/rtc/rtc-bfin.c1
-rw-r--r--drivers/rtc/rtc-cmos.c8
-rw-r--r--drivers/rtc/rtc-ds1216.c1
-rw-r--r--drivers/rtc/rtc-ds1511.c3
-rw-r--r--drivers/rtc/rtc-ds1553.c3
-rw-r--r--drivers/rtc/rtc-ds1742.c1
-rw-r--r--drivers/rtc/rtc-ep93xx.c3
-rw-r--r--drivers/rtc/rtc-m48t59.c3
-rw-r--r--drivers/rtc/rtc-m48t86.c1
-rw-r--r--drivers/rtc/rtc-omap.c2
-rw-r--r--drivers/rtc/rtc-rs5c313.c1
-rw-r--r--drivers/rtc/rtc-s3c.c1
-rw-r--r--drivers/rtc/rtc-sa1100.c1
-rw-r--r--drivers/rtc/rtc-sh.c1
-rw-r--r--drivers/rtc/rtc-stk17ta8.c3
-rw-r--r--drivers/rtc/rtc-v3020.c1
-rw-r--r--drivers/rtc/rtc-vr41xx.c3
-rw-r--r--drivers/scsi/scsi.c22
-rw-r--r--drivers/serial/atmel_serial.c1
-rw-r--r--drivers/serial/bfin_5xx.c2
-rw-r--r--drivers/serial/imx.c2
-rw-r--r--drivers/serial/mcf.c1
-rw-r--r--drivers/serial/mpc52xx_uart.c2
-rw-r--r--drivers/serial/mpsc.c2
-rw-r--r--drivers/serial/netx-serial.c2
-rw-r--r--drivers/serial/pnx8xxx_uart.c1
-rw-r--r--drivers/serial/pxa.c3
-rw-r--r--drivers/serial/s3c2410.c4
-rw-r--r--drivers/serial/sa1100.c2
-rw-r--r--drivers/serial/sc26xx.c2
-rw-r--r--drivers/serial/sh-sci.c1
-rw-r--r--drivers/serial/uartlite.c3
-rw-r--r--drivers/serial/vr41xx_siu.c3
-rw-r--r--drivers/spi/atmel_spi.c1
-rw-r--r--drivers/spi/au1550_spi.c3
-rw-r--r--drivers/spi/mpc52xx_psc_spi.c3
-rw-r--r--drivers/spi/omap2_mcspi.c3
-rw-r--r--drivers/spi/omap_uwire.c4
-rw-r--r--drivers/spi/pxa2xx_spi.c2
-rw-r--r--drivers/spi/spi_bfin5xx.c19
-rw-r--r--drivers/spi/spi_imx.c4
-rw-r--r--drivers/spi/spi_mpc83xx.c5
-rw-r--r--drivers/spi/spi_s3c24xx.c22
-rw-r--r--drivers/spi/spi_s3c24xx_gpio.c2
-rw-r--r--drivers/spi/spi_sh_sci.c1
-rw-r--r--drivers/spi/spi_txx9.c3
-rw-r--r--drivers/spi/xilinx_spi.c3
-rw-r--r--drivers/ssb/main.c14
-rw-r--r--drivers/thermal/thermal.c4
-rw-r--r--drivers/usb/gadget/at91_udc.c1
-rw-r--r--drivers/usb/gadget/atmel_usba_udc.c2
-rw-r--r--drivers/usb/gadget/fsl_usb2_udc.c1
-rw-r--r--drivers/usb/gadget/lh7a40x_udc.c1
-rw-r--r--drivers/usb/gadget/m66592-udc.c2
-rw-r--r--drivers/usb/gadget/omap_udc.c2
-rw-r--r--drivers/usb/gadget/pxa2xx_udc.c2
-rw-r--r--drivers/usb/gadget/s3c2410_udc.c2
-rw-r--r--drivers/usb/host/isp116x-hcd.c8
-rw-r--r--drivers/usb/host/ohci-at91.c3
-rw-r--r--drivers/usb/host/ohci-au1xxx.c1
-rw-r--r--drivers/usb/host/ohci-ep93xx.c2
-rw-r--r--drivers/usb/host/ohci-lh7a404.c1
-rw-r--r--drivers/usb/host/ohci-omap.c1
-rw-r--r--drivers/usb/host/ohci-pnx4008.c4
-rw-r--r--drivers/usb/host/ohci-pnx8550.c5
-rw-r--r--drivers/usb/host/ohci-ppc-soc.c1
-rw-r--r--drivers/usb/host/ohci-pxa27x.c3
-rw-r--r--drivers/usb/host/ohci-s3c2410.c1
-rw-r--r--drivers/usb/host/ohci-sh.c1
-rw-r--r--drivers/usb/host/ohci-sm501.c1
-rw-r--r--drivers/usb/host/r8a66597-hcd.c2
-rw-r--r--drivers/usb/host/sl811-hcd.c1
-rw-r--r--drivers/usb/host/u132-hcd.c1
-rw-r--r--drivers/usb/serial/option.c56
-rw-r--r--drivers/usb/serial/usb-serial.c2
-rw-r--r--drivers/usb/storage/unusual_devs.h96
-rw-r--r--drivers/video/fbmem.c1
-rw-r--r--drivers/virtio/virtio_ring.c3
-rw-r--r--drivers/watchdog/at32ap700x_wdt.c3
-rw-r--r--drivers/watchdog/at91rm9200_wdt.c1
-rw-r--r--drivers/watchdog/davinci_wdt.c2
-rw-r--r--drivers/watchdog/it8712f_wdt.c2
-rw-r--r--drivers/watchdog/ks8695_wdt.c1
-rw-r--r--drivers/watchdog/mpc83xx_wdt.c2
-rw-r--r--drivers/watchdog/mpcore_wdt.c3
-rw-r--r--drivers/watchdog/mtx-1_wdt.c2
-rw-r--r--drivers/watchdog/mv64x60_wdt.c1
-rw-r--r--drivers/watchdog/omap_wdt.c1
-rw-r--r--drivers/watchdog/pnx4008_wdt.c2
-rw-r--r--drivers/watchdog/s3c2410_wdt.c1
-rw-r--r--drivers/watchdog/txx9wdt.c1
-rw-r--r--drivers/xen/grant-table.c16
162 files changed, 768 insertions, 278 deletions
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 5b6760e0f957..2d1955c11833 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -373,10 +373,11 @@ int acpi_bus_receive_event(struct acpi_bus_event *event)
373 } 373 }
374 374
375 spin_lock_irqsave(&acpi_bus_event_lock, flags); 375 spin_lock_irqsave(&acpi_bus_event_lock, flags);
376 entry = 376 if (!list_empty(&acpi_bus_event_list)) {
377 list_entry(acpi_bus_event_list.next, struct acpi_bus_event, node); 377 entry = list_entry(acpi_bus_event_list.next,
378 if (entry) 378 struct acpi_bus_event, node);
379 list_del(&entry->node); 379 list_del(&entry->node);
380 }
380 spin_unlock_irqrestore(&acpi_bus_event_lock, flags); 381 spin_unlock_irqrestore(&acpi_bus_event_lock, flags);
381 382
382 if (!entry) 383 if (!entry)
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c
index 36a68fa114e3..a825b431b64f 100644
--- a/drivers/acpi/processor_core.c
+++ b/drivers/acpi/processor_core.c
@@ -822,7 +822,7 @@ static int acpi_processor_remove(struct acpi_device *device, int type)
822 } 822 }
823 823
824 processors[pr->id] = NULL; 824 processors[pr->id] = NULL;
825 825 processor_device_array[pr->id] = NULL;
826 kfree(pr); 826 kfree(pr);
827 827
828 return 0; 828 return 0;
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index c4e00ac8ea85..1bcecc7dd2ca 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -1125,7 +1125,7 @@ static int acpi_thermal_register_thermal_zone(struct acpi_thermal *tz)
1125 tz->trips.active[i].flags.valid; i++, trips++); 1125 tz->trips.active[i].flags.valid; i++, trips++);
1126 tz->thermal_zone = thermal_zone_device_register("ACPI thermal zone", 1126 tz->thermal_zone = thermal_zone_device_register("ACPI thermal zone",
1127 trips, tz, &acpi_thermal_zone_ops); 1127 trips, tz, &acpi_thermal_zone_ops);
1128 if (!tz->thermal_zone) 1128 if (IS_ERR(tz->thermal_zone))
1129 return -ENODEV; 1129 return -ENODEV;
1130 1130
1131 result = sysfs_create_link(&tz->device->dev.kobj, 1131 result = sysfs_create_link(&tz->device->dev.kobj,
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index 12fb44f16766..980a74188781 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -713,7 +713,7 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device)
713 713
714 kfree(obj); 714 kfree(obj);
715 715
716 if (device->cap._BCL && device->cap._BCM && max_level > 0) { 716 if (device->cap._BCL && device->cap._BCM && device->cap._BQC && max_level > 0){
717 int result; 717 int result;
718 static int count = 0; 718 static int count = 0;
719 char *name; 719 char *name;
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 48519887f94a..be95fdb69726 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -326,6 +326,44 @@ static void ata_force_horkage(struct ata_device *dev)
326} 326}
327 327
328/** 328/**
329 * atapi_cmd_type - Determine ATAPI command type from SCSI opcode
330 * @opcode: SCSI opcode
331 *
332 * Determine ATAPI command type from @opcode.
333 *
334 * LOCKING:
335 * None.
336 *
337 * RETURNS:
338 * ATAPI_{READ|WRITE|READ_CD|PASS_THRU|MISC}
339 */
340int atapi_cmd_type(u8 opcode)
341{
342 switch (opcode) {
343 case GPCMD_READ_10:
344 case GPCMD_READ_12:
345 return ATAPI_READ;
346
347 case GPCMD_WRITE_10:
348 case GPCMD_WRITE_12:
349 case GPCMD_WRITE_AND_VERIFY_10:
350 return ATAPI_WRITE;
351
352 case GPCMD_READ_CD:
353 case GPCMD_READ_CD_MSF:
354 return ATAPI_READ_CD;
355
356 case ATA_16:
357 case ATA_12:
358 if (atapi_passthru16)
359 return ATAPI_PASS_THRU;
360 /* fall thru */
361 default:
362 return ATAPI_MISC;
363 }
364}
365
366/**
329 * ata_tf_to_fis - Convert ATA taskfile to SATA FIS structure 367 * ata_tf_to_fis - Convert ATA taskfile to SATA FIS structure
330 * @tf: Taskfile to convert 368 * @tf: Taskfile to convert
331 * @pmp: Port multiplier port 369 * @pmp: Port multiplier port
@@ -2660,7 +2698,7 @@ int ata_bus_probe(struct ata_port *ap)
2660 specific sequence bass-ackwards so that PDIAG- is released by 2698 specific sequence bass-ackwards so that PDIAG- is released by
2661 the slave device */ 2699 the slave device */
2662 2700
2663 ata_link_for_each_dev(dev, &ap->link) { 2701 ata_link_for_each_dev_reverse(dev, &ap->link) {
2664 if (tries[dev->devno]) 2702 if (tries[dev->devno])
2665 dev->class = classes[dev->devno]; 2703 dev->class = classes[dev->devno];
2666 2704
@@ -7774,6 +7812,7 @@ EXPORT_SYMBOL_GPL(ata_tf_read);
7774EXPORT_SYMBOL_GPL(ata_noop_dev_select); 7812EXPORT_SYMBOL_GPL(ata_noop_dev_select);
7775EXPORT_SYMBOL_GPL(ata_std_dev_select); 7813EXPORT_SYMBOL_GPL(ata_std_dev_select);
7776EXPORT_SYMBOL_GPL(sata_print_link_status); 7814EXPORT_SYMBOL_GPL(sata_print_link_status);
7815EXPORT_SYMBOL_GPL(atapi_cmd_type);
7777EXPORT_SYMBOL_GPL(ata_tf_to_fis); 7816EXPORT_SYMBOL_GPL(ata_tf_to_fis);
7778EXPORT_SYMBOL_GPL(ata_tf_from_fis); 7817EXPORT_SYMBOL_GPL(ata_tf_from_fis);
7779EXPORT_SYMBOL_GPL(ata_pack_xfermask); 7818EXPORT_SYMBOL_GPL(ata_pack_xfermask);
diff --git a/drivers/ata/pata_ali.c b/drivers/ata/pata_ali.c
index 8786455c901d..511a830b6256 100644
--- a/drivers/ata/pata_ali.c
+++ b/drivers/ata/pata_ali.c
@@ -36,6 +36,10 @@
36#define DRV_NAME "pata_ali" 36#define DRV_NAME "pata_ali"
37#define DRV_VERSION "0.7.5" 37#define DRV_VERSION "0.7.5"
38 38
39static int ali_atapi_dma = 0;
40module_param_named(atapi_dma, ali_atapi_dma, int, 0644);
41MODULE_PARM_DESC(atapi_dma, "Enable ATAPI DMA (0=disable, 1=enable)");
42
39/* 43/*
40 * Cable special cases 44 * Cable special cases
41 */ 45 */
@@ -270,6 +274,27 @@ static void ali_set_dmamode(struct ata_port *ap, struct ata_device *adev)
270} 274}
271 275
272/** 276/**
277 * ali_warn_atapi_dma - Warn about ATAPI DMA disablement
278 * @adev: Device
279 *
280 * Whine about ATAPI DMA disablement if @adev is an ATAPI device.
281 * Can be used as ->dev_config.
282 */
283
284static void ali_warn_atapi_dma(struct ata_device *adev)
285{
286 struct ata_eh_context *ehc = &adev->link->eh_context;
287 int print_info = ehc->i.flags & ATA_EHI_PRINTINFO;
288
289 if (print_info && adev->class == ATA_DEV_ATAPI && !ali_atapi_dma) {
290 ata_dev_printk(adev, KERN_WARNING,
291 "WARNING: ATAPI DMA disabled for reliablity issues. It can be enabled\n");
292 ata_dev_printk(adev, KERN_WARNING,
293 "WARNING: via pata_ali.atapi_dma modparam or corresponding sysfs node.\n");
294 }
295}
296
297/**
273 * ali_lock_sectors - Keep older devices to 255 sector mode 298 * ali_lock_sectors - Keep older devices to 255 sector mode
274 * @adev: Device 299 * @adev: Device
275 * 300 *
@@ -283,6 +308,7 @@ static void ali_set_dmamode(struct ata_port *ap, struct ata_device *adev)
283static void ali_lock_sectors(struct ata_device *adev) 308static void ali_lock_sectors(struct ata_device *adev)
284{ 309{
285 adev->max_sectors = 255; 310 adev->max_sectors = 255;
311 ali_warn_atapi_dma(adev);
286} 312}
287 313
288/** 314/**
@@ -294,6 +320,18 @@ static void ali_lock_sectors(struct ata_device *adev)
294 320
295static int ali_check_atapi_dma(struct ata_queued_cmd *qc) 321static int ali_check_atapi_dma(struct ata_queued_cmd *qc)
296{ 322{
323 if (!ali_atapi_dma) {
324 /* FIXME: pata_ali can't do ATAPI DMA reliably but the
325 * IDE alim15x3 driver can. I tried lots of things
326 * but couldn't find what the actual difference was.
327 * If you got an idea, please write it to
328 * linux-ide@vger.kernel.org and cc htejun@gmail.com.
329 *
330 * Disable ATAPI DMA for now.
331 */
332 return -EOPNOTSUPP;
333 }
334
297 /* If its not a media command, its not worth it */ 335 /* If its not a media command, its not worth it */
298 if (atapi_cmd_type(qc->cdb[0]) == ATAPI_MISC) 336 if (atapi_cmd_type(qc->cdb[0]) == ATAPI_MISC)
299 return -EOPNOTSUPP; 337 return -EOPNOTSUPP;
@@ -359,6 +397,7 @@ static struct ata_port_operations ali_20_port_ops = {
359 397
360 .tf_load = ata_tf_load, 398 .tf_load = ata_tf_load,
361 .tf_read = ata_tf_read, 399 .tf_read = ata_tf_read,
400 .check_atapi_dma = ali_check_atapi_dma,
362 .check_status = ata_check_status, 401 .check_status = ata_check_status,
363 .exec_command = ata_exec_command, 402 .exec_command = ata_exec_command,
364 .dev_select = ata_std_dev_select, 403 .dev_select = ata_std_dev_select,
@@ -438,6 +477,7 @@ static struct ata_port_operations ali_c5_port_ops = {
438 .check_status = ata_check_status, 477 .check_status = ata_check_status,
439 .exec_command = ata_exec_command, 478 .exec_command = ata_exec_command,
440 .dev_select = ata_std_dev_select, 479 .dev_select = ata_std_dev_select,
480 .dev_config = ali_warn_atapi_dma,
441 481
442 .freeze = ata_bmdma_freeze, 482 .freeze = ata_bmdma_freeze,
443 .thaw = ata_bmdma_thaw, 483 .thaw = ata_bmdma_thaw,
diff --git a/drivers/ata/pata_sil680.c b/drivers/ata/pata_sil680.c
index 3988e44f4934..7c5b2dd9a1a1 100644
--- a/drivers/ata/pata_sil680.c
+++ b/drivers/ata/pata_sil680.c
@@ -270,7 +270,7 @@ static u8 sil680_init_chip(struct pci_dev *pdev, int *try_mmio)
270 tmpbyte & 1, tmpbyte & 0x30); 270 tmpbyte & 1, tmpbyte & 0x30);
271 271
272 *try_mmio = 0; 272 *try_mmio = 0;
273#ifdef CONFIG_PPC 273#ifdef CONFIG_PPC_MERGE
274 if (machine_is(cell)) 274 if (machine_is(cell))
275 *try_mmio = (tmpbyte & 1) || pci_resource_start(pdev, 5); 275 *try_mmio = (tmpbyte & 1) || pci_resource_start(pdev, 5);
276#endif 276#endif
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index 07791a7a48a5..9d1e3cad4aa9 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -1256,7 +1256,6 @@ static int sata_fsl_probe(struct of_device *ofdev,
1256 void __iomem *ssr_base = NULL; 1256 void __iomem *ssr_base = NULL;
1257 void __iomem *csr_base = NULL; 1257 void __iomem *csr_base = NULL;
1258 struct sata_fsl_host_priv *host_priv = NULL; 1258 struct sata_fsl_host_priv *host_priv = NULL;
1259 struct resource *r;
1260 int irq; 1259 int irq;
1261 struct ata_host *host; 1260 struct ata_host *host;
1262 1261
@@ -1266,8 +1265,6 @@ static int sata_fsl_probe(struct of_device *ofdev,
1266 dev_printk(KERN_INFO, &ofdev->dev, 1265 dev_printk(KERN_INFO, &ofdev->dev,
1267 "Sata FSL Platform/CSB Driver init\n"); 1266 "Sata FSL Platform/CSB Driver init\n");
1268 1267
1269 r = kmalloc(sizeof(struct resource), GFP_KERNEL);
1270
1271 hcr_base = of_iomap(ofdev->node, 0); 1268 hcr_base = of_iomap(ofdev->node, 0);
1272 if (!hcr_base) 1269 if (!hcr_base)
1273 goto error_exit_with_cleanup; 1270 goto error_exit_with_cleanup;
@@ -1348,10 +1345,7 @@ static int sata_fsl_remove(struct of_device *ofdev)
1348 1345
1349static struct of_device_id fsl_sata_match[] = { 1346static struct of_device_id fsl_sata_match[] = {
1350 { 1347 {
1351 .compatible = "fsl,mpc8315-sata", 1348 .compatible = "fsl,pq-sata",
1352 },
1353 {
1354 .compatible = "fsl,mpc8379-sata",
1355 }, 1349 },
1356 {}, 1350 {},
1357}; 1351};
diff --git a/drivers/ata/sata_svw.c b/drivers/ata/sata_svw.c
index 840d1c4a7850..019e367b59fc 100644
--- a/drivers/ata/sata_svw.c
+++ b/drivers/ata/sata_svw.c
@@ -531,8 +531,8 @@ static int k2_sata_init_one(struct pci_dev *pdev, const struct pci_device_id *en
531 * */ 531 * */
532static const struct pci_device_id k2_sata_pci_tbl[] = { 532static const struct pci_device_id k2_sata_pci_tbl[] = {
533 { PCI_VDEVICE(SERVERWORKS, 0x0240), chip_svw4 }, 533 { PCI_VDEVICE(SERVERWORKS, 0x0240), chip_svw4 },
534 { PCI_VDEVICE(SERVERWORKS, 0x0241), chip_svw4 }, 534 { PCI_VDEVICE(SERVERWORKS, 0x0241), chip_svw8 },
535 { PCI_VDEVICE(SERVERWORKS, 0x0242), chip_svw8 }, 535 { PCI_VDEVICE(SERVERWORKS, 0x0242), chip_svw4 },
536 { PCI_VDEVICE(SERVERWORKS, 0x024a), chip_svw4 }, 536 { PCI_VDEVICE(SERVERWORKS, 0x024a), chip_svw4 },
537 { PCI_VDEVICE(SERVERWORKS, 0x024b), chip_svw4 }, 537 { PCI_VDEVICE(SERVERWORKS, 0x024b), chip_svw4 },
538 { PCI_VDEVICE(SERVERWORKS, 0x0410), chip_svw42 }, 538 { PCI_VDEVICE(SERVERWORKS, 0x0410), chip_svw42 },
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index 55bd35c0f082..9c9627e8e334 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -50,6 +50,7 @@
50#include <scsi/sg.h> 50#include <scsi/sg.h>
51#include <scsi/scsi_ioctl.h> 51#include <scsi/scsi_ioctl.h>
52#include <linux/cdrom.h> 52#include <linux/cdrom.h>
53#include <linux/scatterlist.h>
53 54
54#define CCISS_DRIVER_VERSION(maj,min,submin) ((maj<<16)|(min<<8)|(submin)) 55#define CCISS_DRIVER_VERSION(maj,min,submin) ((maj<<16)|(min<<8)|(submin))
55#define DRIVER_NAME "HP CISS Driver (v 3.6.14)" 56#define DRIVER_NAME "HP CISS Driver (v 3.6.14)"
diff --git a/drivers/block/ub.c b/drivers/block/ub.c
index c452e2d355ee..27bfe72aab59 100644
--- a/drivers/block/ub.c
+++ b/drivers/block/ub.c
@@ -8,6 +8,7 @@
8 * and is not licensed separately. See file COPYING for details. 8 * and is not licensed separately. See file COPYING for details.
9 * 9 *
10 * TODO (sorted by decreasing priority) 10 * TODO (sorted by decreasing priority)
11 * -- Return sense now that rq allows it (we always auto-sense anyway).
11 * -- set readonly flag for CDs, set removable flag for CF readers 12 * -- set readonly flag for CDs, set removable flag for CF readers
12 * -- do inquiry and verify we got a disk and not a tape (for LUN mismatch) 13 * -- do inquiry and verify we got a disk and not a tape (for LUN mismatch)
13 * -- verify the 13 conditions and do bulk resets 14 * -- verify the 13 conditions and do bulk resets
@@ -359,7 +360,8 @@ static void ub_cmd_build_block(struct ub_dev *sc, struct ub_lun *lun,
359static void ub_cmd_build_packet(struct ub_dev *sc, struct ub_lun *lun, 360static void ub_cmd_build_packet(struct ub_dev *sc, struct ub_lun *lun,
360 struct ub_scsi_cmd *cmd, struct ub_request *urq); 361 struct ub_scsi_cmd *cmd, struct ub_request *urq);
361static void ub_rw_cmd_done(struct ub_dev *sc, struct ub_scsi_cmd *cmd); 362static void ub_rw_cmd_done(struct ub_dev *sc, struct ub_scsi_cmd *cmd);
362static void ub_end_rq(struct request *rq, unsigned int status); 363static void ub_end_rq(struct request *rq, unsigned int status,
364 unsigned int cmd_len);
363static int ub_rw_cmd_retry(struct ub_dev *sc, struct ub_lun *lun, 365static int ub_rw_cmd_retry(struct ub_dev *sc, struct ub_lun *lun,
364 struct ub_request *urq, struct ub_scsi_cmd *cmd); 366 struct ub_request *urq, struct ub_scsi_cmd *cmd);
365static int ub_submit_scsi(struct ub_dev *sc, struct ub_scsi_cmd *cmd); 367static int ub_submit_scsi(struct ub_dev *sc, struct ub_scsi_cmd *cmd);
@@ -642,13 +644,13 @@ static int ub_request_fn_1(struct ub_lun *lun, struct request *rq)
642 644
643 if (atomic_read(&sc->poison)) { 645 if (atomic_read(&sc->poison)) {
644 blkdev_dequeue_request(rq); 646 blkdev_dequeue_request(rq);
645 ub_end_rq(rq, DID_NO_CONNECT << 16); 647 ub_end_rq(rq, DID_NO_CONNECT << 16, blk_rq_bytes(rq));
646 return 0; 648 return 0;
647 } 649 }
648 650
649 if (lun->changed && !blk_pc_request(rq)) { 651 if (lun->changed && !blk_pc_request(rq)) {
650 blkdev_dequeue_request(rq); 652 blkdev_dequeue_request(rq);
651 ub_end_rq(rq, SAM_STAT_CHECK_CONDITION); 653 ub_end_rq(rq, SAM_STAT_CHECK_CONDITION, blk_rq_bytes(rq));
652 return 0; 654 return 0;
653 } 655 }
654 656
@@ -701,7 +703,7 @@ static int ub_request_fn_1(struct ub_lun *lun, struct request *rq)
701 703
702drop: 704drop:
703 ub_put_cmd(lun, cmd); 705 ub_put_cmd(lun, cmd);
704 ub_end_rq(rq, DID_ERROR << 16); 706 ub_end_rq(rq, DID_ERROR << 16, blk_rq_bytes(rq));
705 return 0; 707 return 0;
706} 708}
707 709
@@ -770,6 +772,7 @@ static void ub_rw_cmd_done(struct ub_dev *sc, struct ub_scsi_cmd *cmd)
770 struct ub_request *urq = cmd->back; 772 struct ub_request *urq = cmd->back;
771 struct request *rq; 773 struct request *rq;
772 unsigned int scsi_status; 774 unsigned int scsi_status;
775 unsigned int cmd_len;
773 776
774 rq = urq->rq; 777 rq = urq->rq;
775 778
@@ -779,8 +782,18 @@ static void ub_rw_cmd_done(struct ub_dev *sc, struct ub_scsi_cmd *cmd)
779 rq->data_len = 0; 782 rq->data_len = 0;
780 else 783 else
781 rq->data_len -= cmd->act_len; 784 rq->data_len -= cmd->act_len;
785 scsi_status = 0;
786 } else {
787 if (cmd->act_len != cmd->len) {
788 if ((cmd->key == MEDIUM_ERROR ||
789 cmd->key == UNIT_ATTENTION) &&
790 ub_rw_cmd_retry(sc, lun, urq, cmd) == 0)
791 return;
792 scsi_status = SAM_STAT_CHECK_CONDITION;
793 } else {
794 scsi_status = 0;
795 }
782 } 796 }
783 scsi_status = 0;
784 } else { 797 } else {
785 if (blk_pc_request(rq)) { 798 if (blk_pc_request(rq)) {
786 /* UB_SENSE_SIZE is smaller than SCSI_SENSE_BUFFERSIZE */ 799 /* UB_SENSE_SIZE is smaller than SCSI_SENSE_BUFFERSIZE */
@@ -801,14 +814,17 @@ static void ub_rw_cmd_done(struct ub_dev *sc, struct ub_scsi_cmd *cmd)
801 814
802 urq->rq = NULL; 815 urq->rq = NULL;
803 816
817 cmd_len = cmd->len;
804 ub_put_cmd(lun, cmd); 818 ub_put_cmd(lun, cmd);
805 ub_end_rq(rq, scsi_status); 819 ub_end_rq(rq, scsi_status, cmd_len);
806 blk_start_queue(lun->disk->queue); 820 blk_start_queue(lun->disk->queue);
807} 821}
808 822
809static void ub_end_rq(struct request *rq, unsigned int scsi_status) 823static void ub_end_rq(struct request *rq, unsigned int scsi_status,
824 unsigned int cmd_len)
810{ 825{
811 int error; 826 int error;
827 long rqlen;
812 828
813 if (scsi_status == 0) { 829 if (scsi_status == 0) {
814 error = 0; 830 error = 0;
@@ -816,8 +832,12 @@ static void ub_end_rq(struct request *rq, unsigned int scsi_status)
816 error = -EIO; 832 error = -EIO;
817 rq->errors = scsi_status; 833 rq->errors = scsi_status;
818 } 834 }
819 if (__blk_end_request(rq, error, blk_rq_bytes(rq))) 835 rqlen = blk_rq_bytes(rq); /* Oddly enough, this is the residue. */
820 BUG(); 836 if (__blk_end_request(rq, error, cmd_len)) {
837 printk(KERN_WARNING DRV_NAME
838 ": __blk_end_request blew, %s-cmd total %u rqlen %ld\n",
839 blk_pc_request(rq)? "pc": "fs", cmd_len, rqlen);
840 }
821} 841}
822 842
823static int ub_rw_cmd_retry(struct ub_dev *sc, struct ub_lun *lun, 843static int ub_rw_cmd_retry(struct ub_dev *sc, struct ub_lun *lun,
diff --git a/drivers/char/drm/i915_drv.h b/drivers/char/drm/i915_drv.h
index c10d128e34db..675d88bda066 100644
--- a/drivers/char/drm/i915_drv.h
+++ b/drivers/char/drm/i915_drv.h
@@ -1092,8 +1092,8 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller);
1092#define IS_I915G(dev) ((dev)->pci_device == 0x2582 || (dev)->pci_device == 0x258a) 1092#define IS_I915G(dev) ((dev)->pci_device == 0x2582 || (dev)->pci_device == 0x258a)
1093#define IS_I915GM(dev) ((dev)->pci_device == 0x2592) 1093#define IS_I915GM(dev) ((dev)->pci_device == 0x2592)
1094#define IS_I945G(dev) ((dev)->pci_device == 0x2772) 1094#define IS_I945G(dev) ((dev)->pci_device == 0x2772)
1095#define IS_I945GM(dev) ((dev)->pci_device == 0x27A2) 1095#define IS_I945GM(dev) ((dev)->pci_device == 0x27A2 ||\
1096 1096 (dev)->pci_device == 0x27AE)
1097#define IS_I965G(dev) ((dev)->pci_device == 0x2972 || \ 1097#define IS_I965G(dev) ((dev)->pci_device == 0x2972 || \
1098 (dev)->pci_device == 0x2982 || \ 1098 (dev)->pci_device == 0x2982 || \
1099 (dev)->pci_device == 0x2992 || \ 1099 (dev)->pci_device == 0x2992 || \
diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
index 465ad35ed38f..1399971be689 100644
--- a/drivers/char/hpet.c
+++ b/drivers/char/hpet.c
@@ -731,14 +731,14 @@ static unsigned long hpet_calibrate(struct hpets *hpetp)
731 731
732int hpet_alloc(struct hpet_data *hdp) 732int hpet_alloc(struct hpet_data *hdp)
733{ 733{
734 u64 cap, mcfg, hpet_config; 734 u64 cap, mcfg;
735 struct hpet_dev *devp; 735 struct hpet_dev *devp;
736 u32 i, ntimer, irq; 736 u32 i, ntimer;
737 struct hpets *hpetp; 737 struct hpets *hpetp;
738 size_t siz; 738 size_t siz;
739 struct hpet __iomem *hpet; 739 struct hpet __iomem *hpet;
740 static struct hpets *last = NULL; 740 static struct hpets *last = NULL;
741 unsigned long period, irq_bitmap; 741 unsigned long period;
742 unsigned long long temp; 742 unsigned long long temp;
743 743
744 /* 744 /*
@@ -765,47 +765,11 @@ int hpet_alloc(struct hpet_data *hdp)
765 hpetp->hp_hpet_phys = hdp->hd_phys_address; 765 hpetp->hp_hpet_phys = hdp->hd_phys_address;
766 766
767 hpetp->hp_ntimer = hdp->hd_nirqs; 767 hpetp->hp_ntimer = hdp->hd_nirqs;
768 hpet = hpetp->hp_hpet;
769
770 /* Assign IRQs statically for legacy devices */
771 hpetp->hp_dev[0].hd_hdwirq = hdp->hd_irq[0];
772 hpetp->hp_dev[1].hd_hdwirq = hdp->hd_irq[1];
773
774 /* Assign IRQs dynamically for the others */
775 for (i = 2, devp = &hpetp->hp_dev[2]; i < hdp->hd_nirqs; i++, devp++) {
776 struct hpet_timer __iomem *timer;
777 768
778 timer = &hpet->hpet_timers[devp - hpetp->hp_dev]; 769 for (i = 0; i < hdp->hd_nirqs; i++)
770 hpetp->hp_dev[i].hd_hdwirq = hdp->hd_irq[i];
779 771
780 /* Check if there's already an IRQ assigned to the timer */ 772 hpet = hpetp->hp_hpet;
781 if (hdp->hd_irq[i]) {
782 hpetp->hp_dev[i].hd_hdwirq = hdp->hd_irq[i];
783 continue;
784 }
785
786 hpet_config = readq(&timer->hpet_config);
787 irq_bitmap = (hpet_config & Tn_INT_ROUTE_CAP_MASK)
788 >> Tn_INT_ROUTE_CAP_SHIFT;
789 if (!irq_bitmap)
790 irq = 0; /* No valid IRQ Assignable */
791 else {
792 irq = find_first_bit(&irq_bitmap, 32);
793 do {
794 hpet_config |= irq << Tn_INT_ROUTE_CNF_SHIFT;
795 writeq(hpet_config, &timer->hpet_config);
796
797 /*
798 * Verify whether we have written a valid
799 * IRQ number by reading it back again
800 */
801 hpet_config = readq(&timer->hpet_config);
802 if (irq == (hpet_config & Tn_INT_ROUTE_CNF_MASK)
803 >> Tn_INT_ROUTE_CNF_SHIFT)
804 break; /* Success */
805 } while ((irq = (find_next_bit(&irq_bitmap, 32, irq))));
806 }
807 hpetp->hp_dev[i].hd_hdwirq = irq;
808 }
809 773
810 cap = readq(&hpet->hpet_cap); 774 cap = readq(&hpet->hpet_cap);
811 775
@@ -836,8 +800,7 @@ int hpet_alloc(struct hpet_data *hdp)
836 hpetp->hp_which, hdp->hd_phys_address, 800 hpetp->hp_which, hdp->hd_phys_address,
837 hpetp->hp_ntimer > 1 ? "s" : ""); 801 hpetp->hp_ntimer > 1 ? "s" : "");
838 for (i = 0; i < hpetp->hp_ntimer; i++) 802 for (i = 0; i < hpetp->hp_ntimer; i++)
839 printk("%s %d", i > 0 ? "," : "", 803 printk("%s %d", i > 0 ? "," : "", hdp->hd_irq[i]);
840 hpetp->hp_dev[i].hd_hdwirq);
841 printk("\n"); 804 printk("\n");
842 805
843 printk(KERN_INFO "hpet%u: %u %d-bit timers, %Lu Hz\n", 806 printk(KERN_INFO "hpet%u: %u %d-bit timers, %Lu Hz\n",
diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c
index 72692309398a..df163687c91a 100644
--- a/drivers/dma/fsldma.c
+++ b/drivers/dma/fsldma.c
@@ -1021,11 +1021,11 @@ const u32 mpc8349_dma_ip_feature = FSL_DMA_IP_83XX | FSL_DMA_LITTLE_ENDIAN;
1021 1021
1022static struct of_device_id of_fsl_dma_chan_ids[] = { 1022static struct of_device_id of_fsl_dma_chan_ids[] = {
1023 { 1023 {
1024 .compatible = "fsl,mpc8540-dma-channel", 1024 .compatible = "fsl,eloplus-dma-channel",
1025 .data = (void *)&mpc8540_dma_ip_feature, 1025 .data = (void *)&mpc8540_dma_ip_feature,
1026 }, 1026 },
1027 { 1027 {
1028 .compatible = "fsl,mpc8349-dma-channel", 1028 .compatible = "fsl,elo-dma-channel",
1029 .data = (void *)&mpc8349_dma_ip_feature, 1029 .data = (void *)&mpc8349_dma_ip_feature,
1030 }, 1030 },
1031 {} 1031 {}
@@ -1107,8 +1107,8 @@ err:
1107} 1107}
1108 1108
1109static struct of_device_id of_fsl_dma_ids[] = { 1109static struct of_device_id of_fsl_dma_ids[] = {
1110 { .compatible = "fsl,mpc8540-dma", }, 1110 { .compatible = "fsl,eloplus-dma", },
1111 { .compatible = "fsl,mpc8349-dma", }, 1111 { .compatible = "fsl,elo-dma", },
1112 {} 1112 {}
1113}; 1113};
1114 1114
diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c
index 4072449ad1cd..c5e3ed7e903b 100644
--- a/drivers/firmware/dmi_scan.c
+++ b/drivers/firmware/dmi_scan.c
@@ -266,7 +266,7 @@ static void __init dmi_save_ipmi_device(const struct dmi_header *dm)
266 dev->name = "IPMI controller"; 266 dev->name = "IPMI controller";
267 dev->device_data = data; 267 dev->device_data = data;
268 268
269 list_add(&dev->list, &dmi_devices); 269 list_add_tail(&dev->list, &dmi_devices);
270} 270}
271 271
272static void __init dmi_save_extended_devices(const struct dmi_header *dm) 272static void __init dmi_save_extended_devices(const struct dmi_header *dm)
diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c
index cce5a614758d..fde26345a379 100644
--- a/drivers/i2c/busses/i2c-davinci.c
+++ b/drivers/i2c/busses/i2c-davinci.c
@@ -382,9 +382,8 @@ static irqreturn_t i2c_davinci_isr(int this_irq, void *dev_id)
382 break; 382 break;
383 383
384 case DAVINCI_I2C_IVR_ARDY: 384 case DAVINCI_I2C_IVR_ARDY:
385 w = davinci_i2c_read_reg(dev, DAVINCI_I2C_STR_REG); 385 davinci_i2c_write_reg(dev,
386 MOD_REG_BIT(w, DAVINCI_I2C_STR_ARDY, 1); 386 DAVINCI_I2C_STR_REG, DAVINCI_I2C_STR_ARDY);
387 davinci_i2c_write_reg(dev, DAVINCI_I2C_STR_REG, w);
388 complete(&dev->cmd_complete); 387 complete(&dev->cmd_complete);
389 break; 388 break;
390 389
@@ -397,12 +396,9 @@ static irqreturn_t i2c_davinci_isr(int this_irq, void *dev_id)
397 if (dev->buf_len) 396 if (dev->buf_len)
398 continue; 397 continue;
399 398
400 w = davinci_i2c_read_reg(dev,
401 DAVINCI_I2C_STR_REG);
402 MOD_REG_BIT(w, DAVINCI_I2C_IMR_RRDY, 0);
403 davinci_i2c_write_reg(dev, 399 davinci_i2c_write_reg(dev,
404 DAVINCI_I2C_STR_REG, 400 DAVINCI_I2C_STR_REG,
405 w); 401 DAVINCI_I2C_IMR_RRDY);
406 } else 402 } else
407 dev_err(dev->dev, "RDR IRQ while no " 403 dev_err(dev->dev, "RDR IRQ while no "
408 "data requested\n"); 404 "data requested\n");
@@ -428,9 +424,8 @@ static irqreturn_t i2c_davinci_isr(int this_irq, void *dev_id)
428 break; 424 break;
429 425
430 case DAVINCI_I2C_IVR_SCD: 426 case DAVINCI_I2C_IVR_SCD:
431 w = davinci_i2c_read_reg(dev, DAVINCI_I2C_STR_REG); 427 davinci_i2c_write_reg(dev,
432 MOD_REG_BIT(w, DAVINCI_I2C_STR_SCD, 1); 428 DAVINCI_I2C_STR_REG, DAVINCI_I2C_STR_SCD);
433 davinci_i2c_write_reg(dev, DAVINCI_I2C_STR_REG, w);
434 complete(&dev->cmd_complete); 429 complete(&dev->cmd_complete);
435 break; 430 break;
436 431
diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c
index 7c7eb0cfeceb..22bb247d0e60 100644
--- a/drivers/i2c/busses/i2c-ibm_iic.c
+++ b/drivers/i2c/busses/i2c-ibm_iic.c
@@ -55,7 +55,7 @@ MODULE_PARM_DESC(iic_force_poll, "Force polling mode");
55 55
56static int iic_force_fast; 56static int iic_force_fast;
57module_param(iic_force_fast, bool, 0); 57module_param(iic_force_fast, bool, 0);
58MODULE_PARM_DESC(iic_fast_poll, "Force fast mode (400 kHz)"); 58MODULE_PARM_DESC(iic_force_fast, "Force fast mode (400 kHz)");
59 59
60#define DBG_LEVEL 0 60#define DBG_LEVEL 0
61 61
diff --git a/drivers/i2c/busses/i2c-tiny-usb.c b/drivers/i2c/busses/i2c-tiny-usb.c
index cb9abe7565a7..b1c050ff311d 100644
--- a/drivers/i2c/busses/i2c-tiny-usb.c
+++ b/drivers/i2c/busses/i2c-tiny-usb.c
@@ -131,11 +131,15 @@ static const struct i2c_algorithm usb_algorithm = {
131 131
132/* ----- begin of usb layer ---------------------------------------------- */ 132/* ----- begin of usb layer ---------------------------------------------- */
133 133
134/* The usb i2c interface uses a vid/pid pair donated by */ 134/*
135/* Future Technology Devices International Ltd. */ 135 * Initially the usb i2c interface uses a vid/pid pair donated by
136 * Future Technology Devices International Ltd., later a pair was
137 * bought from EZPrototypes
138 */
136static struct usb_device_id i2c_tiny_usb_table [] = { 139static struct usb_device_id i2c_tiny_usb_table [] = {
137 { USB_DEVICE(0x0403, 0xc631) }, 140 { USB_DEVICE(0x0403, 0xc631) }, /* FTDI */
138 { } /* Terminating entry */ 141 { USB_DEVICE(0x1c40, 0x0534) }, /* EZPrototypes */
142 { } /* Terminating entry */
139}; 143};
140 144
141MODULE_DEVICE_TABLE(usb, i2c_tiny_usb_table); 145MODULE_DEVICE_TABLE(usb, i2c_tiny_usb_table);
diff --git a/drivers/ide/mips/au1xxx-ide.c b/drivers/ide/mips/au1xxx-ide.c
index 0f4bf5d72835..85c016bdfd38 100644
--- a/drivers/ide/mips/au1xxx-ide.c
+++ b/drivers/ide/mips/au1xxx-ide.c
@@ -32,19 +32,12 @@
32#include <linux/kernel.h> 32#include <linux/kernel.h>
33#include <linux/delay.h> 33#include <linux/delay.h>
34#include <linux/platform_device.h> 34#include <linux/platform_device.h>
35
36#include <linux/init.h> 35#include <linux/init.h>
37#include <linux/ide.h> 36#include <linux/ide.h>
38#include <linux/sysdev.h> 37#include <linux/scatterlist.h>
39
40#include <linux/dma-mapping.h>
41
42#include "ide-timing.h"
43 38
44#include <asm/io.h>
45#include <asm/mach-au1x00/au1xxx.h> 39#include <asm/mach-au1x00/au1xxx.h>
46#include <asm/mach-au1x00/au1xxx_dbdma.h> 40#include <asm/mach-au1x00/au1xxx_dbdma.h>
47
48#include <asm/mach-au1x00/au1xxx_ide.h> 41#include <asm/mach-au1x00/au1xxx_ide.h>
49 42
50#define DRV_NAME "au1200-ide" 43#define DRV_NAME "au1200-ide"
@@ -56,6 +49,8 @@
56static _auide_hwif auide_hwif; 49static _auide_hwif auide_hwif;
57static int dbdma_init_done; 50static int dbdma_init_done;
58 51
52static int auide_ddma_init(_auide_hwif *auide);
53
59#if defined(CONFIG_BLK_DEV_IDE_AU1XXX_PIO_DBDMA) 54#if defined(CONFIG_BLK_DEV_IDE_AU1XXX_PIO_DBDMA)
60 55
61void auide_insw(unsigned long port, void *addr, u32 count) 56void auide_insw(unsigned long port, void *addr, u32 count)
@@ -591,13 +586,14 @@ static int au_ide_probe(struct device *dev)
591 goto out; 586 goto out;
592 } 587 }
593 588
594 if (!request_mem_region (res->start, res->end-res->start, pdev->name)) { 589 if (!request_mem_region(res->start, res->end - res->start + 1,
590 pdev->name)) {
595 pr_debug("%s: request_mem_region failed\n", DRV_NAME); 591 pr_debug("%s: request_mem_region failed\n", DRV_NAME);
596 ret = -EBUSY; 592 ret = -EBUSY;
597 goto out; 593 goto out;
598 } 594 }
599 595
600 ahwif->regbase = (u32)ioremap(res->start, res->end-res->start); 596 ahwif->regbase = (u32)ioremap(res->start, res->end - res->start + 1);
601 if (ahwif->regbase == 0) { 597 if (ahwif->regbase == 0) {
602 ret = -ENOMEM; 598 ret = -ENOMEM;
603 goto out; 599 goto out;
@@ -682,7 +678,7 @@ static int au_ide_remove(struct device *dev)
682 iounmap((void *)ahwif->regbase); 678 iounmap((void *)ahwif->regbase);
683 679
684 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 680 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
685 release_mem_region(res->start, res->end - res->start); 681 release_mem_region(res->start, res->end - res->start + 1);
686 682
687 return 0; 683 return 0;
688} 684}
diff --git a/drivers/ide/pci/it821x.c b/drivers/ide/pci/it821x.c
index 1597f0cc1bf1..d8a167451fd6 100644
--- a/drivers/ide/pci/it821x.c
+++ b/drivers/ide/pci/it821x.c
@@ -667,7 +667,7 @@ static int __init it821x_ide_init(void)
667module_init(it821x_ide_init); 667module_init(it821x_ide_init);
668 668
669module_param_named(noraid, it8212_noraid, int, S_IRUGO); 669module_param_named(noraid, it8212_noraid, int, S_IRUGO);
670MODULE_PARM_DESC(it8212_noraid, "Force card into bypass mode"); 670MODULE_PARM_DESC(noraid, "Force card into bypass mode");
671 671
672MODULE_AUTHOR("Alan Cox"); 672MODULE_AUTHOR("Alan Cox");
673MODULE_DESCRIPTION("PCI driver module for the ITE 821x"); 673MODULE_DESCRIPTION("PCI driver module for the ITE 821x");
diff --git a/drivers/ide/pci/siimage.c b/drivers/ide/pci/siimage.c
index cc4be9621bc0..8d624afe8529 100644
--- a/drivers/ide/pci/siimage.c
+++ b/drivers/ide/pci/siimage.c
@@ -492,7 +492,7 @@ static void proc_reports_siimage (struct pci_dev *dev, u8 clocking, const char *
492 492
493static unsigned int setup_mmio_siimage (struct pci_dev *dev, const char *name) 493static unsigned int setup_mmio_siimage (struct pci_dev *dev, const char *name)
494{ 494{
495 unsigned long bar5 = pci_resource_start(dev, 5); 495 resource_size_t bar5 = pci_resource_start(dev, 5);
496 unsigned long barsize = pci_resource_len(dev, 5); 496 unsigned long barsize = pci_resource_len(dev, 5);
497 u8 tmpbyte = 0; 497 u8 tmpbyte = 0;
498 void __iomem *ioaddr; 498 void __iomem *ioaddr;
diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c
index b4423a471f02..8dd3942f3022 100644
--- a/drivers/input/mouse/appletouch.c
+++ b/drivers/input/mouse/appletouch.c
@@ -62,6 +62,10 @@
62#define GEYSER4_ISO_PRODUCT_ID 0x021B 62#define GEYSER4_ISO_PRODUCT_ID 0x021B
63#define GEYSER4_JIS_PRODUCT_ID 0x021C 63#define GEYSER4_JIS_PRODUCT_ID 0x021C
64 64
65#define GEYSER4_HF_ANSI_PRODUCT_ID 0x0229
66#define GEYSER4_HF_ISO_PRODUCT_ID 0x022A
67#define GEYSER4_HF_JIS_PRODUCT_ID 0x022B
68
65#define ATP_DEVICE(prod) \ 69#define ATP_DEVICE(prod) \
66 .match_flags = USB_DEVICE_ID_MATCH_DEVICE | \ 70 .match_flags = USB_DEVICE_ID_MATCH_DEVICE | \
67 USB_DEVICE_ID_MATCH_INT_CLASS | \ 71 USB_DEVICE_ID_MATCH_INT_CLASS | \
@@ -93,6 +97,10 @@ static struct usb_device_id atp_table [] = {
93 { ATP_DEVICE(GEYSER4_ISO_PRODUCT_ID) }, 97 { ATP_DEVICE(GEYSER4_ISO_PRODUCT_ID) },
94 { ATP_DEVICE(GEYSER4_JIS_PRODUCT_ID) }, 98 { ATP_DEVICE(GEYSER4_JIS_PRODUCT_ID) },
95 99
100 { ATP_DEVICE(GEYSER4_HF_ANSI_PRODUCT_ID) },
101 { ATP_DEVICE(GEYSER4_HF_ISO_PRODUCT_ID) },
102 { ATP_DEVICE(GEYSER4_HF_JIS_PRODUCT_ID) },
103
96 /* Terminating entry */ 104 /* Terminating entry */
97 { } 105 { }
98}; 106};
@@ -217,7 +225,10 @@ static inline int atp_is_geyser_3(struct atp *dev)
217 (productId == GEYSER3_JIS_PRODUCT_ID) || 225 (productId == GEYSER3_JIS_PRODUCT_ID) ||
218 (productId == GEYSER4_ANSI_PRODUCT_ID) || 226 (productId == GEYSER4_ANSI_PRODUCT_ID) ||
219 (productId == GEYSER4_ISO_PRODUCT_ID) || 227 (productId == GEYSER4_ISO_PRODUCT_ID) ||
220 (productId == GEYSER4_JIS_PRODUCT_ID); 228 (productId == GEYSER4_JIS_PRODUCT_ID) ||
229 (productId == GEYSER4_HF_ANSI_PRODUCT_ID) ||
230 (productId == GEYSER4_HF_ISO_PRODUCT_ID) ||
231 (productId == GEYSER4_HF_JIS_PRODUCT_ID);
221} 232}
222 233
223/* 234/*
diff --git a/drivers/leds/leds-ams-delta.c b/drivers/leds/leds-ams-delta.c
index 9e3077463d84..c37bb0d5a0c5 100644
--- a/drivers/leds/leds-ams-delta.c
+++ b/drivers/leds/leds-ams-delta.c
@@ -140,6 +140,7 @@ static struct platform_driver ams_delta_led_driver = {
140 .resume = ams_delta_led_resume, 140 .resume = ams_delta_led_resume,
141 .driver = { 141 .driver = {
142 .name = "ams-delta-led", 142 .name = "ams-delta-led",
143 .owner = THIS_MODULE,
143 }, 144 },
144}; 145};
145 146
@@ -159,3 +160,4 @@ module_exit(ams_delta_led_exit);
159MODULE_AUTHOR("Jonathan McDowell <noodles@earth.li>"); 160MODULE_AUTHOR("Jonathan McDowell <noodles@earth.li>");
160MODULE_DESCRIPTION("Amstrad Delta LED driver"); 161MODULE_DESCRIPTION("Amstrad Delta LED driver");
161MODULE_LICENSE("GPL"); 162MODULE_LICENSE("GPL");
163MODULE_ALIAS("platform:ams-delta-led");
diff --git a/drivers/leds/leds-atmel-pwm.c b/drivers/leds/leds-atmel-pwm.c
index af61f55571fe..28db6c1444ed 100644
--- a/drivers/leds/leds-atmel-pwm.c
+++ b/drivers/leds/leds-atmel-pwm.c
@@ -132,6 +132,9 @@ static int __exit pwmled_remove(struct platform_device *pdev)
132 return 0; 132 return 0;
133} 133}
134 134
135/* work with hotplug and coldplug */
136MODULE_ALIAS("platform:leds-atmel-pwm");
137
135static struct platform_driver pwmled_driver = { 138static struct platform_driver pwmled_driver = {
136 .driver = { 139 .driver = {
137 .name = "leds-atmel-pwm", 140 .name = "leds-atmel-pwm",
diff --git a/drivers/leds/leds-clevo-mail.c b/drivers/leds/leds-clevo-mail.c
index 6c3d33b8e383..5750b08b601f 100644
--- a/drivers/leds/leds-clevo-mail.c
+++ b/drivers/leds/leds-clevo-mail.c
@@ -170,6 +170,7 @@ static struct platform_driver clevo_mail_led_driver = {
170 .resume = clevo_mail_led_resume, 170 .resume = clevo_mail_led_resume,
171 .driver = { 171 .driver = {
172 .name = KBUILD_MODNAME, 172 .name = KBUILD_MODNAME,
173 .owner = THIS_MODULE,
173 }, 174 },
174}; 175};
175 176
diff --git a/drivers/leds/leds-cm-x270.c b/drivers/leds/leds-cm-x270.c
index 9aebef02a974..accc7eddb788 100644
--- a/drivers/leds/leds-cm-x270.c
+++ b/drivers/leds/leds-cm-x270.c
@@ -101,6 +101,7 @@ static struct platform_driver cmx270led_driver = {
101#endif 101#endif
102 .driver = { 102 .driver = {
103 .name = "cm-x270-led", 103 .name = "cm-x270-led",
104 .owner = THIS_MODULE,
104 }, 105 },
105}; 106};
106 107
@@ -120,3 +121,4 @@ module_exit(cmx270led_exit);
120MODULE_AUTHOR("Mike Rapoport <mike@compulab.co.il>"); 121MODULE_AUTHOR("Mike Rapoport <mike@compulab.co.il>");
121MODULE_DESCRIPTION("CM-x270 LED driver"); 122MODULE_DESCRIPTION("CM-x270 LED driver");
122MODULE_LICENSE("GPL"); 123MODULE_LICENSE("GPL");
124MODULE_ALIAS("platform:cm-x270-led");
diff --git a/drivers/leds/leds-cobalt-qube.c b/drivers/leds/leds-cobalt-qube.c
index d2b54b53d80a..096881a11b1a 100644
--- a/drivers/leds/leds-cobalt-qube.c
+++ b/drivers/leds/leds-cobalt-qube.c
@@ -75,6 +75,9 @@ static int __devexit cobalt_qube_led_remove(struct platform_device *pdev)
75 return 0; 75 return 0;
76} 76}
77 77
78/* work with hotplug and coldplug */
79MODULE_ALIAS("platform:cobalt-qube-leds");
80
78static struct platform_driver cobalt_qube_led_driver = { 81static struct platform_driver cobalt_qube_led_driver = {
79 .probe = cobalt_qube_led_probe, 82 .probe = cobalt_qube_led_probe,
80 .remove = __devexit_p(cobalt_qube_led_remove), 83 .remove = __devexit_p(cobalt_qube_led_remove),
diff --git a/drivers/leds/leds-corgi.c b/drivers/leds/leds-corgi.c
index e45f6c4b59ba..29e931f89f9c 100644
--- a/drivers/leds/leds-corgi.c
+++ b/drivers/leds/leds-corgi.c
@@ -99,6 +99,7 @@ static struct platform_driver corgiled_driver = {
99#endif 99#endif
100 .driver = { 100 .driver = {
101 .name = "corgi-led", 101 .name = "corgi-led",
102 .owner = THIS_MODULE,
102 }, 103 },
103}; 104};
104 105
@@ -118,3 +119,4 @@ module_exit(corgiled_exit);
118MODULE_AUTHOR("Richard Purdie <rpurdie@openedhand.com>"); 119MODULE_AUTHOR("Richard Purdie <rpurdie@openedhand.com>");
119MODULE_DESCRIPTION("Corgi LED driver"); 120MODULE_DESCRIPTION("Corgi LED driver");
120MODULE_LICENSE("GPL"); 121MODULE_LICENSE("GPL");
122MODULE_ALIAS("platform:corgi-led");
diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c
index 4c0b05852cb6..1aae8b332134 100644
--- a/drivers/leds/leds-gpio.c
+++ b/drivers/leds/leds-gpio.c
@@ -199,3 +199,4 @@ module_exit(gpio_led_exit);
199MODULE_AUTHOR("Raphael Assenat <raph@8d.com>"); 199MODULE_AUTHOR("Raphael Assenat <raph@8d.com>");
200MODULE_DESCRIPTION("GPIO LED driver"); 200MODULE_DESCRIPTION("GPIO LED driver");
201MODULE_LICENSE("GPL"); 201MODULE_LICENSE("GPL");
202MODULE_ALIAS("platform:leds-gpio");
diff --git a/drivers/leds/leds-h1940.c b/drivers/leds/leds-h1940.c
index 677c99325be5..6e51c9b61027 100644
--- a/drivers/leds/leds-h1940.c
+++ b/drivers/leds/leds-h1940.c
@@ -139,6 +139,7 @@ static int h1940leds_remove(struct platform_device *pdev)
139static struct platform_driver h1940leds_driver = { 139static struct platform_driver h1940leds_driver = {
140 .driver = { 140 .driver = {
141 .name = "h1940-leds", 141 .name = "h1940-leds",
142 .owner = THIS_MODULE,
142 }, 143 },
143 .probe = h1940leds_probe, 144 .probe = h1940leds_probe,
144 .remove = h1940leds_remove, 145 .remove = h1940leds_remove,
@@ -161,3 +162,4 @@ module_exit(h1940leds_exit);
161MODULE_AUTHOR("Arnaud Patard <arnaud.patard@rtp-net.org>"); 162MODULE_AUTHOR("Arnaud Patard <arnaud.patard@rtp-net.org>");
162MODULE_DESCRIPTION("LED driver for the iPAQ H1940"); 163MODULE_DESCRIPTION("LED driver for the iPAQ H1940");
163MODULE_LICENSE("GPL"); 164MODULE_LICENSE("GPL");
165MODULE_ALIAS("platform:h1940-leds");
diff --git a/drivers/leds/leds-hp6xx.c b/drivers/leds/leds-hp6xx.c
index 82d4ec384797..870f5a3789e8 100644
--- a/drivers/leds/leds-hp6xx.c
+++ b/drivers/leds/leds-hp6xx.c
@@ -90,6 +90,9 @@ static int hp6xxled_remove(struct platform_device *pdev)
90 return 0; 90 return 0;
91} 91}
92 92
93/* work with hotplug and coldplug */
94MODULE_ALIAS("platform:hp6xx-led");
95
93static struct platform_driver hp6xxled_driver = { 96static struct platform_driver hp6xxled_driver = {
94 .probe = hp6xxled_probe, 97 .probe = hp6xxled_probe,
95 .remove = hp6xxled_remove, 98 .remove = hp6xxled_remove,
@@ -99,6 +102,7 @@ static struct platform_driver hp6xxled_driver = {
99#endif 102#endif
100 .driver = { 103 .driver = {
101 .name = "hp6xx-led", 104 .name = "hp6xx-led",
105 .owner = THIS_MODULE,
102 }, 106 },
103}; 107};
104 108
diff --git a/drivers/leds/leds-s3c24xx.c b/drivers/leds/leds-s3c24xx.c
index 0fd640751294..0d10e119d8f5 100644
--- a/drivers/leds/leds-s3c24xx.c
+++ b/drivers/leds/leds-s3c24xx.c
@@ -160,3 +160,4 @@ module_exit(s3c24xx_led_exit);
160MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>"); 160MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>");
161MODULE_DESCRIPTION("S3C24XX LED driver"); 161MODULE_DESCRIPTION("S3C24XX LED driver");
162MODULE_LICENSE("GPL"); 162MODULE_LICENSE("GPL");
163MODULE_ALIAS("platform:s3c24xx_led");
diff --git a/drivers/leds/leds-spitz.c b/drivers/leds/leds-spitz.c
index 93e1012b17e6..87007cc362c1 100644
--- a/drivers/leds/leds-spitz.c
+++ b/drivers/leds/leds-spitz.c
@@ -105,6 +105,7 @@ static struct platform_driver spitzled_driver = {
105#endif 105#endif
106 .driver = { 106 .driver = {
107 .name = "spitz-led", 107 .name = "spitz-led",
108 .owner = THIS_MODULE,
108 }, 109 },
109}; 110};
110 111
@@ -124,3 +125,4 @@ module_exit(spitzled_exit);
124MODULE_AUTHOR("Richard Purdie <rpurdie@openedhand.com>"); 125MODULE_AUTHOR("Richard Purdie <rpurdie@openedhand.com>");
125MODULE_DESCRIPTION("Spitz LED driver"); 126MODULE_DESCRIPTION("Spitz LED driver");
126MODULE_LICENSE("GPL"); 127MODULE_LICENSE("GPL");
128MODULE_ALIAS("platform:spitz-led");
diff --git a/drivers/leds/leds-tosa.c b/drivers/leds/leds-tosa.c
index 9e0a188fbb0a..7ebecc41a9be 100644
--- a/drivers/leds/leds-tosa.c
+++ b/drivers/leds/leds-tosa.c
@@ -109,6 +109,7 @@ static struct platform_driver tosaled_driver = {
109 .resume = tosaled_resume, 109 .resume = tosaled_resume,
110 .driver = { 110 .driver = {
111 .name = "tosa-led", 111 .name = "tosa-led",
112 .owner = THIS_MODULE,
112 }, 113 },
113}; 114};
114 115
@@ -128,3 +129,4 @@ module_exit(tosaled_exit);
128MODULE_AUTHOR("Dirk Opfer <Dirk@Opfer-Online.de>"); 129MODULE_AUTHOR("Dirk Opfer <Dirk@Opfer-Online.de>");
129MODULE_DESCRIPTION("Tosa LED driver"); 130MODULE_DESCRIPTION("Tosa LED driver");
130MODULE_LICENSE("GPL"); 131MODULE_LICENSE("GPL");
132MODULE_ALIAS("platform:tosa-led");
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index c574cf5efb5c..b162b839a662 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -2348,25 +2348,15 @@ static void handle_issuing_new_write_requests6(raid5_conf_t *conf,
2348static void handle_parity_checks5(raid5_conf_t *conf, struct stripe_head *sh, 2348static void handle_parity_checks5(raid5_conf_t *conf, struct stripe_head *sh,
2349 struct stripe_head_state *s, int disks) 2349 struct stripe_head_state *s, int disks)
2350{ 2350{
2351 int canceled_check = 0;
2352
2351 set_bit(STRIPE_HANDLE, &sh->state); 2353 set_bit(STRIPE_HANDLE, &sh->state);
2352 /* Take one of the following actions:
2353 * 1/ start a check parity operation if (uptodate == disks)
2354 * 2/ finish a check parity operation and act on the result
2355 * 3/ skip to the writeback section if we previously
2356 * initiated a recovery operation
2357 */
2358 if (s->failed == 0 &&
2359 !test_bit(STRIPE_OP_MOD_REPAIR_PD, &sh->ops.pending)) {
2360 if (!test_and_set_bit(STRIPE_OP_CHECK, &sh->ops.pending)) {
2361 BUG_ON(s->uptodate != disks);
2362 clear_bit(R5_UPTODATE, &sh->dev[sh->pd_idx].flags);
2363 sh->ops.count++;
2364 s->uptodate--;
2365 } else if (
2366 test_and_clear_bit(STRIPE_OP_CHECK, &sh->ops.complete)) {
2367 clear_bit(STRIPE_OP_CHECK, &sh->ops.ack);
2368 clear_bit(STRIPE_OP_CHECK, &sh->ops.pending);
2369 2354
2355 /* complete a check operation */
2356 if (test_and_clear_bit(STRIPE_OP_CHECK, &sh->ops.complete)) {
2357 clear_bit(STRIPE_OP_CHECK, &sh->ops.ack);
2358 clear_bit(STRIPE_OP_CHECK, &sh->ops.pending);
2359 if (s->failed == 0) {
2370 if (sh->ops.zero_sum_result == 0) 2360 if (sh->ops.zero_sum_result == 0)
2371 /* parity is correct (on disc, 2361 /* parity is correct (on disc,
2372 * not in buffer any more) 2362 * not in buffer any more)
@@ -2391,7 +2381,8 @@ static void handle_parity_checks5(raid5_conf_t *conf, struct stripe_head *sh,
2391 s->uptodate++; 2381 s->uptodate++;
2392 } 2382 }
2393 } 2383 }
2394 } 2384 } else
2385 canceled_check = 1; /* STRIPE_INSYNC is not set */
2395 } 2386 }
2396 2387
2397 /* check if we can clear a parity disk reconstruct */ 2388 /* check if we can clear a parity disk reconstruct */
@@ -2404,12 +2395,28 @@ static void handle_parity_checks5(raid5_conf_t *conf, struct stripe_head *sh,
2404 clear_bit(STRIPE_OP_COMPUTE_BLK, &sh->ops.pending); 2395 clear_bit(STRIPE_OP_COMPUTE_BLK, &sh->ops.pending);
2405 } 2396 }
2406 2397
2398 /* start a new check operation if there are no failures, the stripe is
2399 * not insync, and a repair is not in flight
2400 */
2401 if (s->failed == 0 &&
2402 !test_bit(STRIPE_INSYNC, &sh->state) &&
2403 !test_bit(STRIPE_OP_MOD_REPAIR_PD, &sh->ops.pending)) {
2404 if (!test_and_set_bit(STRIPE_OP_CHECK, &sh->ops.pending)) {
2405 BUG_ON(s->uptodate != disks);
2406 clear_bit(R5_UPTODATE, &sh->dev[sh->pd_idx].flags);
2407 sh->ops.count++;
2408 s->uptodate--;
2409 }
2410 }
2411
2407 /* Wait for check parity and compute block operations to complete 2412 /* Wait for check parity and compute block operations to complete
2408 * before write-back 2413 * before write-back. If a failure occurred while the check operation
2414 * was in flight we need to cycle this stripe through handle_stripe
2415 * since the parity block may not be uptodate
2409 */ 2416 */
2410 if (!test_bit(STRIPE_INSYNC, &sh->state) && 2417 if (!canceled_check && !test_bit(STRIPE_INSYNC, &sh->state) &&
2411 !test_bit(STRIPE_OP_CHECK, &sh->ops.pending) && 2418 !test_bit(STRIPE_OP_CHECK, &sh->ops.pending) &&
2412 !test_bit(STRIPE_OP_COMPUTE_BLK, &sh->ops.pending)) { 2419 !test_bit(STRIPE_OP_COMPUTE_BLK, &sh->ops.pending)) {
2413 struct r5dev *dev; 2420 struct r5dev *dev;
2414 /* either failed parity check, or recovery is happening */ 2421 /* either failed parity check, or recovery is happening */
2415 if (s->failed == 0) 2422 if (s->failed == 0)
diff --git a/drivers/media/Makefile b/drivers/media/Makefile
index 8cf91353b56a..7b8bb6949f5e 100644
--- a/drivers/media/Makefile
+++ b/drivers/media/Makefile
@@ -6,3 +6,6 @@ obj-y := common/
6obj-y += video/ 6obj-y += video/
7obj-$(CONFIG_VIDEO_DEV) += radio/ 7obj-$(CONFIG_VIDEO_DEV) += radio/
8obj-$(CONFIG_DVB_CORE) += dvb/ 8obj-$(CONFIG_DVB_CORE) += dvb/
9ifeq ($(CONFIG_DVB_CORE),)
10 obj-$(CONFIG_VIDEO_TUNER) += dvb/frontends/
11endif
diff --git a/drivers/media/dvb/frontends/s5h1409.c b/drivers/media/dvb/frontends/s5h1409.c
index 819433485d3b..1a4d8319773c 100644
--- a/drivers/media/dvb/frontends/s5h1409.c
+++ b/drivers/media/dvb/frontends/s5h1409.c
@@ -445,7 +445,7 @@ static int s5h1409_set_gpio(struct dvb_frontend* fe, int enable)
445 s5h1409_readreg(state, 0xe3) | 0x1100); 445 s5h1409_readreg(state, 0xe3) | 0x1100);
446 else 446 else
447 return s5h1409_writereg(state, 0xe3, 447 return s5h1409_writereg(state, 0xe3,
448 s5h1409_readreg(state, 0xe3) & 0xeeff); 448 s5h1409_readreg(state, 0xe3) & 0xfeff);
449} 449}
450 450
451static int s5h1409_sleep(struct dvb_frontend* fe, int enable) 451static int s5h1409_sleep(struct dvb_frontend* fe, int enable)
diff --git a/drivers/media/video/bt8xx/bt832.c b/drivers/media/video/bt8xx/bt832.c
index a51876137880..f92f06dec0d0 100644
--- a/drivers/media/video/bt8xx/bt832.c
+++ b/drivers/media/video/bt8xx/bt832.c
@@ -97,6 +97,11 @@ int bt832_init(struct i2c_client *i2c_client_s)
97 int rc; 97 int rc;
98 98
99 buf=kmalloc(65,GFP_KERNEL); 99 buf=kmalloc(65,GFP_KERNEL);
100 if (!buf) {
101 v4l_err(&t->client,
102 "Unable to allocate memory. Detaching.\n");
103 return 0;
104 }
100 bt832_hexdump(i2c_client_s,buf); 105 bt832_hexdump(i2c_client_s,buf);
101 106
102 if(buf[0x40] != 0x31) { 107 if(buf[0x40] != 0x31) {
@@ -211,7 +216,12 @@ bt832_command(struct i2c_client *client, unsigned int cmd, void *arg)
211 switch (cmd) { 216 switch (cmd) {
212 case BT832_HEXDUMP: { 217 case BT832_HEXDUMP: {
213 unsigned char *buf; 218 unsigned char *buf;
214 buf=kmalloc(65,GFP_KERNEL); 219 buf = kmalloc(65, GFP_KERNEL);
220 if (!buf) {
221 v4l_err(&t->client,
222 "Unable to allocate memory\n");
223 break;
224 }
215 bt832_hexdump(&t->client,buf); 225 bt832_hexdump(&t->client,buf);
216 kfree(buf); 226 kfree(buf);
217 } 227 }
diff --git a/drivers/media/video/pvrusb2/pvrusb2-devattr.c b/drivers/media/video/pvrusb2/pvrusb2-devattr.c
index 4df6d6d936fc..fe9991c10cf4 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-devattr.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-devattr.c
@@ -155,6 +155,41 @@ static const struct pvr2_device_desc pvr2_device_onair_usb2 = {
155 155
156 156
157/*------------------------------------------------------------------------*/ 157/*------------------------------------------------------------------------*/
158/* Hauppauge PVR-USB2 Model 73xxx */
159
160static const char *pvr2_client_73xxx[] = {
161 "cx25840",
162 "tuner",
163};
164
165static const char *pvr2_fw1_names_73xxx[] = {
166 "v4l-pvrusb2-73xxx-01.fw",
167};
168
169static const struct pvr2_device_desc pvr2_device_73xxx = {
170 .description = "WinTV PVR USB2 Model Category 73xxxx",
171 .shortname = "73xxx",
172 .client_modules.lst = pvr2_client_73xxx,
173 .client_modules.cnt = ARRAY_SIZE(pvr2_client_73xxx),
174 .fx2_firmware.lst = pvr2_fw1_names_73xxx,
175 .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_73xxx),
176 .flag_has_cx25840 = !0,
177 .flag_has_hauppauge_rom = !0,
178#if 0
179 .flag_has_analogtuner = !0,
180 .flag_has_composite = !0,
181 .flag_has_svideo = !0,
182 .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
183 .digital_control_scheme = PVR2_DIGITAL_SCHEME_HAUPPAUGE,
184 .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE,
185#else
186 .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
187#endif
188};
189
190
191
192/*------------------------------------------------------------------------*/
158/* Hauppauge PVR-USB2 Model 75xxx */ 193/* Hauppauge PVR-USB2 Model 75xxx */
159 194
160static const char *pvr2_client_75xxx[] = { 195static const char *pvr2_client_75xxx[] = {
@@ -198,8 +233,12 @@ struct usb_device_id pvr2_device_table[] = {
198 { USB_DEVICE(0x11ba, 0x1001), 233 { USB_DEVICE(0x11ba, 0x1001),
199 .driver_info = (kernel_ulong_t)&pvr2_device_onair_usb2}, 234 .driver_info = (kernel_ulong_t)&pvr2_device_onair_usb2},
200#endif 235#endif
236 { USB_DEVICE(0x2040, 0x7300),
237 .driver_info = (kernel_ulong_t)&pvr2_device_73xxx},
201 { USB_DEVICE(0x2040, 0x7500), 238 { USB_DEVICE(0x2040, 0x7500),
202 .driver_info = (kernel_ulong_t)&pvr2_device_75xxx}, 239 .driver_info = (kernel_ulong_t)&pvr2_device_75xxx},
240 { USB_DEVICE(0x2040, 0x7501),
241 .driver_info = (kernel_ulong_t)&pvr2_device_75xxx},
203 { } 242 { }
204}; 243};
205 244
diff --git a/drivers/misc/atmel-ssc.c b/drivers/misc/atmel-ssc.c
index 058ccac700d0..e171650766ce 100644
--- a/drivers/misc/atmel-ssc.c
+++ b/drivers/misc/atmel-ssc.c
@@ -154,6 +154,7 @@ static struct platform_driver ssc_driver = {
154 .remove = __devexit_p(ssc_remove), 154 .remove = __devexit_p(ssc_remove),
155 .driver = { 155 .driver = {
156 .name = "ssc", 156 .name = "ssc",
157 .owner = THIS_MODULE,
157 }, 158 },
158}; 159};
159 160
@@ -172,3 +173,4 @@ module_exit(ssc_exit);
172MODULE_AUTHOR("Hans-Christian Egtvedt <hcegtvedt@atmel.com>"); 173MODULE_AUTHOR("Hans-Christian Egtvedt <hcegtvedt@atmel.com>");
173MODULE_DESCRIPTION("SSC driver for Atmel AVR32 and AT91"); 174MODULE_DESCRIPTION("SSC driver for Atmel AVR32 and AT91");
174MODULE_LICENSE("GPL"); 175MODULE_LICENSE("GPL");
176MODULE_ALIAS("platform:ssc");
diff --git a/drivers/misc/atmel_pwm.c b/drivers/misc/atmel_pwm.c
index f8d3b9a76cbd..0d5ce03cdff2 100644
--- a/drivers/misc/atmel_pwm.c
+++ b/drivers/misc/atmel_pwm.c
@@ -407,3 +407,4 @@ module_exit(pwm_exit);
407 407
408MODULE_DESCRIPTION("Driver for AT32/AT91 PWM module"); 408MODULE_DESCRIPTION("Driver for AT32/AT91 PWM module");
409MODULE_LICENSE("GPL"); 409MODULE_LICENSE("GPL");
410MODULE_ALIAS("platform:atmel_pwm");
diff --git a/drivers/misc/hdpuftrs/hdpu_cpustate.c b/drivers/misc/hdpuftrs/hdpu_cpustate.c
index aa8ce7abe922..302e92418bbe 100644
--- a/drivers/misc/hdpuftrs/hdpu_cpustate.c
+++ b/drivers/misc/hdpuftrs/hdpu_cpustate.c
@@ -164,6 +164,7 @@ static struct platform_driver hdpu_cpustate_driver = {
164 .remove = hdpu_cpustate_remove, 164 .remove = hdpu_cpustate_remove,
165 .driver = { 165 .driver = {
166 .name = HDPU_CPUSTATE_NAME, 166 .name = HDPU_CPUSTATE_NAME,
167 .owner = THIS_MODULE,
167 }, 168 },
168}; 169};
169 170
@@ -248,3 +249,4 @@ module_exit(cpustate_exit);
248 249
249MODULE_AUTHOR("Brian Waite"); 250MODULE_AUTHOR("Brian Waite");
250MODULE_LICENSE("GPL"); 251MODULE_LICENSE("GPL");
252MODULE_ALIAS("platform:" HDPU_CPUSTATE_NAME);
diff --git a/drivers/misc/hdpuftrs/hdpu_nexus.c b/drivers/misc/hdpuftrs/hdpu_nexus.c
index 2887b2147980..2fa36f7a6eb3 100644
--- a/drivers/misc/hdpuftrs/hdpu_nexus.c
+++ b/drivers/misc/hdpuftrs/hdpu_nexus.c
@@ -55,6 +55,7 @@ static struct platform_driver hdpu_nexus_driver = {
55 .remove = hdpu_nexus_remove, 55 .remove = hdpu_nexus_remove,
56 .driver = { 56 .driver = {
57 .name = HDPU_NEXUS_NAME, 57 .name = HDPU_NEXUS_NAME,
58 .owner = THIS_MODULE,
58 }, 59 },
59}; 60};
60 61
@@ -151,3 +152,4 @@ module_exit(nexus_exit);
151 152
152MODULE_AUTHOR("Brian Waite"); 153MODULE_AUTHOR("Brian Waite");
153MODULE_LICENSE("GPL"); 154MODULE_LICENSE("GPL");
155MODULE_ALIAS("platform:" HDPU_NEXUS_NAME);
diff --git a/drivers/mmc/host/at91_mci.c b/drivers/mmc/host/at91_mci.c
index 21acecc9fe3a..a28fc2f68ce2 100644
--- a/drivers/mmc/host/at91_mci.c
+++ b/drivers/mmc/host/at91_mci.c
@@ -1075,3 +1075,4 @@ module_exit(at91_mci_exit);
1075MODULE_DESCRIPTION("AT91 Multimedia Card Interface driver"); 1075MODULE_DESCRIPTION("AT91 Multimedia Card Interface driver");
1076MODULE_AUTHOR("Nick Randell"); 1076MODULE_AUTHOR("Nick Randell");
1077MODULE_LICENSE("GPL"); 1077MODULE_LICENSE("GPL");
1078MODULE_ALIAS("platform:at91_mci");
diff --git a/drivers/mmc/host/au1xmmc.c b/drivers/mmc/host/au1xmmc.c
index c3926eb3bf43..cc5f7bc546af 100644
--- a/drivers/mmc/host/au1xmmc.c
+++ b/drivers/mmc/host/au1xmmc.c
@@ -998,6 +998,7 @@ static struct platform_driver au1xmmc_driver = {
998 .resume = NULL, 998 .resume = NULL,
999 .driver = { 999 .driver = {
1000 .name = DRIVER_NAME, 1000 .name = DRIVER_NAME,
1001 .owner = THIS_MODULE,
1001 }, 1002 },
1002}; 1003};
1003 1004
@@ -1018,5 +1019,6 @@ module_exit(au1xmmc_exit);
1018MODULE_AUTHOR("Advanced Micro Devices, Inc"); 1019MODULE_AUTHOR("Advanced Micro Devices, Inc");
1019MODULE_DESCRIPTION("MMC/SD driver for the Alchemy Au1XXX"); 1020MODULE_DESCRIPTION("MMC/SD driver for the Alchemy Au1XXX");
1020MODULE_LICENSE("GPL"); 1021MODULE_LICENSE("GPL");
1022MODULE_ALIAS("platform:au1xxx-mmc");
1021#endif 1023#endif
1022 1024
diff --git a/drivers/mmc/host/imxmmc.c b/drivers/mmc/host/imxmmc.c
index f2070a19cfa7..95f33e87a99c 100644
--- a/drivers/mmc/host/imxmmc.c
+++ b/drivers/mmc/host/imxmmc.c
@@ -1128,6 +1128,7 @@ static struct platform_driver imxmci_driver = {
1128 .resume = imxmci_resume, 1128 .resume = imxmci_resume,
1129 .driver = { 1129 .driver = {
1130 .name = DRIVER_NAME, 1130 .name = DRIVER_NAME,
1131 .owner = THIS_MODULE,
1131 } 1132 }
1132}; 1133};
1133 1134
@@ -1147,3 +1148,4 @@ module_exit(imxmci_exit);
1147MODULE_DESCRIPTION("i.MX Multimedia Card Interface Driver"); 1148MODULE_DESCRIPTION("i.MX Multimedia Card Interface Driver");
1148MODULE_AUTHOR("Sascha Hauer, Pengutronix"); 1149MODULE_AUTHOR("Sascha Hauer, Pengutronix");
1149MODULE_LICENSE("GPL"); 1150MODULE_LICENSE("GPL");
1151MODULE_ALIAS("platform:imx-mmc");
diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
index c9dfeb15b487..90c358b57d1c 100644
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -1255,6 +1255,7 @@ static struct platform_driver mmc_omap_driver = {
1255 .resume = mmc_omap_resume, 1255 .resume = mmc_omap_resume,
1256 .driver = { 1256 .driver = {
1257 .name = DRIVER_NAME, 1257 .name = DRIVER_NAME,
1258 .owner = THIS_MODULE,
1258 }, 1259 },
1259}; 1260};
1260 1261
@@ -1273,5 +1274,5 @@ module_exit(mmc_omap_exit);
1273 1274
1274MODULE_DESCRIPTION("OMAP Multimedia Card driver"); 1275MODULE_DESCRIPTION("OMAP Multimedia Card driver");
1275MODULE_LICENSE("GPL"); 1276MODULE_LICENSE("GPL");
1276MODULE_ALIAS(DRIVER_NAME); 1277MODULE_ALIAS("platform:" DRIVER_NAME);
1277MODULE_AUTHOR("Juha Yrjölä"); 1278MODULE_AUTHOR("Juha Yrjölä");
diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c
index 1ea8482037bb..65210fca37ed 100644
--- a/drivers/mmc/host/pxamci.c
+++ b/drivers/mmc/host/pxamci.c
@@ -693,6 +693,7 @@ static struct platform_driver pxamci_driver = {
693 .resume = pxamci_resume, 693 .resume = pxamci_resume,
694 .driver = { 694 .driver = {
695 .name = DRIVER_NAME, 695 .name = DRIVER_NAME,
696 .owner = THIS_MODULE,
696 }, 697 },
697}; 698};
698 699
@@ -711,3 +712,4 @@ module_exit(pxamci_exit);
711 712
712MODULE_DESCRIPTION("PXA Multimedia Card Interface Driver"); 713MODULE_DESCRIPTION("PXA Multimedia Card Interface Driver");
713MODULE_LICENSE("GPL"); 714MODULE_LICENSE("GPL");
715MODULE_ALIAS("platform:pxa2xx-mci");
diff --git a/drivers/mmc/host/wbsd.c b/drivers/mmc/host/wbsd.c
index 4d5f37421874..be624a049c67 100644
--- a/drivers/mmc/host/wbsd.c
+++ b/drivers/mmc/host/wbsd.c
@@ -1948,6 +1948,7 @@ static struct platform_driver wbsd_driver = {
1948 .resume = wbsd_platform_resume, 1948 .resume = wbsd_platform_resume,
1949 .driver = { 1949 .driver = {
1950 .name = DRIVER_NAME, 1950 .name = DRIVER_NAME,
1951 .owner = THIS_MODULE,
1951 }, 1952 },
1952}; 1953};
1953 1954
diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c
index 47794d23a42e..0080452531d6 100644
--- a/drivers/mtd/chips/cfi_cmdset_0001.c
+++ b/drivers/mtd/chips/cfi_cmdset_0001.c
@@ -718,7 +718,7 @@ static int chip_ready (struct map_info *map, struct flchip *chip, unsigned long
718 /* Someone else might have been playing with it. */ 718 /* Someone else might have been playing with it. */
719 return -EAGAIN; 719 return -EAGAIN;
720 } 720 }
721 721 /* Fall through */
722 case FL_READY: 722 case FL_READY:
723 case FL_CFI_QUERY: 723 case FL_CFI_QUERY:
724 case FL_JEDEC_QUERY: 724 case FL_JEDEC_QUERY:
@@ -778,14 +778,14 @@ static int chip_ready (struct map_info *map, struct flchip *chip, unsigned long
778 chip->state = FL_READY; 778 chip->state = FL_READY;
779 return 0; 779 return 0;
780 780
781 case FL_SHUTDOWN:
782 /* The machine is rebooting now,so no one can get chip anymore */
783 return -EIO;
781 case FL_POINT: 784 case FL_POINT:
782 /* Only if there's no operation suspended... */ 785 /* Only if there's no operation suspended... */
783 if (mode == FL_READY && chip->oldstate == FL_READY) 786 if (mode == FL_READY && chip->oldstate == FL_READY)
784 return 0; 787 return 0;
785 788 /* Fall through */
786 case FL_SHUTDOWN:
787 /* The machine is rebooting now,so no one can get chip anymore */
788 return -EIO;
789 default: 789 default:
790 sleep: 790 sleep:
791 set_current_state(TASK_UNINTERRUPTIBLE); 791 set_current_state(TASK_UNINTERRUPTIBLE);
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c
index d072e87ce4e2..458d477614d6 100644
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
@@ -1763,6 +1763,7 @@ static void cfi_amdstd_sync (struct mtd_info *mtd)
1763 1763
1764 default: 1764 default:
1765 /* Not an idle state */ 1765 /* Not an idle state */
1766 set_current_state(TASK_UNINTERRUPTIBLE);
1766 add_wait_queue(&chip->wq, &wait); 1767 add_wait_queue(&chip->wq, &wait);
1767 1768
1768 spin_unlock(chip->mutex); 1769 spin_unlock(chip->mutex);
diff --git a/drivers/mtd/chips/cfi_cmdset_0020.c b/drivers/mtd/chips/cfi_cmdset_0020.c
index b344ff858b2d..492e2ab27420 100644
--- a/drivers/mtd/chips/cfi_cmdset_0020.c
+++ b/drivers/mtd/chips/cfi_cmdset_0020.c
@@ -1015,6 +1015,7 @@ static void cfi_staa_sync (struct mtd_info *mtd)
1015 1015
1016 default: 1016 default:
1017 /* Not an idle state */ 1017 /* Not an idle state */
1018 set_current_state(TASK_UNINTERRUPTIBLE);
1018 add_wait_queue(&chip->wq, &wait); 1019 add_wait_queue(&chip->wq, &wait);
1019 1020
1020 spin_unlock_bh(chip->mutex); 1021 spin_unlock_bh(chip->mutex);
diff --git a/drivers/net/b44.c b/drivers/net/b44.c
index 25f1337cd02c..59dce6aa0865 100644
--- a/drivers/net/b44.c
+++ b/drivers/net/b44.c
@@ -148,7 +148,7 @@ static inline void b44_sync_dma_desc_for_device(struct ssb_device *sdev,
148 unsigned long offset, 148 unsigned long offset,
149 enum dma_data_direction dir) 149 enum dma_data_direction dir)
150{ 150{
151 dma_sync_single_range_for_device(sdev->dev, dma_base, 151 dma_sync_single_range_for_device(sdev->dma_dev, dma_base,
152 offset & dma_desc_align_mask, 152 offset & dma_desc_align_mask,
153 dma_desc_sync_size, dir); 153 dma_desc_sync_size, dir);
154} 154}
@@ -158,7 +158,7 @@ static inline void b44_sync_dma_desc_for_cpu(struct ssb_device *sdev,
158 unsigned long offset, 158 unsigned long offset,
159 enum dma_data_direction dir) 159 enum dma_data_direction dir)
160{ 160{
161 dma_sync_single_range_for_cpu(sdev->dev, dma_base, 161 dma_sync_single_range_for_cpu(sdev->dma_dev, dma_base,
162 offset & dma_desc_align_mask, 162 offset & dma_desc_align_mask,
163 dma_desc_sync_size, dir); 163 dma_desc_sync_size, dir);
164} 164}
@@ -613,7 +613,7 @@ static void b44_tx(struct b44 *bp)
613 613
614 BUG_ON(skb == NULL); 614 BUG_ON(skb == NULL);
615 615
616 dma_unmap_single(bp->sdev->dev, 616 dma_unmap_single(bp->sdev->dma_dev,
617 rp->mapping, 617 rp->mapping,
618 skb->len, 618 skb->len,
619 DMA_TO_DEVICE); 619 DMA_TO_DEVICE);
@@ -653,7 +653,7 @@ static int b44_alloc_rx_skb(struct b44 *bp, int src_idx, u32 dest_idx_unmasked)
653 if (skb == NULL) 653 if (skb == NULL)
654 return -ENOMEM; 654 return -ENOMEM;
655 655
656 mapping = dma_map_single(bp->sdev->dev, skb->data, 656 mapping = dma_map_single(bp->sdev->dma_dev, skb->data,
657 RX_PKT_BUF_SZ, 657 RX_PKT_BUF_SZ,
658 DMA_FROM_DEVICE); 658 DMA_FROM_DEVICE);
659 659
@@ -663,19 +663,19 @@ static int b44_alloc_rx_skb(struct b44 *bp, int src_idx, u32 dest_idx_unmasked)
663 mapping + RX_PKT_BUF_SZ > DMA_30BIT_MASK) { 663 mapping + RX_PKT_BUF_SZ > DMA_30BIT_MASK) {
664 /* Sigh... */ 664 /* Sigh... */
665 if (!dma_mapping_error(mapping)) 665 if (!dma_mapping_error(mapping))
666 dma_unmap_single(bp->sdev->dev, mapping, 666 dma_unmap_single(bp->sdev->dma_dev, mapping,
667 RX_PKT_BUF_SZ, DMA_FROM_DEVICE); 667 RX_PKT_BUF_SZ, DMA_FROM_DEVICE);
668 dev_kfree_skb_any(skb); 668 dev_kfree_skb_any(skb);
669 skb = __netdev_alloc_skb(bp->dev, RX_PKT_BUF_SZ, GFP_ATOMIC|GFP_DMA); 669 skb = __netdev_alloc_skb(bp->dev, RX_PKT_BUF_SZ, GFP_ATOMIC|GFP_DMA);
670 if (skb == NULL) 670 if (skb == NULL)
671 return -ENOMEM; 671 return -ENOMEM;
672 mapping = dma_map_single(bp->sdev->dev, skb->data, 672 mapping = dma_map_single(bp->sdev->dma_dev, skb->data,
673 RX_PKT_BUF_SZ, 673 RX_PKT_BUF_SZ,
674 DMA_FROM_DEVICE); 674 DMA_FROM_DEVICE);
675 if (dma_mapping_error(mapping) || 675 if (dma_mapping_error(mapping) ||
676 mapping + RX_PKT_BUF_SZ > DMA_30BIT_MASK) { 676 mapping + RX_PKT_BUF_SZ > DMA_30BIT_MASK) {
677 if (!dma_mapping_error(mapping)) 677 if (!dma_mapping_error(mapping))
678 dma_unmap_single(bp->sdev->dev, mapping, RX_PKT_BUF_SZ,DMA_FROM_DEVICE); 678 dma_unmap_single(bp->sdev->dma_dev, mapping, RX_PKT_BUF_SZ,DMA_FROM_DEVICE);
679 dev_kfree_skb_any(skb); 679 dev_kfree_skb_any(skb);
680 return -ENOMEM; 680 return -ENOMEM;
681 } 681 }
@@ -750,7 +750,7 @@ static void b44_recycle_rx(struct b44 *bp, int src_idx, u32 dest_idx_unmasked)
750 dest_idx * sizeof(dest_desc), 750 dest_idx * sizeof(dest_desc),
751 DMA_BIDIRECTIONAL); 751 DMA_BIDIRECTIONAL);
752 752
753 dma_sync_single_for_device(bp->sdev->dev, le32_to_cpu(src_desc->addr), 753 dma_sync_single_for_device(bp->sdev->dma_dev, le32_to_cpu(src_desc->addr),
754 RX_PKT_BUF_SZ, 754 RX_PKT_BUF_SZ,
755 DMA_FROM_DEVICE); 755 DMA_FROM_DEVICE);
756} 756}
@@ -772,7 +772,7 @@ static int b44_rx(struct b44 *bp, int budget)
772 struct rx_header *rh; 772 struct rx_header *rh;
773 u16 len; 773 u16 len;
774 774
775 dma_sync_single_for_cpu(bp->sdev->dev, map, 775 dma_sync_single_for_cpu(bp->sdev->dma_dev, map,
776 RX_PKT_BUF_SZ, 776 RX_PKT_BUF_SZ,
777 DMA_FROM_DEVICE); 777 DMA_FROM_DEVICE);
778 rh = (struct rx_header *) skb->data; 778 rh = (struct rx_header *) skb->data;
@@ -806,7 +806,7 @@ static int b44_rx(struct b44 *bp, int budget)
806 skb_size = b44_alloc_rx_skb(bp, cons, bp->rx_prod); 806 skb_size = b44_alloc_rx_skb(bp, cons, bp->rx_prod);
807 if (skb_size < 0) 807 if (skb_size < 0)
808 goto drop_it; 808 goto drop_it;
809 dma_unmap_single(bp->sdev->dev, map, 809 dma_unmap_single(bp->sdev->dma_dev, map,
810 skb_size, DMA_FROM_DEVICE); 810 skb_size, DMA_FROM_DEVICE);
811 /* Leave out rx_header */ 811 /* Leave out rx_header */
812 skb_put(skb, len + RX_PKT_OFFSET); 812 skb_put(skb, len + RX_PKT_OFFSET);
@@ -966,24 +966,24 @@ static int b44_start_xmit(struct sk_buff *skb, struct net_device *dev)
966 goto err_out; 966 goto err_out;
967 } 967 }
968 968
969 mapping = dma_map_single(bp->sdev->dev, skb->data, len, DMA_TO_DEVICE); 969 mapping = dma_map_single(bp->sdev->dma_dev, skb->data, len, DMA_TO_DEVICE);
970 if (dma_mapping_error(mapping) || mapping + len > DMA_30BIT_MASK) { 970 if (dma_mapping_error(mapping) || mapping + len > DMA_30BIT_MASK) {
971 struct sk_buff *bounce_skb; 971 struct sk_buff *bounce_skb;
972 972
973 /* Chip can't handle DMA to/from >1GB, use bounce buffer */ 973 /* Chip can't handle DMA to/from >1GB, use bounce buffer */
974 if (!dma_mapping_error(mapping)) 974 if (!dma_mapping_error(mapping))
975 dma_unmap_single(bp->sdev->dev, mapping, len, 975 dma_unmap_single(bp->sdev->dma_dev, mapping, len,
976 DMA_TO_DEVICE); 976 DMA_TO_DEVICE);
977 977
978 bounce_skb = __dev_alloc_skb(len, GFP_ATOMIC | GFP_DMA); 978 bounce_skb = __dev_alloc_skb(len, GFP_ATOMIC | GFP_DMA);
979 if (!bounce_skb) 979 if (!bounce_skb)
980 goto err_out; 980 goto err_out;
981 981
982 mapping = dma_map_single(bp->sdev->dev, bounce_skb->data, 982 mapping = dma_map_single(bp->sdev->dma_dev, bounce_skb->data,
983 len, DMA_TO_DEVICE); 983 len, DMA_TO_DEVICE);
984 if (dma_mapping_error(mapping) || mapping + len > DMA_30BIT_MASK) { 984 if (dma_mapping_error(mapping) || mapping + len > DMA_30BIT_MASK) {
985 if (!dma_mapping_error(mapping)) 985 if (!dma_mapping_error(mapping))
986 dma_unmap_single(bp->sdev->dev, mapping, 986 dma_unmap_single(bp->sdev->dma_dev, mapping,
987 len, DMA_TO_DEVICE); 987 len, DMA_TO_DEVICE);
988 dev_kfree_skb_any(bounce_skb); 988 dev_kfree_skb_any(bounce_skb);
989 goto err_out; 989 goto err_out;
@@ -1082,7 +1082,7 @@ static void b44_free_rings(struct b44 *bp)
1082 1082
1083 if (rp->skb == NULL) 1083 if (rp->skb == NULL)
1084 continue; 1084 continue;
1085 dma_unmap_single(bp->sdev->dev, rp->mapping, RX_PKT_BUF_SZ, 1085 dma_unmap_single(bp->sdev->dma_dev, rp->mapping, RX_PKT_BUF_SZ,
1086 DMA_FROM_DEVICE); 1086 DMA_FROM_DEVICE);
1087 dev_kfree_skb_any(rp->skb); 1087 dev_kfree_skb_any(rp->skb);
1088 rp->skb = NULL; 1088 rp->skb = NULL;
@@ -1094,7 +1094,7 @@ static void b44_free_rings(struct b44 *bp)
1094 1094
1095 if (rp->skb == NULL) 1095 if (rp->skb == NULL)
1096 continue; 1096 continue;
1097 dma_unmap_single(bp->sdev->dev, rp->mapping, rp->skb->len, 1097 dma_unmap_single(bp->sdev->dma_dev, rp->mapping, rp->skb->len,
1098 DMA_TO_DEVICE); 1098 DMA_TO_DEVICE);
1099 dev_kfree_skb_any(rp->skb); 1099 dev_kfree_skb_any(rp->skb);
1100 rp->skb = NULL; 1100 rp->skb = NULL;
@@ -1117,12 +1117,12 @@ static void b44_init_rings(struct b44 *bp)
1117 memset(bp->tx_ring, 0, B44_TX_RING_BYTES); 1117 memset(bp->tx_ring, 0, B44_TX_RING_BYTES);
1118 1118
1119 if (bp->flags & B44_FLAG_RX_RING_HACK) 1119 if (bp->flags & B44_FLAG_RX_RING_HACK)
1120 dma_sync_single_for_device(bp->sdev->dev, bp->rx_ring_dma, 1120 dma_sync_single_for_device(bp->sdev->dma_dev, bp->rx_ring_dma,
1121 DMA_TABLE_BYTES, 1121 DMA_TABLE_BYTES,
1122 DMA_BIDIRECTIONAL); 1122 DMA_BIDIRECTIONAL);
1123 1123
1124 if (bp->flags & B44_FLAG_TX_RING_HACK) 1124 if (bp->flags & B44_FLAG_TX_RING_HACK)
1125 dma_sync_single_for_device(bp->sdev->dev, bp->tx_ring_dma, 1125 dma_sync_single_for_device(bp->sdev->dma_dev, bp->tx_ring_dma,
1126 DMA_TABLE_BYTES, 1126 DMA_TABLE_BYTES,
1127 DMA_TO_DEVICE); 1127 DMA_TO_DEVICE);
1128 1128
@@ -1144,24 +1144,24 @@ static void b44_free_consistent(struct b44 *bp)
1144 bp->tx_buffers = NULL; 1144 bp->tx_buffers = NULL;
1145 if (bp->rx_ring) { 1145 if (bp->rx_ring) {
1146 if (bp->flags & B44_FLAG_RX_RING_HACK) { 1146 if (bp->flags & B44_FLAG_RX_RING_HACK) {
1147 dma_unmap_single(bp->sdev->dev, bp->rx_ring_dma, 1147 dma_unmap_single(bp->sdev->dma_dev, bp->rx_ring_dma,
1148 DMA_TABLE_BYTES, 1148 DMA_TABLE_BYTES,
1149 DMA_BIDIRECTIONAL); 1149 DMA_BIDIRECTIONAL);
1150 kfree(bp->rx_ring); 1150 kfree(bp->rx_ring);
1151 } else 1151 } else
1152 dma_free_coherent(bp->sdev->dev, DMA_TABLE_BYTES, 1152 dma_free_coherent(bp->sdev->dma_dev, DMA_TABLE_BYTES,
1153 bp->rx_ring, bp->rx_ring_dma); 1153 bp->rx_ring, bp->rx_ring_dma);
1154 bp->rx_ring = NULL; 1154 bp->rx_ring = NULL;
1155 bp->flags &= ~B44_FLAG_RX_RING_HACK; 1155 bp->flags &= ~B44_FLAG_RX_RING_HACK;
1156 } 1156 }
1157 if (bp->tx_ring) { 1157 if (bp->tx_ring) {
1158 if (bp->flags & B44_FLAG_TX_RING_HACK) { 1158 if (bp->flags & B44_FLAG_TX_RING_HACK) {
1159 dma_unmap_single(bp->sdev->dev, bp->tx_ring_dma, 1159 dma_unmap_single(bp->sdev->dma_dev, bp->tx_ring_dma,
1160 DMA_TABLE_BYTES, 1160 DMA_TABLE_BYTES,
1161 DMA_TO_DEVICE); 1161 DMA_TO_DEVICE);
1162 kfree(bp->tx_ring); 1162 kfree(bp->tx_ring);
1163 } else 1163 } else
1164 dma_free_coherent(bp->sdev->dev, DMA_TABLE_BYTES, 1164 dma_free_coherent(bp->sdev->dma_dev, DMA_TABLE_BYTES,
1165 bp->tx_ring, bp->tx_ring_dma); 1165 bp->tx_ring, bp->tx_ring_dma);
1166 bp->tx_ring = NULL; 1166 bp->tx_ring = NULL;
1167 bp->flags &= ~B44_FLAG_TX_RING_HACK; 1167 bp->flags &= ~B44_FLAG_TX_RING_HACK;
@@ -1187,7 +1187,7 @@ static int b44_alloc_consistent(struct b44 *bp, gfp_t gfp)
1187 goto out_err; 1187 goto out_err;
1188 1188
1189 size = DMA_TABLE_BYTES; 1189 size = DMA_TABLE_BYTES;
1190 bp->rx_ring = dma_alloc_coherent(bp->sdev->dev, size, &bp->rx_ring_dma, gfp); 1190 bp->rx_ring = dma_alloc_coherent(bp->sdev->dma_dev, size, &bp->rx_ring_dma, gfp);
1191 if (!bp->rx_ring) { 1191 if (!bp->rx_ring) {
1192 /* Allocation may have failed due to pci_alloc_consistent 1192 /* Allocation may have failed due to pci_alloc_consistent
1193 insisting on use of GFP_DMA, which is more restrictive 1193 insisting on use of GFP_DMA, which is more restrictive
@@ -1199,7 +1199,7 @@ static int b44_alloc_consistent(struct b44 *bp, gfp_t gfp)
1199 if (!rx_ring) 1199 if (!rx_ring)
1200 goto out_err; 1200 goto out_err;
1201 1201
1202 rx_ring_dma = dma_map_single(bp->sdev->dev, rx_ring, 1202 rx_ring_dma = dma_map_single(bp->sdev->dma_dev, rx_ring,
1203 DMA_TABLE_BYTES, 1203 DMA_TABLE_BYTES,
1204 DMA_BIDIRECTIONAL); 1204 DMA_BIDIRECTIONAL);
1205 1205
@@ -1214,7 +1214,7 @@ static int b44_alloc_consistent(struct b44 *bp, gfp_t gfp)
1214 bp->flags |= B44_FLAG_RX_RING_HACK; 1214 bp->flags |= B44_FLAG_RX_RING_HACK;
1215 } 1215 }
1216 1216
1217 bp->tx_ring = dma_alloc_coherent(bp->sdev->dev, size, &bp->tx_ring_dma, gfp); 1217 bp->tx_ring = dma_alloc_coherent(bp->sdev->dma_dev, size, &bp->tx_ring_dma, gfp);
1218 if (!bp->tx_ring) { 1218 if (!bp->tx_ring) {
1219 /* Allocation may have failed due to dma_alloc_coherent 1219 /* Allocation may have failed due to dma_alloc_coherent
1220 insisting on use of GFP_DMA, which is more restrictive 1220 insisting on use of GFP_DMA, which is more restrictive
@@ -1226,7 +1226,7 @@ static int b44_alloc_consistent(struct b44 *bp, gfp_t gfp)
1226 if (!tx_ring) 1226 if (!tx_ring)
1227 goto out_err; 1227 goto out_err;
1228 1228
1229 tx_ring_dma = dma_map_single(bp->sdev->dev, tx_ring, 1229 tx_ring_dma = dma_map_single(bp->sdev->dma_dev, tx_ring,
1230 DMA_TABLE_BYTES, 1230 DMA_TABLE_BYTES,
1231 DMA_TO_DEVICE); 1231 DMA_TO_DEVICE);
1232 1232
diff --git a/drivers/net/fec_mpc52xx.c b/drivers/net/fec_mpc52xx.c
index 43b5f30743c2..e5e6352556fa 100644
--- a/drivers/net/fec_mpc52xx.c
+++ b/drivers/net/fec_mpc52xx.c
@@ -1057,6 +1057,7 @@ static int mpc52xx_fec_of_resume(struct of_device *op)
1057#endif 1057#endif
1058 1058
1059static struct of_device_id mpc52xx_fec_match[] = { 1059static struct of_device_id mpc52xx_fec_match[] = {
1060 { .type = "network", .compatible = "fsl,mpc5200b-fec", },
1060 { .type = "network", .compatible = "fsl,mpc5200-fec", }, 1061 { .type = "network", .compatible = "fsl,mpc5200-fec", },
1061 { .type = "network", .compatible = "mpc5200-fec", }, 1062 { .type = "network", .compatible = "mpc5200-fec", },
1062 { } 1063 { }
diff --git a/drivers/net/fec_mpc52xx_phy.c b/drivers/net/fec_mpc52xx_phy.c
index 956836fc5ec0..f5634447276d 100644
--- a/drivers/net/fec_mpc52xx_phy.c
+++ b/drivers/net/fec_mpc52xx_phy.c
@@ -179,6 +179,7 @@ static int mpc52xx_fec_mdio_remove(struct of_device *of)
179 179
180static struct of_device_id mpc52xx_fec_mdio_match[] = { 180static struct of_device_id mpc52xx_fec_mdio_match[] = {
181 { .compatible = "fsl,mpc5200b-mdio", }, 181 { .compatible = "fsl,mpc5200b-mdio", },
182 { .compatible = "fsl,mpc5200-mdio", },
182 { .compatible = "mpc5200b-fec-phy", }, 183 { .compatible = "mpc5200b-fec-phy", },
183 {} 184 {}
184}; 185};
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
index 501e451be911..665341e43055 100644
--- a/drivers/net/netconsole.c
+++ b/drivers/net/netconsole.c
@@ -730,7 +730,7 @@ static void write_msg(struct console *con, const char *msg, unsigned int len)
730 730
731static struct console netconsole = { 731static struct console netconsole = {
732 .name = "netcon", 732 .name = "netcon",
733 .flags = CON_ENABLED | CON_PRINTBUFFER, 733 .flags = CON_ENABLED,
734 .write = write_msg, 734 .write = write_msg,
735}; 735};
736 736
@@ -749,6 +749,9 @@ static int __init init_netconsole(void)
749 err = PTR_ERR(nt); 749 err = PTR_ERR(nt);
750 goto fail; 750 goto fail;
751 } 751 }
752 /* Dump existing printks when we register */
753 netconsole.flags |= CON_PRINTBUFFER;
754
752 spin_lock_irqsave(&target_list_lock, flags); 755 spin_lock_irqsave(&target_list_lock, flags);
753 list_add(&nt->list, &target_list); 756 list_add(&nt->list, &target_list);
754 spin_unlock_irqrestore(&target_list_lock, flags); 757 spin_unlock_irqrestore(&target_list_lock, flags);
diff --git a/drivers/net/ps3_gelic_wireless.c b/drivers/net/ps3_gelic_wireless.c
index f9719cfa046c..0d32123085e9 100644
--- a/drivers/net/ps3_gelic_wireless.c
+++ b/drivers/net/ps3_gelic_wireless.c
@@ -512,13 +512,18 @@ static void gelic_wl_parse_ie(u8 *data, size_t len,
512 data, len); 512 data, len);
513 memset(ie_info, 0, sizeof(struct ie_info)); 513 memset(ie_info, 0, sizeof(struct ie_info));
514 514
515 while (0 < data_left) { 515 while (2 <= data_left) {
516 item_id = *pos++; 516 item_id = *pos++;
517 item_len = *pos++; 517 item_len = *pos++;
518 data_left -= 2;
519
520 if (data_left < item_len)
521 break;
518 522
519 switch (item_id) { 523 switch (item_id) {
520 case MFIE_TYPE_GENERIC: 524 case MFIE_TYPE_GENERIC:
521 if (!memcmp(pos, wpa_oui, OUI_LEN) && 525 if ((OUI_LEN + 1 <= item_len) &&
526 !memcmp(pos, wpa_oui, OUI_LEN) &&
522 pos[OUI_LEN] == 0x01) { 527 pos[OUI_LEN] == 0x01) {
523 ie_info->wpa.data = pos - 2; 528 ie_info->wpa.data = pos - 2;
524 ie_info->wpa.len = item_len + 2; 529 ie_info->wpa.len = item_len + 2;
@@ -535,7 +540,7 @@ static void gelic_wl_parse_ie(u8 *data, size_t len,
535 break; 540 break;
536 } 541 }
537 pos += item_len; 542 pos += item_len;
538 data_left -= item_len + 2; 543 data_left -= item_len;
539 } 544 }
540 pr_debug("%s: wpa=%p,%d wpa2=%p,%d\n", __func__, 545 pr_debug("%s: wpa=%p,%d wpa2=%p,%d\n", __func__,
541 ie_info->wpa.data, ie_info->wpa.len, 546 ie_info->wpa.data, ie_info->wpa.len,
diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h
index 8606818653f8..69e97a1cb1c4 100644
--- a/drivers/net/smc91x.h
+++ b/drivers/net/smc91x.h
@@ -93,14 +93,14 @@
93#define SMC_insw(a, r, p, l) insw ((unsigned long *)((a) + (r)), p, l) 93#define SMC_insw(a, r, p, l) insw ((unsigned long *)((a) + (r)), p, l)
94# endif 94# endif
95/* check if the mac in reg is valid */ 95/* check if the mac in reg is valid */
96#define SMC_GET_MAC_ADDR(lp, addr) \ 96#define SMC_GET_MAC_ADDR(addr) \
97 do { \ 97 do { \
98 unsigned int __v; \ 98 unsigned int __v; \
99 __v = SMC_inw(ioaddr, ADDR0_REG(lp)); \ 99 __v = SMC_inw(ioaddr, ADDR0_REG); \
100 addr[0] = __v; addr[1] = __v >> 8; \ 100 addr[0] = __v; addr[1] = __v >> 8; \
101 __v = SMC_inw(ioaddr, ADDR1_REG(lp)); \ 101 __v = SMC_inw(ioaddr, ADDR1_REG); \
102 addr[2] = __v; addr[3] = __v >> 8; \ 102 addr[2] = __v; addr[3] = __v >> 8; \
103 __v = SMC_inw(ioaddr, ADDR2_REG(lp)); \ 103 __v = SMC_inw(ioaddr, ADDR2_REG); \
104 addr[4] = __v; addr[5] = __v >> 8; \ 104 addr[4] = __v; addr[5] = __v >> 8; \
105 if (*(u32 *)(&addr[0]) == 0xFFFFFFFF) { \ 105 if (*(u32 *)(&addr[0]) == 0xFFFFFFFF) { \
106 random_ether_addr(addr); \ 106 random_ether_addr(addr); \
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index d02d9d75fe14..555b70c8b863 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -285,7 +285,6 @@ again:
285 /* Activate callback for using skbs: if this returns false it 285 /* Activate callback for using skbs: if this returns false it
286 * means some were used in the meantime. */ 286 * means some were used in the meantime. */
287 if (unlikely(!vi->svq->vq_ops->enable_cb(vi->svq))) { 287 if (unlikely(!vi->svq->vq_ops->enable_cb(vi->svq))) {
288 printk("Unlikely: restart svq race\n");
289 vi->svq->vq_ops->disable_cb(vi->svq); 288 vi->svq->vq_ops->disable_cb(vi->svq);
290 netif_start_queue(dev); 289 netif_start_queue(dev);
291 goto again; 290 goto again;
diff --git a/drivers/net/wireless/b43/dma.c b/drivers/net/wireless/b43/dma.c
index f1b983cb9c1f..21c886a9a1d9 100644
--- a/drivers/net/wireless/b43/dma.c
+++ b/drivers/net/wireless/b43/dma.c
@@ -328,10 +328,10 @@ static inline
328 dma_addr_t dmaaddr; 328 dma_addr_t dmaaddr;
329 329
330 if (tx) { 330 if (tx) {
331 dmaaddr = dma_map_single(ring->dev->dev->dev, 331 dmaaddr = dma_map_single(ring->dev->dev->dma_dev,
332 buf, len, DMA_TO_DEVICE); 332 buf, len, DMA_TO_DEVICE);
333 } else { 333 } else {
334 dmaaddr = dma_map_single(ring->dev->dev->dev, 334 dmaaddr = dma_map_single(ring->dev->dev->dma_dev,
335 buf, len, DMA_FROM_DEVICE); 335 buf, len, DMA_FROM_DEVICE);
336 } 336 }
337 337
@@ -343,9 +343,10 @@ static inline
343 dma_addr_t addr, size_t len, int tx) 343 dma_addr_t addr, size_t len, int tx)
344{ 344{
345 if (tx) { 345 if (tx) {
346 dma_unmap_single(ring->dev->dev->dev, addr, len, DMA_TO_DEVICE); 346 dma_unmap_single(ring->dev->dev->dma_dev,
347 addr, len, DMA_TO_DEVICE);
347 } else { 348 } else {
348 dma_unmap_single(ring->dev->dev->dev, 349 dma_unmap_single(ring->dev->dev->dma_dev,
349 addr, len, DMA_FROM_DEVICE); 350 addr, len, DMA_FROM_DEVICE);
350 } 351 }
351} 352}
@@ -355,7 +356,7 @@ static inline
355 dma_addr_t addr, size_t len) 356 dma_addr_t addr, size_t len)
356{ 357{
357 B43_WARN_ON(ring->tx); 358 B43_WARN_ON(ring->tx);
358 dma_sync_single_for_cpu(ring->dev->dev->dev, 359 dma_sync_single_for_cpu(ring->dev->dev->dma_dev,
359 addr, len, DMA_FROM_DEVICE); 360 addr, len, DMA_FROM_DEVICE);
360} 361}
361 362
@@ -364,7 +365,7 @@ static inline
364 dma_addr_t addr, size_t len) 365 dma_addr_t addr, size_t len)
365{ 366{
366 B43_WARN_ON(ring->tx); 367 B43_WARN_ON(ring->tx);
367 dma_sync_single_for_device(ring->dev->dev->dev, 368 dma_sync_single_for_device(ring->dev->dev->dma_dev,
368 addr, len, DMA_FROM_DEVICE); 369 addr, len, DMA_FROM_DEVICE);
369} 370}
370 371
@@ -380,7 +381,7 @@ static inline
380 381
381static int alloc_ringmemory(struct b43_dmaring *ring) 382static int alloc_ringmemory(struct b43_dmaring *ring)
382{ 383{
383 struct device *dev = ring->dev->dev->dev; 384 struct device *dma_dev = ring->dev->dev->dma_dev;
384 gfp_t flags = GFP_KERNEL; 385 gfp_t flags = GFP_KERNEL;
385 386
386 /* The specs call for 4K buffers for 30- and 32-bit DMA with 4K 387 /* The specs call for 4K buffers for 30- and 32-bit DMA with 4K
@@ -394,7 +395,7 @@ static int alloc_ringmemory(struct b43_dmaring *ring)
394 */ 395 */
395 if (ring->type == B43_DMA_64BIT) 396 if (ring->type == B43_DMA_64BIT)
396 flags |= GFP_DMA; 397 flags |= GFP_DMA;
397 ring->descbase = dma_alloc_coherent(dev, B43_DMA_RINGMEMSIZE, 398 ring->descbase = dma_alloc_coherent(dma_dev, B43_DMA_RINGMEMSIZE,
398 &(ring->dmabase), flags); 399 &(ring->dmabase), flags);
399 if (!ring->descbase) { 400 if (!ring->descbase) {
400 b43err(ring->dev->wl, "DMA ringmemory allocation failed\n"); 401 b43err(ring->dev->wl, "DMA ringmemory allocation failed\n");
@@ -407,9 +408,9 @@ static int alloc_ringmemory(struct b43_dmaring *ring)
407 408
408static void free_ringmemory(struct b43_dmaring *ring) 409static void free_ringmemory(struct b43_dmaring *ring)
409{ 410{
410 struct device *dev = ring->dev->dev->dev; 411 struct device *dma_dev = ring->dev->dev->dma_dev;
411 412
412 dma_free_coherent(dev, B43_DMA_RINGMEMSIZE, 413 dma_free_coherent(dma_dev, B43_DMA_RINGMEMSIZE,
413 ring->descbase, ring->dmabase); 414 ring->descbase, ring->dmabase);
414} 415}
415 416
@@ -818,7 +819,7 @@ struct b43_dmaring *b43_setup_dmaring(struct b43_wldev *dev,
818 goto err_kfree_meta; 819 goto err_kfree_meta;
819 820
820 /* test for ability to dma to txhdr_cache */ 821 /* test for ability to dma to txhdr_cache */
821 dma_test = dma_map_single(dev->dev->dev, 822 dma_test = dma_map_single(dev->dev->dma_dev,
822 ring->txhdr_cache, 823 ring->txhdr_cache,
823 b43_txhdr_size(dev), 824 b43_txhdr_size(dev),
824 DMA_TO_DEVICE); 825 DMA_TO_DEVICE);
@@ -833,7 +834,7 @@ struct b43_dmaring *b43_setup_dmaring(struct b43_wldev *dev,
833 if (!ring->txhdr_cache) 834 if (!ring->txhdr_cache)
834 goto err_kfree_meta; 835 goto err_kfree_meta;
835 836
836 dma_test = dma_map_single(dev->dev->dev, 837 dma_test = dma_map_single(dev->dev->dma_dev,
837 ring->txhdr_cache, 838 ring->txhdr_cache,
838 b43_txhdr_size(dev), 839 b43_txhdr_size(dev),
839 DMA_TO_DEVICE); 840 DMA_TO_DEVICE);
@@ -847,7 +848,7 @@ struct b43_dmaring *b43_setup_dmaring(struct b43_wldev *dev,
847 } 848 }
848 } 849 }
849 850
850 dma_unmap_single(dev->dev->dev, 851 dma_unmap_single(dev->dev->dma_dev,
851 dma_test, b43_txhdr_size(dev), 852 dma_test, b43_txhdr_size(dev),
852 DMA_TO_DEVICE); 853 DMA_TO_DEVICE);
853 } 854 }
diff --git a/drivers/net/wireless/b43legacy/dma.c b/drivers/net/wireless/b43legacy/dma.c
index e87b427d5e43..c990f87b107a 100644
--- a/drivers/net/wireless/b43legacy/dma.c
+++ b/drivers/net/wireless/b43legacy/dma.c
@@ -393,11 +393,11 @@ dma_addr_t map_descbuffer(struct b43legacy_dmaring *ring,
393 dma_addr_t dmaaddr; 393 dma_addr_t dmaaddr;
394 394
395 if (tx) 395 if (tx)
396 dmaaddr = dma_map_single(ring->dev->dev->dev, 396 dmaaddr = dma_map_single(ring->dev->dev->dma_dev,
397 buf, len, 397 buf, len,
398 DMA_TO_DEVICE); 398 DMA_TO_DEVICE);
399 else 399 else
400 dmaaddr = dma_map_single(ring->dev->dev->dev, 400 dmaaddr = dma_map_single(ring->dev->dev->dma_dev,
401 buf, len, 401 buf, len,
402 DMA_FROM_DEVICE); 402 DMA_FROM_DEVICE);
403 403
@@ -411,11 +411,11 @@ void unmap_descbuffer(struct b43legacy_dmaring *ring,
411 int tx) 411 int tx)
412{ 412{
413 if (tx) 413 if (tx)
414 dma_unmap_single(ring->dev->dev->dev, 414 dma_unmap_single(ring->dev->dev->dma_dev,
415 addr, len, 415 addr, len,
416 DMA_TO_DEVICE); 416 DMA_TO_DEVICE);
417 else 417 else
418 dma_unmap_single(ring->dev->dev->dev, 418 dma_unmap_single(ring->dev->dev->dma_dev,
419 addr, len, 419 addr, len,
420 DMA_FROM_DEVICE); 420 DMA_FROM_DEVICE);
421} 421}
@@ -427,7 +427,7 @@ void sync_descbuffer_for_cpu(struct b43legacy_dmaring *ring,
427{ 427{
428 B43legacy_WARN_ON(ring->tx); 428 B43legacy_WARN_ON(ring->tx);
429 429
430 dma_sync_single_for_cpu(ring->dev->dev->dev, 430 dma_sync_single_for_cpu(ring->dev->dev->dma_dev,
431 addr, len, DMA_FROM_DEVICE); 431 addr, len, DMA_FROM_DEVICE);
432} 432}
433 433
@@ -438,7 +438,7 @@ void sync_descbuffer_for_device(struct b43legacy_dmaring *ring,
438{ 438{
439 B43legacy_WARN_ON(ring->tx); 439 B43legacy_WARN_ON(ring->tx);
440 440
441 dma_sync_single_for_device(ring->dev->dev->dev, 441 dma_sync_single_for_device(ring->dev->dev->dma_dev,
442 addr, len, DMA_FROM_DEVICE); 442 addr, len, DMA_FROM_DEVICE);
443} 443}
444 444
@@ -458,9 +458,9 @@ void free_descriptor_buffer(struct b43legacy_dmaring *ring,
458 458
459static int alloc_ringmemory(struct b43legacy_dmaring *ring) 459static int alloc_ringmemory(struct b43legacy_dmaring *ring)
460{ 460{
461 struct device *dev = ring->dev->dev->dev; 461 struct device *dma_dev = ring->dev->dev->dma_dev;
462 462
463 ring->descbase = dma_alloc_coherent(dev, B43legacy_DMA_RINGMEMSIZE, 463 ring->descbase = dma_alloc_coherent(dma_dev, B43legacy_DMA_RINGMEMSIZE,
464 &(ring->dmabase), GFP_KERNEL); 464 &(ring->dmabase), GFP_KERNEL);
465 if (!ring->descbase) { 465 if (!ring->descbase) {
466 b43legacyerr(ring->dev->wl, "DMA ringmemory allocation" 466 b43legacyerr(ring->dev->wl, "DMA ringmemory allocation"
@@ -474,9 +474,9 @@ static int alloc_ringmemory(struct b43legacy_dmaring *ring)
474 474
475static void free_ringmemory(struct b43legacy_dmaring *ring) 475static void free_ringmemory(struct b43legacy_dmaring *ring)
476{ 476{
477 struct device *dev = ring->dev->dev->dev; 477 struct device *dma_dev = ring->dev->dev->dma_dev;
478 478
479 dma_free_coherent(dev, B43legacy_DMA_RINGMEMSIZE, 479 dma_free_coherent(dma_dev, B43legacy_DMA_RINGMEMSIZE,
480 ring->descbase, ring->dmabase); 480 ring->descbase, ring->dmabase);
481} 481}
482 482
@@ -585,8 +585,9 @@ static int b43legacy_dmacontroller_tx_reset(struct b43legacy_wldev *dev,
585 585
586/* Check if a DMA mapping address is invalid. */ 586/* Check if a DMA mapping address is invalid. */
587static bool b43legacy_dma_mapping_error(struct b43legacy_dmaring *ring, 587static bool b43legacy_dma_mapping_error(struct b43legacy_dmaring *ring,
588 dma_addr_t addr, 588 dma_addr_t addr,
589 size_t buffersize) 589 size_t buffersize,
590 bool dma_to_device)
590{ 591{
591 if (unlikely(dma_mapping_error(addr))) 592 if (unlikely(dma_mapping_error(addr)))
592 return 1; 593 return 1;
@@ -594,11 +595,11 @@ static bool b43legacy_dma_mapping_error(struct b43legacy_dmaring *ring,
594 switch (ring->type) { 595 switch (ring->type) {
595 case B43legacy_DMA_30BIT: 596 case B43legacy_DMA_30BIT:
596 if ((u64)addr + buffersize > (1ULL << 30)) 597 if ((u64)addr + buffersize > (1ULL << 30))
597 return 1; 598 goto address_error;
598 break; 599 break;
599 case B43legacy_DMA_32BIT: 600 case B43legacy_DMA_32BIT:
600 if ((u64)addr + buffersize > (1ULL << 32)) 601 if ((u64)addr + buffersize > (1ULL << 32))
601 return 1; 602 goto address_error;
602 break; 603 break;
603 case B43legacy_DMA_64BIT: 604 case B43legacy_DMA_64BIT:
604 /* Currently we can't have addresses beyond 64 bits in the kernel. */ 605 /* Currently we can't have addresses beyond 64 bits in the kernel. */
@@ -607,6 +608,12 @@ static bool b43legacy_dma_mapping_error(struct b43legacy_dmaring *ring,
607 608
608 /* The address is OK. */ 609 /* The address is OK. */
609 return 0; 610 return 0;
611
612address_error:
613 /* We can't support this address. Unmap it again. */
614 unmap_descbuffer(ring, addr, buffersize, dma_to_device);
615
616 return 1;
610} 617}
611 618
612static int setup_rx_descbuffer(struct b43legacy_dmaring *ring, 619static int setup_rx_descbuffer(struct b43legacy_dmaring *ring,
@@ -626,7 +633,7 @@ static int setup_rx_descbuffer(struct b43legacy_dmaring *ring,
626 return -ENOMEM; 633 return -ENOMEM;
627 dmaaddr = map_descbuffer(ring, skb->data, 634 dmaaddr = map_descbuffer(ring, skb->data,
628 ring->rx_buffersize, 0); 635 ring->rx_buffersize, 0);
629 if (b43legacy_dma_mapping_error(ring, dmaaddr, ring->rx_buffersize)) { 636 if (b43legacy_dma_mapping_error(ring, dmaaddr, ring->rx_buffersize, 0)) {
630 /* ugh. try to realloc in zone_dma */ 637 /* ugh. try to realloc in zone_dma */
631 gfp_flags |= GFP_DMA; 638 gfp_flags |= GFP_DMA;
632 639
@@ -639,7 +646,7 @@ static int setup_rx_descbuffer(struct b43legacy_dmaring *ring,
639 ring->rx_buffersize, 0); 646 ring->rx_buffersize, 0);
640 } 647 }
641 648
642 if (b43legacy_dma_mapping_error(ring, dmaaddr, ring->rx_buffersize)) { 649 if (b43legacy_dma_mapping_error(ring, dmaaddr, ring->rx_buffersize, 0)) {
643 dev_kfree_skb_any(skb); 650 dev_kfree_skb_any(skb);
644 return -EIO; 651 return -EIO;
645 } 652 }
@@ -886,12 +893,12 @@ struct b43legacy_dmaring *b43legacy_setup_dmaring(struct b43legacy_wldev *dev,
886 goto err_kfree_meta; 893 goto err_kfree_meta;
887 894
888 /* test for ability to dma to txhdr_cache */ 895 /* test for ability to dma to txhdr_cache */
889 dma_test = dma_map_single(dev->dev->dev, ring->txhdr_cache, 896 dma_test = dma_map_single(dev->dev->dma_dev, ring->txhdr_cache,
890 sizeof(struct b43legacy_txhdr_fw3), 897 sizeof(struct b43legacy_txhdr_fw3),
891 DMA_TO_DEVICE); 898 DMA_TO_DEVICE);
892 899
893 if (b43legacy_dma_mapping_error(ring, dma_test, 900 if (b43legacy_dma_mapping_error(ring, dma_test,
894 sizeof(struct b43legacy_txhdr_fw3))) { 901 sizeof(struct b43legacy_txhdr_fw3), 1)) {
895 /* ugh realloc */ 902 /* ugh realloc */
896 kfree(ring->txhdr_cache); 903 kfree(ring->txhdr_cache);
897 ring->txhdr_cache = kcalloc(nr_slots, 904 ring->txhdr_cache = kcalloc(nr_slots,
@@ -900,17 +907,17 @@ struct b43legacy_dmaring *b43legacy_setup_dmaring(struct b43legacy_wldev *dev,
900 if (!ring->txhdr_cache) 907 if (!ring->txhdr_cache)
901 goto err_kfree_meta; 908 goto err_kfree_meta;
902 909
903 dma_test = dma_map_single(dev->dev->dev, 910 dma_test = dma_map_single(dev->dev->dma_dev,
904 ring->txhdr_cache, 911 ring->txhdr_cache,
905 sizeof(struct b43legacy_txhdr_fw3), 912 sizeof(struct b43legacy_txhdr_fw3),
906 DMA_TO_DEVICE); 913 DMA_TO_DEVICE);
907 914
908 if (b43legacy_dma_mapping_error(ring, dma_test, 915 if (b43legacy_dma_mapping_error(ring, dma_test,
909 sizeof(struct b43legacy_txhdr_fw3))) 916 sizeof(struct b43legacy_txhdr_fw3), 1))
910 goto err_kfree_txhdr_cache; 917 goto err_kfree_txhdr_cache;
911 } 918 }
912 919
913 dma_unmap_single(dev->dev->dev, 920 dma_unmap_single(dev->dev->dma_dev,
914 dma_test, sizeof(struct b43legacy_txhdr_fw3), 921 dma_test, sizeof(struct b43legacy_txhdr_fw3),
915 DMA_TO_DEVICE); 922 DMA_TO_DEVICE);
916 } 923 }
@@ -1235,7 +1242,7 @@ static int dma_tx_fragment(struct b43legacy_dmaring *ring,
1235 meta_hdr->dmaaddr = map_descbuffer(ring, (unsigned char *)header, 1242 meta_hdr->dmaaddr = map_descbuffer(ring, (unsigned char *)header,
1236 sizeof(struct b43legacy_txhdr_fw3), 1); 1243 sizeof(struct b43legacy_txhdr_fw3), 1);
1237 if (b43legacy_dma_mapping_error(ring, meta_hdr->dmaaddr, 1244 if (b43legacy_dma_mapping_error(ring, meta_hdr->dmaaddr,
1238 sizeof(struct b43legacy_txhdr_fw3))) { 1245 sizeof(struct b43legacy_txhdr_fw3), 1)) {
1239 ring->current_slot = old_top_slot; 1246 ring->current_slot = old_top_slot;
1240 ring->used_slots = old_used_slots; 1247 ring->used_slots = old_used_slots;
1241 return -EIO; 1248 return -EIO;
@@ -1254,7 +1261,7 @@ static int dma_tx_fragment(struct b43legacy_dmaring *ring,
1254 1261
1255 meta->dmaaddr = map_descbuffer(ring, skb->data, skb->len, 1); 1262 meta->dmaaddr = map_descbuffer(ring, skb->data, skb->len, 1);
1256 /* create a bounce buffer in zone_dma on mapping failure. */ 1263 /* create a bounce buffer in zone_dma on mapping failure. */
1257 if (b43legacy_dma_mapping_error(ring, meta->dmaaddr, skb->len)) { 1264 if (b43legacy_dma_mapping_error(ring, meta->dmaaddr, skb->len, 1)) {
1258 bounce_skb = __dev_alloc_skb(skb->len, GFP_ATOMIC | GFP_DMA); 1265 bounce_skb = __dev_alloc_skb(skb->len, GFP_ATOMIC | GFP_DMA);
1259 if (!bounce_skb) { 1266 if (!bounce_skb) {
1260 ring->current_slot = old_top_slot; 1267 ring->current_slot = old_top_slot;
@@ -1268,7 +1275,7 @@ static int dma_tx_fragment(struct b43legacy_dmaring *ring,
1268 skb = bounce_skb; 1275 skb = bounce_skb;
1269 meta->skb = skb; 1276 meta->skb = skb;
1270 meta->dmaaddr = map_descbuffer(ring, skb->data, skb->len, 1); 1277 meta->dmaaddr = map_descbuffer(ring, skb->data, skb->len, 1);
1271 if (b43legacy_dma_mapping_error(ring, meta->dmaaddr, skb->len)) { 1278 if (b43legacy_dma_mapping_error(ring, meta->dmaaddr, skb->len, 1)) {
1272 ring->current_slot = old_top_slot; 1279 ring->current_slot = old_top_slot;
1273 ring->used_slots = old_used_slots; 1280 ring->used_slots = old_used_slots;
1274 err = -EIO; 1281 err = -EIO;
diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c
index 2422a5dab1d2..ef829ee8ffd4 100644
--- a/drivers/net/wireless/b43legacy/main.c
+++ b/drivers/net/wireless/b43legacy/main.c
@@ -1516,6 +1516,7 @@ static int b43legacy_request_firmware(struct b43legacy_wldev *dev)
1516 } 1516 }
1517 if (!fw->initvals) { 1517 if (!fw->initvals) {
1518 switch (dev->phy.type) { 1518 switch (dev->phy.type) {
1519 case B43legacy_PHYTYPE_B:
1519 case B43legacy_PHYTYPE_G: 1520 case B43legacy_PHYTYPE_G:
1520 if ((rev >= 5) && (rev <= 10)) 1521 if ((rev >= 5) && (rev <= 10))
1521 filename = "b0g0initvals5"; 1522 filename = "b0g0initvals5";
@@ -1533,6 +1534,7 @@ static int b43legacy_request_firmware(struct b43legacy_wldev *dev)
1533 } 1534 }
1534 if (!fw->initvals_band) { 1535 if (!fw->initvals_band) {
1535 switch (dev->phy.type) { 1536 switch (dev->phy.type) {
1537 case B43legacy_PHYTYPE_B:
1536 case B43legacy_PHYTYPE_G: 1538 case B43legacy_PHYTYPE_G:
1537 if ((rev >= 5) && (rev <= 10)) 1539 if ((rev >= 5) && (rev <= 10))
1538 filename = "b0g0bsinitvals5"; 1540 filename = "b0g0bsinitvals5";
diff --git a/drivers/net/wireless/rtl8187_dev.c b/drivers/net/wireless/rtl8187_dev.c
index c03834d5cb0b..d5787b37e1fb 100644
--- a/drivers/net/wireless/rtl8187_dev.c
+++ b/drivers/net/wireless/rtl8187_dev.c
@@ -546,6 +546,8 @@ static int rtl8187_add_interface(struct ieee80211_hw *dev,
546 return -EOPNOTSUPP; 546 return -EOPNOTSUPP;
547 } 547 }
548 548
549 priv->vif = conf->vif;
550
549 rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_CONFIG); 551 rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_CONFIG);
550 for (i = 0; i < ETH_ALEN; i++) 552 for (i = 0; i < ETH_ALEN; i++)
551 rtl818x_iowrite8(priv, &priv->map->MAC[i], 553 rtl818x_iowrite8(priv, &priv->map->MAC[i],
@@ -560,6 +562,7 @@ static void rtl8187_remove_interface(struct ieee80211_hw *dev,
560{ 562{
561 struct rtl8187_priv *priv = dev->priv; 563 struct rtl8187_priv *priv = dev->priv;
562 priv->mode = IEEE80211_IF_TYPE_MNTR; 564 priv->mode = IEEE80211_IF_TYPE_MNTR;
565 priv->vif = NULL;
563} 566}
564 567
565static int rtl8187_config(struct ieee80211_hw *dev, struct ieee80211_conf *conf) 568static int rtl8187_config(struct ieee80211_hw *dev, struct ieee80211_conf *conf)
diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c
index d76d37bcb9cc..a85808938205 100644
--- a/drivers/parport/parport_pc.c
+++ b/drivers/parport/parport_pc.c
@@ -1568,9 +1568,8 @@ static void __devinit detect_and_report_it87(void)
1568 outb(r | 8, 0x2F); 1568 outb(r | 8, 0x2F);
1569 outb(0x02, 0x2E); /* Lock */ 1569 outb(0x02, 0x2E); /* Lock */
1570 outb(0x02, 0x2F); 1570 outb(0x02, 0x2F);
1571
1572 release_region(0x2e, 1);
1573 } 1571 }
1572 release_region(0x2e, 1);
1574} 1573}
1575#endif /* CONFIG_PARPORT_PC_SUPERIO */ 1574#endif /* CONFIG_PARPORT_PC_SUPERIO */
1576 1575
diff --git a/drivers/pcmcia/at91_cf.c b/drivers/pcmcia/at91_cf.c
index 385e145e1acc..684968558c19 100644
--- a/drivers/pcmcia/at91_cf.c
+++ b/drivers/pcmcia/at91_cf.c
@@ -419,3 +419,4 @@ module_exit(at91_cf_exit);
419MODULE_DESCRIPTION("AT91 Compact Flash Driver"); 419MODULE_DESCRIPTION("AT91 Compact Flash Driver");
420MODULE_AUTHOR("David Brownell"); 420MODULE_AUTHOR("David Brownell");
421MODULE_LICENSE("GPL"); 421MODULE_LICENSE("GPL");
422MODULE_ALIAS("platform:at91_cf");
diff --git a/drivers/pcmcia/omap_cf.c b/drivers/pcmcia/omap_cf.c
index 2df216b00817..bb6db3a582b2 100644
--- a/drivers/pcmcia/omap_cf.c
+++ b/drivers/pcmcia/omap_cf.c
@@ -344,6 +344,7 @@ static int omap_cf_resume(struct platform_device *pdev)
344static struct platform_driver omap_cf_driver = { 344static struct platform_driver omap_cf_driver = {
345 .driver = { 345 .driver = {
346 .name = (char *) driver_name, 346 .name = (char *) driver_name,
347 .owner = THIS_MODULE,
347 }, 348 },
348 .remove = __exit_p(omap_cf_remove), 349 .remove = __exit_p(omap_cf_remove),
349 .suspend = omap_cf_suspend, 350 .suspend = omap_cf_suspend,
@@ -368,3 +369,4 @@ module_exit(omap_cf_exit);
368 369
369MODULE_DESCRIPTION("OMAP CF Driver"); 370MODULE_DESCRIPTION("OMAP CF Driver");
370MODULE_LICENSE("GPL"); 371MODULE_LICENSE("GPL");
372MODULE_ALIAS("platform:omap_cf");
diff --git a/drivers/pcmcia/pxa2xx_base.c b/drivers/pcmcia/pxa2xx_base.c
index e439044d88f2..9414163c78e7 100644
--- a/drivers/pcmcia/pxa2xx_base.c
+++ b/drivers/pcmcia/pxa2xx_base.c
@@ -239,6 +239,7 @@ static struct platform_driver pxa2xx_pcmcia_driver = {
239 .resume = pxa2xx_drv_pcmcia_resume, 239 .resume = pxa2xx_drv_pcmcia_resume,
240 .driver = { 240 .driver = {
241 .name = "pxa2xx-pcmcia", 241 .name = "pxa2xx-pcmcia",
242 .owner = THIS_MODULE,
242 }, 243 },
243}; 244};
244 245
@@ -258,3 +259,4 @@ module_exit(pxa2xx_pcmcia_exit);
258MODULE_AUTHOR("Stefan Eletzhofer <stefan.eletzhofer@inquant.de> and Ian Molton <spyro@f2s.com>"); 259MODULE_AUTHOR("Stefan Eletzhofer <stefan.eletzhofer@inquant.de> and Ian Molton <spyro@f2s.com>");
259MODULE_DESCRIPTION("Linux PCMCIA Card Services: PXA2xx core socket driver"); 260MODULE_DESCRIPTION("Linux PCMCIA Card Services: PXA2xx core socket driver");
260MODULE_LICENSE("GPL"); 261MODULE_LICENSE("GPL");
262MODULE_ALIAS("platform:pxa2xx-pcmcia");
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index 9e7de63b26ef..02a4c8cf2b2d 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -252,6 +252,7 @@ config RTC_DRV_TWL92330
252 252
253config RTC_DRV_S35390A 253config RTC_DRV_S35390A
254 tristate "Seiko Instruments S-35390A" 254 tristate "Seiko Instruments S-35390A"
255 select BITREVERSE
255 help 256 help
256 If you say yes here you will get support for the Seiko 257 If you say yes here you will get support for the Seiko
257 Instruments S-35390A. 258 Instruments S-35390A.
diff --git a/drivers/rtc/rtc-at32ap700x.c b/drivers/rtc/rtc-at32ap700x.c
index d3b9b14267ab..42244f14b41c 100644
--- a/drivers/rtc/rtc-at32ap700x.c
+++ b/drivers/rtc/rtc-at32ap700x.c
@@ -290,7 +290,7 @@ static int __exit at32_rtc_remove(struct platform_device *pdev)
290 return 0; 290 return 0;
291} 291}
292 292
293MODULE_ALIAS("at32ap700x_rtc"); 293MODULE_ALIAS("platform:at32ap700x_rtc");
294 294
295static struct platform_driver at32_rtc_driver = { 295static struct platform_driver at32_rtc_driver = {
296 .remove = __exit_p(at32_rtc_remove), 296 .remove = __exit_p(at32_rtc_remove),
diff --git a/drivers/rtc/rtc-at91rm9200.c b/drivers/rtc/rtc-at91rm9200.c
index 33795e5a5595..52abffc86bcd 100644
--- a/drivers/rtc/rtc-at91rm9200.c
+++ b/drivers/rtc/rtc-at91rm9200.c
@@ -407,3 +407,4 @@ module_exit(at91_rtc_exit);
407MODULE_AUTHOR("Rick Bronson"); 407MODULE_AUTHOR("Rick Bronson");
408MODULE_DESCRIPTION("RTC driver for Atmel AT91RM9200"); 408MODULE_DESCRIPTION("RTC driver for Atmel AT91RM9200");
409MODULE_LICENSE("GPL"); 409MODULE_LICENSE("GPL");
410MODULE_ALIAS("platform:at91_rtc");
diff --git a/drivers/rtc/rtc-bfin.c b/drivers/rtc/rtc-bfin.c
index d90ba860d216..4f28045d9ef2 100644
--- a/drivers/rtc/rtc-bfin.c
+++ b/drivers/rtc/rtc-bfin.c
@@ -470,3 +470,4 @@ module_exit(bfin_rtc_exit);
470MODULE_DESCRIPTION("Blackfin On-Chip Real Time Clock Driver"); 470MODULE_DESCRIPTION("Blackfin On-Chip Real Time Clock Driver");
471MODULE_AUTHOR("Mike Frysinger <vapier@gentoo.org>"); 471MODULE_AUTHOR("Mike Frysinger <vapier@gentoo.org>");
472MODULE_LICENSE("GPL"); 472MODULE_LICENSE("GPL");
473MODULE_ALIAS("platform:rtc-bfin");
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
index f3ee2ad566b4..dcdc142a3441 100644
--- a/drivers/rtc/rtc-cmos.c
+++ b/drivers/rtc/rtc-cmos.c
@@ -198,9 +198,8 @@ static int cmos_set_alarm(struct device *dev, struct rtc_wkalrm *t)
198 198
199 /* Writing 0xff means "don't care" or "match all". */ 199 /* Writing 0xff means "don't care" or "match all". */
200 200
201 mon = t->time.tm_mon; 201 mon = t->time.tm_mon + 1;
202 mon = (mon < 12) ? BIN2BCD(mon) : 0xff; 202 mon = (mon <= 12) ? BIN2BCD(mon) : 0xff;
203 mon++;
204 203
205 mday = t->time.tm_mday; 204 mday = t->time.tm_mday;
206 mday = (mday >= 1 && mday <= 31) ? BIN2BCD(mday) : 0xff; 205 mday = (mday >= 1 && mday <= 31) ? BIN2BCD(mday) : 0xff;
@@ -943,6 +942,9 @@ static void cmos_platform_shutdown(struct platform_device *pdev)
943 cmos_do_shutdown(); 942 cmos_do_shutdown();
944} 943}
945 944
945/* work with hotplug and coldplug */
946MODULE_ALIAS("platform:rtc_cmos");
947
946static struct platform_driver cmos_platform_driver = { 948static struct platform_driver cmos_platform_driver = {
947 .remove = __exit_p(cmos_platform_remove), 949 .remove = __exit_p(cmos_platform_remove),
948 .shutdown = cmos_platform_shutdown, 950 .shutdown = cmos_platform_shutdown,
diff --git a/drivers/rtc/rtc-ds1216.c b/drivers/rtc/rtc-ds1216.c
index 83efb88f8f23..0b17770b032b 100644
--- a/drivers/rtc/rtc-ds1216.c
+++ b/drivers/rtc/rtc-ds1216.c
@@ -221,6 +221,7 @@ MODULE_AUTHOR("Thomas Bogendoerfer <tsbogend@alpha.franken.de>");
221MODULE_DESCRIPTION("DS1216 RTC driver"); 221MODULE_DESCRIPTION("DS1216 RTC driver");
222MODULE_LICENSE("GPL"); 222MODULE_LICENSE("GPL");
223MODULE_VERSION(DRV_VERSION); 223MODULE_VERSION(DRV_VERSION);
224MODULE_ALIAS("platform:rtc-ds1216");
224 225
225module_init(ds1216_rtc_init); 226module_init(ds1216_rtc_init);
226module_exit(ds1216_rtc_exit); 227module_exit(ds1216_rtc_exit);
diff --git a/drivers/rtc/rtc-ds1511.c b/drivers/rtc/rtc-ds1511.c
index d74b8086fa31..d08912f18ddd 100644
--- a/drivers/rtc/rtc-ds1511.c
+++ b/drivers/rtc/rtc-ds1511.c
@@ -626,6 +626,9 @@ ds1511_rtc_remove(struct platform_device *pdev)
626 return 0; 626 return 0;
627} 627}
628 628
629/* work with hotplug and coldplug */
630MODULE_ALIAS("platform:ds1511");
631
629static struct platform_driver ds1511_rtc_driver = { 632static struct platform_driver ds1511_rtc_driver = {
630 .probe = ds1511_rtc_probe, 633 .probe = ds1511_rtc_probe,
631 .remove = __devexit_p(ds1511_rtc_remove), 634 .remove = __devexit_p(ds1511_rtc_remove),
diff --git a/drivers/rtc/rtc-ds1553.c b/drivers/rtc/rtc-ds1553.c
index d9e848dcd450..a19f11415540 100644
--- a/drivers/rtc/rtc-ds1553.c
+++ b/drivers/rtc/rtc-ds1553.c
@@ -391,6 +391,9 @@ static int __devexit ds1553_rtc_remove(struct platform_device *pdev)
391 return 0; 391 return 0;
392} 392}
393 393
394/* work with hotplug and coldplug */
395MODULE_ALIAS("platform:rtc-ds1553");
396
394static struct platform_driver ds1553_rtc_driver = { 397static struct platform_driver ds1553_rtc_driver = {
395 .probe = ds1553_rtc_probe, 398 .probe = ds1553_rtc_probe,
396 .remove = __devexit_p(ds1553_rtc_remove), 399 .remove = __devexit_p(ds1553_rtc_remove),
diff --git a/drivers/rtc/rtc-ds1742.c b/drivers/rtc/rtc-ds1742.c
index 2e73f0b183b2..24d35ede2dbf 100644
--- a/drivers/rtc/rtc-ds1742.c
+++ b/drivers/rtc/rtc-ds1742.c
@@ -276,3 +276,4 @@ MODULE_AUTHOR("Atsushi Nemoto <anemo@mba.ocn.ne.jp>");
276MODULE_DESCRIPTION("Dallas DS1742 RTC driver"); 276MODULE_DESCRIPTION("Dallas DS1742 RTC driver");
277MODULE_LICENSE("GPL"); 277MODULE_LICENSE("GPL");
278MODULE_VERSION(DRV_VERSION); 278MODULE_VERSION(DRV_VERSION);
279MODULE_ALIAS("platform:rtc-ds1742");
diff --git a/drivers/rtc/rtc-ep93xx.c b/drivers/rtc/rtc-ep93xx.c
index ef4f147f3c0c..1e99325270df 100644
--- a/drivers/rtc/rtc-ep93xx.c
+++ b/drivers/rtc/rtc-ep93xx.c
@@ -132,6 +132,9 @@ static int __devexit ep93xx_rtc_remove(struct platform_device *dev)
132 return 0; 132 return 0;
133} 133}
134 134
135/* work with hotplug and coldplug */
136MODULE_ALIAS("platform:ep93xx-rtc");
137
135static struct platform_driver ep93xx_rtc_platform_driver = { 138static struct platform_driver ep93xx_rtc_platform_driver = {
136 .driver = { 139 .driver = {
137 .name = "ep93xx-rtc", 140 .name = "ep93xx-rtc",
diff --git a/drivers/rtc/rtc-m48t59.c b/drivers/rtc/rtc-m48t59.c
index cd0bbc0e8038..013e6c103b9c 100644
--- a/drivers/rtc/rtc-m48t59.c
+++ b/drivers/rtc/rtc-m48t59.c
@@ -465,6 +465,9 @@ static int __devexit m48t59_rtc_remove(struct platform_device *pdev)
465 return 0; 465 return 0;
466} 466}
467 467
468/* work with hotplug and coldplug */
469MODULE_ALIAS("platform:rtc-m48t59");
470
468static struct platform_driver m48t59_rtc_driver = { 471static struct platform_driver m48t59_rtc_driver = {
469 .driver = { 472 .driver = {
470 .name = "rtc-m48t59", 473 .name = "rtc-m48t59",
diff --git a/drivers/rtc/rtc-m48t86.c b/drivers/rtc/rtc-m48t86.c
index 8ff4a1221f59..3f7f99a5d96a 100644
--- a/drivers/rtc/rtc-m48t86.c
+++ b/drivers/rtc/rtc-m48t86.c
@@ -199,6 +199,7 @@ MODULE_AUTHOR("Alessandro Zummo <a.zummo@towertech.it>");
199MODULE_DESCRIPTION("M48T86 RTC driver"); 199MODULE_DESCRIPTION("M48T86 RTC driver");
200MODULE_LICENSE("GPL"); 200MODULE_LICENSE("GPL");
201MODULE_VERSION(DRV_VERSION); 201MODULE_VERSION(DRV_VERSION);
202MODULE_ALIAS("platform:rtc-m48t86");
202 203
203module_init(m48t86_rtc_init); 204module_init(m48t86_rtc_init);
204module_exit(m48t86_rtc_exit); 205module_exit(m48t86_rtc_exit);
diff --git a/drivers/rtc/rtc-omap.c b/drivers/rtc/rtc-omap.c
index a2f84f169588..58f81c774943 100644
--- a/drivers/rtc/rtc-omap.c
+++ b/drivers/rtc/rtc-omap.c
@@ -497,7 +497,7 @@ static void omap_rtc_shutdown(struct platform_device *pdev)
497 rtc_write(0, OMAP_RTC_INTERRUPTS_REG); 497 rtc_write(0, OMAP_RTC_INTERRUPTS_REG);
498} 498}
499 499
500MODULE_ALIAS("omap_rtc"); 500MODULE_ALIAS("platform:omap_rtc");
501static struct platform_driver omap_rtc_driver = { 501static struct platform_driver omap_rtc_driver = {
502 .probe = omap_rtc_probe, 502 .probe = omap_rtc_probe,
503 .remove = __devexit_p(omap_rtc_remove), 503 .remove = __devexit_p(omap_rtc_remove),
diff --git a/drivers/rtc/rtc-rs5c313.c b/drivers/rtc/rtc-rs5c313.c
index 66eb133bf5fd..664e89a817ed 100644
--- a/drivers/rtc/rtc-rs5c313.c
+++ b/drivers/rtc/rtc-rs5c313.c
@@ -421,3 +421,4 @@ MODULE_VERSION(DRV_VERSION);
421MODULE_AUTHOR("kogiidena , Nobuhiro Iwamatsu <iwamatsu@nigauri.org>"); 421MODULE_AUTHOR("kogiidena , Nobuhiro Iwamatsu <iwamatsu@nigauri.org>");
422MODULE_DESCRIPTION("Ricoh RS5C313 RTC device driver"); 422MODULE_DESCRIPTION("Ricoh RS5C313 RTC device driver");
423MODULE_LICENSE("GPL"); 423MODULE_LICENSE("GPL");
424MODULE_ALIAS("platform:" DRV_NAME);
diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
index 86766f1f2496..9f4d5129a496 100644
--- a/drivers/rtc/rtc-s3c.c
+++ b/drivers/rtc/rtc-s3c.c
@@ -592,3 +592,4 @@ module_exit(s3c_rtc_exit);
592MODULE_DESCRIPTION("Samsung S3C RTC Driver"); 592MODULE_DESCRIPTION("Samsung S3C RTC Driver");
593MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>"); 593MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>");
594MODULE_LICENSE("GPL"); 594MODULE_LICENSE("GPL");
595MODULE_ALIAS("platform:s3c2410-rtc");
diff --git a/drivers/rtc/rtc-sa1100.c b/drivers/rtc/rtc-sa1100.c
index ee253cc45de1..82f62d25f921 100644
--- a/drivers/rtc/rtc-sa1100.c
+++ b/drivers/rtc/rtc-sa1100.c
@@ -399,3 +399,4 @@ module_exit(sa1100_rtc_exit);
399MODULE_AUTHOR("Richard Purdie <rpurdie@rpsys.net>"); 399MODULE_AUTHOR("Richard Purdie <rpurdie@rpsys.net>");
400MODULE_DESCRIPTION("SA11x0/PXA2xx Realtime Clock Driver (RTC)"); 400MODULE_DESCRIPTION("SA11x0/PXA2xx Realtime Clock Driver (RTC)");
401MODULE_LICENSE("GPL"); 401MODULE_LICENSE("GPL");
402MODULE_ALIAS("platform:sa1100-rtc");
diff --git a/drivers/rtc/rtc-sh.c b/drivers/rtc/rtc-sh.c
index c1d6a1880ccf..9e9caa5d7f5f 100644
--- a/drivers/rtc/rtc-sh.c
+++ b/drivers/rtc/rtc-sh.c
@@ -664,3 +664,4 @@ MODULE_DESCRIPTION("SuperH on-chip RTC driver");
664MODULE_VERSION(DRV_VERSION); 664MODULE_VERSION(DRV_VERSION);
665MODULE_AUTHOR("Paul Mundt <lethal@linux-sh.org>, Jamie Lenehan <lenehan@twibble.org>"); 665MODULE_AUTHOR("Paul Mundt <lethal@linux-sh.org>, Jamie Lenehan <lenehan@twibble.org>");
666MODULE_LICENSE("GPL"); 666MODULE_LICENSE("GPL");
667MODULE_ALIAS("platform:" DRV_NAME);
diff --git a/drivers/rtc/rtc-stk17ta8.c b/drivers/rtc/rtc-stk17ta8.c
index a265da7c6ff8..31d3c8c28588 100644
--- a/drivers/rtc/rtc-stk17ta8.c
+++ b/drivers/rtc/rtc-stk17ta8.c
@@ -394,6 +394,9 @@ static int __devexit stk17ta8_rtc_remove(struct platform_device *pdev)
394 return 0; 394 return 0;
395} 395}
396 396
397/* work with hotplug and coldplug */
398MODULE_ALIAS("platform:stk17ta8");
399
397static struct platform_driver stk17ta8_rtc_driver = { 400static struct platform_driver stk17ta8_rtc_driver = {
398 .probe = stk17ta8_rtc_probe, 401 .probe = stk17ta8_rtc_probe,
399 .remove = __devexit_p(stk17ta8_rtc_remove), 402 .remove = __devexit_p(stk17ta8_rtc_remove),
diff --git a/drivers/rtc/rtc-v3020.c b/drivers/rtc/rtc-v3020.c
index a6b572978dc0..24203a06051a 100644
--- a/drivers/rtc/rtc-v3020.c
+++ b/drivers/rtc/rtc-v3020.c
@@ -264,3 +264,4 @@ module_exit(v3020_exit);
264MODULE_DESCRIPTION("V3020 RTC"); 264MODULE_DESCRIPTION("V3020 RTC");
265MODULE_AUTHOR("Raphael Assenat"); 265MODULE_AUTHOR("Raphael Assenat");
266MODULE_LICENSE("GPL"); 266MODULE_LICENSE("GPL");
267MODULE_ALIAS("platform:v3020");
diff --git a/drivers/rtc/rtc-vr41xx.c b/drivers/rtc/rtc-vr41xx.c
index ce2f78de7a80..be9c70d0b193 100644
--- a/drivers/rtc/rtc-vr41xx.c
+++ b/drivers/rtc/rtc-vr41xx.c
@@ -422,6 +422,9 @@ static int __devexit rtc_remove(struct platform_device *pdev)
422 return 0; 422 return 0;
423} 423}
424 424
425/* work with hotplug and coldplug */
426MODULE_ALIAS("platform:RTC");
427
425static struct platform_driver rtc_platform_driver = { 428static struct platform_driver rtc_platform_driver = {
426 .probe = rtc_probe, 429 .probe = rtc_probe,
427 .remove = __devexit_p(rtc_remove), 430 .remove = __devexit_p(rtc_remove),
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index e5c6f6af8765..c78b836f59dd 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -181,6 +181,18 @@ struct scsi_cmnd *__scsi_get_command(struct Scsi_Host *shost, gfp_t gfp_mask)
181 cmd = kmem_cache_alloc(shost->cmd_pool->cmd_slab, 181 cmd = kmem_cache_alloc(shost->cmd_pool->cmd_slab,
182 gfp_mask | shost->cmd_pool->gfp_mask); 182 gfp_mask | shost->cmd_pool->gfp_mask);
183 183
184 if (likely(cmd)) {
185 buf = kmem_cache_alloc(shost->cmd_pool->sense_slab,
186 gfp_mask | shost->cmd_pool->gfp_mask);
187 if (likely(buf)) {
188 memset(cmd, 0, sizeof(*cmd));
189 cmd->sense_buffer = buf;
190 } else {
191 kmem_cache_free(shost->cmd_pool->cmd_slab, cmd);
192 cmd = NULL;
193 }
194 }
195
184 if (unlikely(!cmd)) { 196 if (unlikely(!cmd)) {
185 unsigned long flags; 197 unsigned long flags;
186 198
@@ -197,16 +209,6 @@ struct scsi_cmnd *__scsi_get_command(struct Scsi_Host *shost, gfp_t gfp_mask)
197 memset(cmd, 0, sizeof(*cmd)); 209 memset(cmd, 0, sizeof(*cmd));
198 cmd->sense_buffer = buf; 210 cmd->sense_buffer = buf;
199 } 211 }
200 } else {
201 buf = kmem_cache_alloc(shost->cmd_pool->sense_slab,
202 gfp_mask | shost->cmd_pool->gfp_mask);
203 if (likely(buf)) {
204 memset(cmd, 0, sizeof(*cmd));
205 cmd->sense_buffer = buf;
206 } else {
207 kmem_cache_free(shost->cmd_pool->cmd_slab, cmd);
208 cmd = NULL;
209 }
210 } 212 }
211 213
212 return cmd; 214 return cmd;
diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c
index 430997e33fc4..55492fa095a2 100644
--- a/drivers/serial/atmel_serial.c
+++ b/drivers/serial/atmel_serial.c
@@ -1577,3 +1577,4 @@ module_exit(atmel_serial_exit);
1577MODULE_AUTHOR("Rick Bronson"); 1577MODULE_AUTHOR("Rick Bronson");
1578MODULE_DESCRIPTION("Atmel AT91 / AT32 serial port driver"); 1578MODULE_DESCRIPTION("Atmel AT91 / AT32 serial port driver");
1579MODULE_LICENSE("GPL"); 1579MODULE_LICENSE("GPL");
1580MODULE_ALIAS("platform:atmel_usart");
diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c
index 0aa345b9a38b..46bb47f37b9a 100644
--- a/drivers/serial/bfin_5xx.c
+++ b/drivers/serial/bfin_5xx.c
@@ -1243,6 +1243,7 @@ static struct platform_driver bfin_serial_driver = {
1243 .resume = bfin_serial_resume, 1243 .resume = bfin_serial_resume,
1244 .driver = { 1244 .driver = {
1245 .name = "bfin-uart", 1245 .name = "bfin-uart",
1246 .owner = THIS_MODULE,
1246 }, 1247 },
1247}; 1248};
1248 1249
@@ -1301,3 +1302,4 @@ MODULE_AUTHOR("Aubrey.Li <aubrey.li@analog.com>");
1301MODULE_DESCRIPTION("Blackfin generic serial port driver"); 1302MODULE_DESCRIPTION("Blackfin generic serial port driver");
1302MODULE_LICENSE("GPL"); 1303MODULE_LICENSE("GPL");
1303MODULE_ALIAS_CHARDEV_MAJOR(BFIN_SERIAL_MAJOR); 1304MODULE_ALIAS_CHARDEV_MAJOR(BFIN_SERIAL_MAJOR);
1305MODULE_ALIAS("platform:bfin-uart");
diff --git a/drivers/serial/imx.c b/drivers/serial/imx.c
index 56af1f566a4c..16ba9ac7a566 100644
--- a/drivers/serial/imx.c
+++ b/drivers/serial/imx.c
@@ -1090,6 +1090,7 @@ static struct platform_driver serial_imx_driver = {
1090 .resume = serial_imx_resume, 1090 .resume = serial_imx_resume,
1091 .driver = { 1091 .driver = {
1092 .name = "imx-uart", 1092 .name = "imx-uart",
1093 .owner = THIS_MODULE,
1093 }, 1094 },
1094}; 1095};
1095 1096
@@ -1124,3 +1125,4 @@ module_exit(imx_serial_exit);
1124MODULE_AUTHOR("Sascha Hauer"); 1125MODULE_AUTHOR("Sascha Hauer");
1125MODULE_DESCRIPTION("IMX generic serial port driver"); 1126MODULE_DESCRIPTION("IMX generic serial port driver");
1126MODULE_LICENSE("GPL"); 1127MODULE_LICENSE("GPL");
1128MODULE_ALIAS("platform:imx-uart");
diff --git a/drivers/serial/mcf.c b/drivers/serial/mcf.c
index e76fc72c9b36..7e164e0cd211 100644
--- a/drivers/serial/mcf.c
+++ b/drivers/serial/mcf.c
@@ -649,5 +649,6 @@ module_exit(mcf_exit);
649MODULE_AUTHOR("Greg Ungerer <gerg@snapgear.com>"); 649MODULE_AUTHOR("Greg Ungerer <gerg@snapgear.com>");
650MODULE_DESCRIPTION("Freescale ColdFire UART driver"); 650MODULE_DESCRIPTION("Freescale ColdFire UART driver");
651MODULE_LICENSE("GPL"); 651MODULE_LICENSE("GPL");
652MODULE_ALIAS("platform:mcfuart");
652 653
653/****************************************************************************/ 654/****************************************************************************/
diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c
index a638f23c6c61..d93b3578c5e2 100644
--- a/drivers/serial/mpc52xx_uart.c
+++ b/drivers/serial/mpc52xx_uart.c
@@ -1188,6 +1188,8 @@ mpc52xx_uart_resume(struct platform_device *dev)
1188} 1188}
1189#endif 1189#endif
1190 1190
1191/* work with hotplug and coldplug */
1192MODULE_ALIAS("platform:mpc52xx-psc");
1191 1193
1192static struct platform_driver mpc52xx_uart_platform_driver = { 1194static struct platform_driver mpc52xx_uart_platform_driver = {
1193 .probe = mpc52xx_uart_probe, 1195 .probe = mpc52xx_uart_probe,
diff --git a/drivers/serial/mpsc.c b/drivers/serial/mpsc.c
index cb3a91967742..e8819c43f57d 100644
--- a/drivers/serial/mpsc.c
+++ b/drivers/serial/mpsc.c
@@ -1964,6 +1964,7 @@ static struct platform_driver mpsc_driver = {
1964 .remove = mpsc_drv_remove, 1964 .remove = mpsc_drv_remove,
1965 .driver = { 1965 .driver = {
1966 .name = MPSC_CTLR_NAME, 1966 .name = MPSC_CTLR_NAME,
1967 .owner = THIS_MODULE,
1967 }, 1968 },
1968}; 1969};
1969 1970
@@ -2007,3 +2008,4 @@ MODULE_DESCRIPTION("Generic Marvell MPSC serial/UART driver $Revision: 1.00 $");
2007MODULE_VERSION(MPSC_VERSION); 2008MODULE_VERSION(MPSC_VERSION);
2008MODULE_LICENSE("GPL"); 2009MODULE_LICENSE("GPL");
2009MODULE_ALIAS_CHARDEV_MAJOR(MPSC_MAJOR); 2010MODULE_ALIAS_CHARDEV_MAJOR(MPSC_MAJOR);
2011MODULE_ALIAS("platform:" MPSC_CTLR_NAME);
diff --git a/drivers/serial/netx-serial.c b/drivers/serial/netx-serial.c
index b56f7db45031..3123ffeac8ad 100644
--- a/drivers/serial/netx-serial.c
+++ b/drivers/serial/netx-serial.c
@@ -713,6 +713,7 @@ static struct platform_driver serial_netx_driver = {
713 713
714 .driver = { 714 .driver = {
715 .name = DRIVER_NAME, 715 .name = DRIVER_NAME,
716 .owner = THIS_MODULE,
716 }, 717 },
717}; 718};
718 719
@@ -745,3 +746,4 @@ module_exit(netx_serial_exit);
745MODULE_AUTHOR("Sascha Hauer"); 746MODULE_AUTHOR("Sascha Hauer");
746MODULE_DESCRIPTION("NetX serial port driver"); 747MODULE_DESCRIPTION("NetX serial port driver");
747MODULE_LICENSE("GPL"); 748MODULE_LICENSE("GPL");
749MODULE_ALIAS("platform:" DRIVER_NAME);
diff --git a/drivers/serial/pnx8xxx_uart.c b/drivers/serial/pnx8xxx_uart.c
index 8d01c59e8d04..d0e5a79ea635 100644
--- a/drivers/serial/pnx8xxx_uart.c
+++ b/drivers/serial/pnx8xxx_uart.c
@@ -850,3 +850,4 @@ MODULE_AUTHOR("Embedded Alley Solutions, Inc.");
850MODULE_DESCRIPTION("PNX8XXX SoCs serial port driver"); 850MODULE_DESCRIPTION("PNX8XXX SoCs serial port driver");
851MODULE_LICENSE("GPL"); 851MODULE_LICENSE("GPL");
852MODULE_ALIAS_CHARDEV_MAJOR(SERIAL_PNX8XXX_MAJOR); 852MODULE_ALIAS_CHARDEV_MAJOR(SERIAL_PNX8XXX_MAJOR);
853MODULE_ALIAS("platform:pnx8xxx-uart");
diff --git a/drivers/serial/pxa.c b/drivers/serial/pxa.c
index 352fcb8926a6..b4f7ffb7688d 100644
--- a/drivers/serial/pxa.c
+++ b/drivers/serial/pxa.c
@@ -833,6 +833,7 @@ static struct platform_driver serial_pxa_driver = {
833 .resume = serial_pxa_resume, 833 .resume = serial_pxa_resume,
834 .driver = { 834 .driver = {
835 .name = "pxa2xx-uart", 835 .name = "pxa2xx-uart",
836 .owner = THIS_MODULE,
836 }, 837 },
837}; 838};
838 839
@@ -861,4 +862,4 @@ module_init(serial_pxa_init);
861module_exit(serial_pxa_exit); 862module_exit(serial_pxa_exit);
862 863
863MODULE_LICENSE("GPL"); 864MODULE_LICENSE("GPL");
864 865MODULE_ALIAS("platform:pxa2xx-uart");
diff --git a/drivers/serial/s3c2410.c b/drivers/serial/s3c2410.c
index 45de19366030..4ffa2585429a 100644
--- a/drivers/serial/s3c2410.c
+++ b/drivers/serial/s3c2410.c
@@ -1935,3 +1935,7 @@ console_initcall(s3c24xx_serial_initconsole);
1935MODULE_LICENSE("GPL"); 1935MODULE_LICENSE("GPL");
1936MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>"); 1936MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>");
1937MODULE_DESCRIPTION("Samsung S3C2410/S3C2440/S3C2412 Serial port driver"); 1937MODULE_DESCRIPTION("Samsung S3C2410/S3C2440/S3C2412 Serial port driver");
1938MODULE_ALIAS("platform:s3c2400-uart");
1939MODULE_ALIAS("platform:s3c2410-uart");
1940MODULE_ALIAS("platform:s3c2412-uart");
1941MODULE_ALIAS("platform:s3c2440-uart");
diff --git a/drivers/serial/sa1100.c b/drivers/serial/sa1100.c
index 58a83c27e14b..67b2338913c2 100644
--- a/drivers/serial/sa1100.c
+++ b/drivers/serial/sa1100.c
@@ -884,6 +884,7 @@ static struct platform_driver sa11x0_serial_driver = {
884 .resume = sa1100_serial_resume, 884 .resume = sa1100_serial_resume,
885 .driver = { 885 .driver = {
886 .name = "sa11x0-uart", 886 .name = "sa11x0-uart",
887 .owner = THIS_MODULE,
887 }, 888 },
888}; 889};
889 890
@@ -917,3 +918,4 @@ MODULE_AUTHOR("Deep Blue Solutions Ltd");
917MODULE_DESCRIPTION("SA1100 generic serial port driver $Revision: 1.50 $"); 918MODULE_DESCRIPTION("SA1100 generic serial port driver $Revision: 1.50 $");
918MODULE_LICENSE("GPL"); 919MODULE_LICENSE("GPL");
919MODULE_ALIAS_CHARDEV_MAJOR(SERIAL_SA1100_MAJOR); 920MODULE_ALIAS_CHARDEV_MAJOR(SERIAL_SA1100_MAJOR);
921MODULE_ALIAS("platform:sa11x0-uart");
diff --git a/drivers/serial/sc26xx.c b/drivers/serial/sc26xx.c
index a350b6d2a181..ae2a9e2df777 100644
--- a/drivers/serial/sc26xx.c
+++ b/drivers/serial/sc26xx.c
@@ -732,6 +732,7 @@ static struct platform_driver sc26xx_driver = {
732 .remove = __devexit_p(sc26xx_driver_remove), 732 .remove = __devexit_p(sc26xx_driver_remove),
733 .driver = { 733 .driver = {
734 .name = "SC26xx", 734 .name = "SC26xx",
735 .owner = THIS_MODULE,
735 }, 736 },
736}; 737};
737 738
@@ -753,3 +754,4 @@ MODULE_AUTHOR("Thomas Bogendörfer");
753MODULE_DESCRIPTION("SC681/SC2692 serial driver"); 754MODULE_DESCRIPTION("SC681/SC2692 serial driver");
754MODULE_VERSION("1.0"); 755MODULE_VERSION("1.0");
755MODULE_LICENSE("GPL"); 756MODULE_LICENSE("GPL");
757MODULE_ALIAS("platform:SC26xx");
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c
index 9d244d1644e1..eff593080d4f 100644
--- a/drivers/serial/sh-sci.c
+++ b/drivers/serial/sh-sci.c
@@ -1552,3 +1552,4 @@ module_init(sci_init);
1552module_exit(sci_exit); 1552module_exit(sci_exit);
1553 1553
1554MODULE_LICENSE("GPL"); 1554MODULE_LICENSE("GPL");
1555MODULE_ALIAS("platform:sh-sci");
diff --git a/drivers/serial/uartlite.c b/drivers/serial/uartlite.c
index 4e06ab6bcb6e..b565d5a37499 100644
--- a/drivers/serial/uartlite.c
+++ b/drivers/serial/uartlite.c
@@ -561,6 +561,9 @@ static int __devexit ulite_remove(struct platform_device *pdev)
561 return ulite_release(&pdev->dev); 561 return ulite_release(&pdev->dev);
562} 562}
563 563
564/* work with hotplug and coldplug */
565MODULE_ALIAS("platform:uartlite");
566
564static struct platform_driver ulite_platform_driver = { 567static struct platform_driver ulite_platform_driver = {
565 .probe = ulite_probe, 568 .probe = ulite_probe,
566 .remove = __devexit_p(ulite_remove), 569 .remove = __devexit_p(ulite_remove),
diff --git a/drivers/serial/vr41xx_siu.c b/drivers/serial/vr41xx_siu.c
index 6fd51b0022ca..98ab649c1ff9 100644
--- a/drivers/serial/vr41xx_siu.c
+++ b/drivers/serial/vr41xx_siu.c
@@ -960,3 +960,6 @@ static void __exit vr41xx_siu_exit(void)
960 960
961module_init(vr41xx_siu_init); 961module_init(vr41xx_siu_init);
962module_exit(vr41xx_siu_exit); 962module_exit(vr41xx_siu_exit);
963
964MODULE_LICENSE("GPL");
965MODULE_ALIAS("platform:SIU");
diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c
index 85687aaf9cab..1749a27be066 100644
--- a/drivers/spi/atmel_spi.c
+++ b/drivers/spi/atmel_spi.c
@@ -863,3 +863,4 @@ module_exit(atmel_spi_exit);
863MODULE_DESCRIPTION("Atmel AT32/AT91 SPI Controller driver"); 863MODULE_DESCRIPTION("Atmel AT32/AT91 SPI Controller driver");
864MODULE_AUTHOR("Haavard Skinnemoen <hskinnemoen@atmel.com>"); 864MODULE_AUTHOR("Haavard Skinnemoen <hskinnemoen@atmel.com>");
865MODULE_LICENSE("GPL"); 865MODULE_LICENSE("GPL");
866MODULE_ALIAS("platform:atmel_spi");
diff --git a/drivers/spi/au1550_spi.c b/drivers/spi/au1550_spi.c
index 41a3d00c4515..072c4a595334 100644
--- a/drivers/spi/au1550_spi.c
+++ b/drivers/spi/au1550_spi.c
@@ -958,6 +958,9 @@ static int __exit au1550_spi_remove(struct platform_device *pdev)
958 return 0; 958 return 0;
959} 959}
960 960
961/* work with hotplug and coldplug */
962MODULE_ALIAS("platform:au1550-spi");
963
961static struct platform_driver au1550_spi_drv = { 964static struct platform_driver au1550_spi_drv = {
962 .remove = __exit_p(au1550_spi_remove), 965 .remove = __exit_p(au1550_spi_remove),
963 .driver = { 966 .driver = {
diff --git a/drivers/spi/mpc52xx_psc_spi.c b/drivers/spi/mpc52xx_psc_spi.c
index a86315a0c5b8..90729469d481 100644
--- a/drivers/spi/mpc52xx_psc_spi.c
+++ b/drivers/spi/mpc52xx_psc_spi.c
@@ -500,6 +500,9 @@ static int __exit mpc52xx_psc_spi_remove(struct platform_device *dev)
500 return mpc52xx_psc_spi_do_remove(&dev->dev); 500 return mpc52xx_psc_spi_do_remove(&dev->dev);
501} 501}
502 502
503/* work with hotplug and coldplug */
504MODULE_ALIAS("platform:mpc52xx-psc-spi");
505
503static struct platform_driver mpc52xx_psc_spi_platform_driver = { 506static struct platform_driver mpc52xx_psc_spi_platform_driver = {
504 .remove = __exit_p(mpc52xx_psc_spi_remove), 507 .remove = __exit_p(mpc52xx_psc_spi_remove),
505 .driver = { 508 .driver = {
diff --git a/drivers/spi/omap2_mcspi.c b/drivers/spi/omap2_mcspi.c
index a6ba11afb03f..b1cc148036c1 100644
--- a/drivers/spi/omap2_mcspi.c
+++ b/drivers/spi/omap2_mcspi.c
@@ -1084,6 +1084,9 @@ static int __exit omap2_mcspi_remove(struct platform_device *pdev)
1084 return 0; 1084 return 0;
1085} 1085}
1086 1086
1087/* work with hotplug and coldplug */
1088MODULE_ALIAS("platform:omap2_mcspi");
1089
1087static struct platform_driver omap2_mcspi_driver = { 1090static struct platform_driver omap2_mcspi_driver = {
1088 .driver = { 1091 .driver = {
1089 .name = "omap2_mcspi", 1092 .name = "omap2_mcspi",
diff --git a/drivers/spi/omap_uwire.c b/drivers/spi/omap_uwire.c
index 8245b5153f30..5f00bd6500ef 100644
--- a/drivers/spi/omap_uwire.c
+++ b/drivers/spi/omap_uwire.c
@@ -537,10 +537,12 @@ static int __exit uwire_remove(struct platform_device *pdev)
537 return status; 537 return status;
538} 538}
539 539
540/* work with hotplug and coldplug */
541MODULE_ALIAS("platform:omap_uwire");
542
540static struct platform_driver uwire_driver = { 543static struct platform_driver uwire_driver = {
541 .driver = { 544 .driver = {
542 .name = "omap_uwire", 545 .name = "omap_uwire",
543 .bus = &platform_bus_type,
544 .owner = THIS_MODULE, 546 .owner = THIS_MODULE,
545 }, 547 },
546 .remove = __exit_p(uwire_remove), 548 .remove = __exit_p(uwire_remove),
diff --git a/drivers/spi/pxa2xx_spi.c b/drivers/spi/pxa2xx_spi.c
index 59deed79e0ab..147e26a78d64 100644
--- a/drivers/spi/pxa2xx_spi.c
+++ b/drivers/spi/pxa2xx_spi.c
@@ -44,6 +44,7 @@
44MODULE_AUTHOR("Stephen Street"); 44MODULE_AUTHOR("Stephen Street");
45MODULE_DESCRIPTION("PXA2xx SSP SPI Controller"); 45MODULE_DESCRIPTION("PXA2xx SSP SPI Controller");
46MODULE_LICENSE("GPL"); 46MODULE_LICENSE("GPL");
47MODULE_ALIAS("platform:pxa2xx-spi");
47 48
48#define MAX_BUSES 3 49#define MAX_BUSES 3
49 50
@@ -1581,7 +1582,6 @@ static int pxa2xx_spi_resume(struct platform_device *pdev)
1581static struct platform_driver driver = { 1582static struct platform_driver driver = {
1582 .driver = { 1583 .driver = {
1583 .name = "pxa2xx-spi", 1584 .name = "pxa2xx-spi",
1584 .bus = &platform_bus_type,
1585 .owner = THIS_MODULE, 1585 .owner = THIS_MODULE,
1586 }, 1586 },
1587 .remove = pxa2xx_spi_remove, 1587 .remove = pxa2xx_spi_remove,
diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c
index d853fceb6bf0..a9ac1fdb3094 100644
--- a/drivers/spi/spi_bfin5xx.c
+++ b/drivers/spi/spi_bfin5xx.c
@@ -713,8 +713,8 @@ static void pump_transfers(unsigned long data)
713 } else { 713 } else {
714 drv_data->len = transfer->len; 714 drv_data->len = transfer->len;
715 } 715 }
716 dev_dbg(&drv_data->pdev->dev, "transfer: ", 716 dev_dbg(&drv_data->pdev->dev,
717 "drv_data->write is %p, chip->write is %p, null_wr is %p\n", 717 "transfer: drv_data->write is %p, chip->write is %p, null_wr is %p\n",
718 drv_data->write, chip->write, null_writer); 718 drv_data->write, chip->write, null_writer);
719 719
720 /* speed and width has been set on per message */ 720 /* speed and width has been set on per message */
@@ -1294,6 +1294,12 @@ static int __init bfin5xx_spi_probe(struct platform_device *pdev)
1294 goto out_error_queue_alloc; 1294 goto out_error_queue_alloc;
1295 } 1295 }
1296 1296
1297 status = peripheral_request_list(drv_data->pin_req, DRV_NAME);
1298 if (status != 0) {
1299 dev_err(&pdev->dev, ": Requesting Peripherals failed\n");
1300 goto out_error_queue_alloc;
1301 }
1302
1297 /* Register with the SPI framework */ 1303 /* Register with the SPI framework */
1298 platform_set_drvdata(pdev, drv_data); 1304 platform_set_drvdata(pdev, drv_data);
1299 status = spi_register_master(master); 1305 status = spi_register_master(master);
@@ -1302,12 +1308,6 @@ static int __init bfin5xx_spi_probe(struct platform_device *pdev)
1302 goto out_error_queue_alloc; 1308 goto out_error_queue_alloc;
1303 } 1309 }
1304 1310
1305 status = peripheral_request_list(drv_data->pin_req, DRV_NAME);
1306 if (status != 0) {
1307 dev_err(&pdev->dev, ": Requesting Peripherals failed\n");
1308 goto out_error;
1309 }
1310
1311 dev_info(dev, "%s, Version %s, regs_base@%p, dma channel@%d\n", 1311 dev_info(dev, "%s, Version %s, regs_base@%p, dma channel@%d\n",
1312 DRV_DESC, DRV_VERSION, drv_data->regs_base, 1312 DRV_DESC, DRV_VERSION, drv_data->regs_base,
1313 drv_data->dma_channel); 1313 drv_data->dma_channel);
@@ -1319,7 +1319,6 @@ out_error_no_dma_ch:
1319 iounmap((void *) drv_data->regs_base); 1319 iounmap((void *) drv_data->regs_base);
1320out_error_ioremap: 1320out_error_ioremap:
1321out_error_get_res: 1321out_error_get_res:
1322out_error:
1323 spi_master_put(master); 1322 spi_master_put(master);
1324 1323
1325 return status; 1324 return status;
@@ -1397,7 +1396,7 @@ static int bfin5xx_spi_resume(struct platform_device *pdev)
1397#define bfin5xx_spi_resume NULL 1396#define bfin5xx_spi_resume NULL
1398#endif /* CONFIG_PM */ 1397#endif /* CONFIG_PM */
1399 1398
1400MODULE_ALIAS("bfin-spi-master"); /* for platform bus hotplug */ 1399MODULE_ALIAS("platform:bfin-spi");
1401static struct platform_driver bfin5xx_spi_driver = { 1400static struct platform_driver bfin5xx_spi_driver = {
1402 .driver = { 1401 .driver = {
1403 .name = DRV_NAME, 1402 .name = DRV_NAME,
diff --git a/drivers/spi/spi_imx.c b/drivers/spi/spi_imx.c
index 1b0647124933..d4ba640366b6 100644
--- a/drivers/spi/spi_imx.c
+++ b/drivers/spi/spi_imx.c
@@ -1722,10 +1722,12 @@ static int spi_imx_resume(struct platform_device *pdev)
1722#define spi_imx_resume NULL 1722#define spi_imx_resume NULL
1723#endif /* CONFIG_PM */ 1723#endif /* CONFIG_PM */
1724 1724
1725/* work with hotplug and coldplug */
1726MODULE_ALIAS("platform:spi_imx");
1727
1725static struct platform_driver driver = { 1728static struct platform_driver driver = {
1726 .driver = { 1729 .driver = {
1727 .name = "spi_imx", 1730 .name = "spi_imx",
1728 .bus = &platform_bus_type,
1729 .owner = THIS_MODULE, 1731 .owner = THIS_MODULE,
1730 }, 1732 },
1731 .remove = __exit_p(spi_imx_remove), 1733 .remove = __exit_p(spi_imx_remove),
diff --git a/drivers/spi/spi_mpc83xx.c b/drivers/spi/spi_mpc83xx.c
index 04f7cd9fc261..be15a6213205 100644
--- a/drivers/spi/spi_mpc83xx.c
+++ b/drivers/spi/spi_mpc83xx.c
@@ -523,11 +523,12 @@ static int __exit mpc83xx_spi_remove(struct platform_device *dev)
523 return 0; 523 return 0;
524} 524}
525 525
526MODULE_ALIAS("mpc83xx_spi"); /* for platform bus hotplug */ 526MODULE_ALIAS("platform:mpc83xx_spi");
527static struct platform_driver mpc83xx_spi_driver = { 527static struct platform_driver mpc83xx_spi_driver = {
528 .remove = __exit_p(mpc83xx_spi_remove), 528 .remove = __exit_p(mpc83xx_spi_remove),
529 .driver = { 529 .driver = {
530 .name = "mpc83xx_spi", 530 .name = "mpc83xx_spi",
531 .owner = THIS_MODULE,
531 }, 532 },
532}; 533};
533 534
diff --git a/drivers/spi/spi_s3c24xx.c b/drivers/spi/spi_s3c24xx.c
index 6e834b8b9d27..b7476b888197 100644
--- a/drivers/spi/spi_s3c24xx.c
+++ b/drivers/spi/spi_s3c24xx.c
@@ -192,8 +192,11 @@ static int s3c24xx_spi_txrx(struct spi_device *spi, struct spi_transfer *t)
192 hw->len = t->len; 192 hw->len = t->len;
193 hw->count = 0; 193 hw->count = 0;
194 194
195 init_completion(&hw->done);
196
195 /* send the first byte */ 197 /* send the first byte */
196 writeb(hw_txbyte(hw, 0), hw->regs + S3C2410_SPTDAT); 198 writeb(hw_txbyte(hw, 0), hw->regs + S3C2410_SPTDAT);
199
197 wait_for_completion(&hw->done); 200 wait_for_completion(&hw->done);
198 201
199 return hw->count; 202 return hw->count;
@@ -235,6 +238,7 @@ static irqreturn_t s3c24xx_spi_irq(int irq, void *dev)
235 238
236static int __init s3c24xx_spi_probe(struct platform_device *pdev) 239static int __init s3c24xx_spi_probe(struct platform_device *pdev)
237{ 240{
241 struct s3c2410_spi_info *pdata;
238 struct s3c24xx_spi *hw; 242 struct s3c24xx_spi *hw;
239 struct spi_master *master; 243 struct spi_master *master;
240 struct resource *res; 244 struct resource *res;
@@ -251,10 +255,10 @@ static int __init s3c24xx_spi_probe(struct platform_device *pdev)
251 memset(hw, 0, sizeof(struct s3c24xx_spi)); 255 memset(hw, 0, sizeof(struct s3c24xx_spi));
252 256
253 hw->master = spi_master_get(master); 257 hw->master = spi_master_get(master);
254 hw->pdata = pdev->dev.platform_data; 258 hw->pdata = pdata = pdev->dev.platform_data;
255 hw->dev = &pdev->dev; 259 hw->dev = &pdev->dev;
256 260
257 if (hw->pdata == NULL) { 261 if (pdata == NULL) {
258 dev_err(&pdev->dev, "No platform data supplied\n"); 262 dev_err(&pdev->dev, "No platform data supplied\n");
259 err = -ENOENT; 263 err = -ENOENT;
260 goto err_no_pdata; 264 goto err_no_pdata;
@@ -263,6 +267,10 @@ static int __init s3c24xx_spi_probe(struct platform_device *pdev)
263 platform_set_drvdata(pdev, hw); 267 platform_set_drvdata(pdev, hw);
264 init_completion(&hw->done); 268 init_completion(&hw->done);
265 269
270 /* setup the master state. */
271
272 master->num_chipselect = hw->pdata->num_cs;
273
266 /* setup the state for the bitbang driver */ 274 /* setup the state for the bitbang driver */
267 275
268 hw->bitbang.master = hw->master; 276 hw->bitbang.master = hw->master;
@@ -330,13 +338,13 @@ static int __init s3c24xx_spi_probe(struct platform_device *pdev)
330 338
331 /* setup any gpio we can */ 339 /* setup any gpio we can */
332 340
333 if (!hw->pdata->set_cs) { 341 if (!pdata->set_cs) {
334 hw->set_cs = s3c24xx_spi_gpiocs; 342 hw->set_cs = s3c24xx_spi_gpiocs;
335 343
336 s3c2410_gpio_setpin(hw->pdata->pin_cs, 1); 344 s3c2410_gpio_setpin(pdata->pin_cs, 1);
337 s3c2410_gpio_cfgpin(hw->pdata->pin_cs, S3C2410_GPIO_OUTPUT); 345 s3c2410_gpio_cfgpin(pdata->pin_cs, S3C2410_GPIO_OUTPUT);
338 } else 346 } else
339 hw->set_cs = hw->pdata->set_cs; 347 hw->set_cs = pdata->set_cs;
340 348
341 /* register our spi controller */ 349 /* register our spi controller */
342 350
@@ -415,7 +423,7 @@ static int s3c24xx_spi_resume(struct platform_device *pdev)
415#define s3c24xx_spi_resume NULL 423#define s3c24xx_spi_resume NULL
416#endif 424#endif
417 425
418MODULE_ALIAS("s3c2410_spi"); /* for platform bus hotplug */ 426MODULE_ALIAS("platform:s3c2410-spi");
419static struct platform_driver s3c24xx_spidrv = { 427static struct platform_driver s3c24xx_spidrv = {
420 .remove = __exit_p(s3c24xx_spi_remove), 428 .remove = __exit_p(s3c24xx_spi_remove),
421 .suspend = s3c24xx_spi_suspend, 429 .suspend = s3c24xx_spi_suspend,
diff --git a/drivers/spi/spi_s3c24xx_gpio.c b/drivers/spi/spi_s3c24xx_gpio.c
index 82ae7d7eca38..e33f6145c560 100644
--- a/drivers/spi/spi_s3c24xx_gpio.c
+++ b/drivers/spi/spi_s3c24xx_gpio.c
@@ -168,6 +168,8 @@ static int s3c2410_spigpio_remove(struct platform_device *dev)
168#define s3c2410_spigpio_suspend NULL 168#define s3c2410_spigpio_suspend NULL
169#define s3c2410_spigpio_resume NULL 169#define s3c2410_spigpio_resume NULL
170 170
171/* work with hotplug and coldplug */
172MODULE_ALIAS("platform:spi_s3c24xx_gpio");
171 173
172static struct platform_driver s3c2410_spigpio_drv = { 174static struct platform_driver s3c2410_spigpio_drv = {
173 .probe = s3c2410_spigpio_probe, 175 .probe = s3c2410_spigpio_probe,
diff --git a/drivers/spi/spi_sh_sci.c b/drivers/spi/spi_sh_sci.c
index 3dbe71b16d60..7d36720eb982 100644
--- a/drivers/spi/spi_sh_sci.c
+++ b/drivers/spi/spi_sh_sci.c
@@ -203,3 +203,4 @@ module_exit(sh_sci_spi_exit);
203MODULE_DESCRIPTION("SH SCI SPI Driver"); 203MODULE_DESCRIPTION("SH SCI SPI Driver");
204MODULE_AUTHOR("Magnus Damm <damm@opensource.se>"); 204MODULE_AUTHOR("Magnus Damm <damm@opensource.se>");
205MODULE_LICENSE("GPL"); 205MODULE_LICENSE("GPL");
206MODULE_ALIAS("platform:spi_sh_sci");
diff --git a/drivers/spi/spi_txx9.c b/drivers/spi/spi_txx9.c
index 363ac8e68821..2296f37ea3c6 100644
--- a/drivers/spi/spi_txx9.c
+++ b/drivers/spi/spi_txx9.c
@@ -450,6 +450,9 @@ static int __exit txx9spi_remove(struct platform_device *dev)
450 return 0; 450 return 0;
451} 451}
452 452
453/* work with hotplug and coldplug */
454MODULE_ALIAS("platform:spi_txx9");
455
453static struct platform_driver txx9spi_driver = { 456static struct platform_driver txx9spi_driver = {
454 .remove = __exit_p(txx9spi_remove), 457 .remove = __exit_p(txx9spi_remove),
455 .driver = { 458 .driver = {
diff --git a/drivers/spi/xilinx_spi.c b/drivers/spi/xilinx_spi.c
index 5d04f520c123..cf6aef34fe25 100644
--- a/drivers/spi/xilinx_spi.c
+++ b/drivers/spi/xilinx_spi.c
@@ -408,6 +408,9 @@ static int __devexit xilinx_spi_remove(struct platform_device *dev)
408 return 0; 408 return 0;
409} 409}
410 410
411/* work with hotplug and coldplug */
412MODULE_ALIAS("platform:" XILINX_SPI_NAME);
413
411static struct platform_driver xilinx_spi_driver = { 414static struct platform_driver xilinx_spi_driver = {
412 .probe = xilinx_spi_probe, 415 .probe = xilinx_spi_probe,
413 .remove = __devexit_p(xilinx_spi_remove), 416 .remove = __devexit_p(xilinx_spi_remove),
diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c
index 6ce92e82b64e..7cf8851286b5 100644
--- a/drivers/ssb/main.c
+++ b/drivers/ssb/main.c
@@ -462,15 +462,18 @@ static int ssb_devices_register(struct ssb_bus *bus)
462#ifdef CONFIG_SSB_PCIHOST 462#ifdef CONFIG_SSB_PCIHOST
463 sdev->irq = bus->host_pci->irq; 463 sdev->irq = bus->host_pci->irq;
464 dev->parent = &bus->host_pci->dev; 464 dev->parent = &bus->host_pci->dev;
465 sdev->dma_dev = &bus->host_pci->dev;
465#endif 466#endif
466 break; 467 break;
467 case SSB_BUSTYPE_PCMCIA: 468 case SSB_BUSTYPE_PCMCIA:
468#ifdef CONFIG_SSB_PCMCIAHOST 469#ifdef CONFIG_SSB_PCMCIAHOST
469 sdev->irq = bus->host_pcmcia->irq.AssignedIRQ; 470 sdev->irq = bus->host_pcmcia->irq.AssignedIRQ;
470 dev->parent = &bus->host_pcmcia->dev; 471 dev->parent = &bus->host_pcmcia->dev;
472 sdev->dma_dev = &bus->host_pcmcia->dev;
471#endif 473#endif
472 break; 474 break;
473 case SSB_BUSTYPE_SSB: 475 case SSB_BUSTYPE_SSB:
476 sdev->dma_dev = dev;
474 break; 477 break;
475 } 478 }
476 479
@@ -1164,15 +1167,14 @@ EXPORT_SYMBOL(ssb_dma_translation);
1164 1167
1165int ssb_dma_set_mask(struct ssb_device *ssb_dev, u64 mask) 1168int ssb_dma_set_mask(struct ssb_device *ssb_dev, u64 mask)
1166{ 1169{
1167 struct device *dev = ssb_dev->dev; 1170 struct device *dma_dev = ssb_dev->dma_dev;
1168 1171
1169#ifdef CONFIG_SSB_PCIHOST 1172#ifdef CONFIG_SSB_PCIHOST
1170 if (ssb_dev->bus->bustype == SSB_BUSTYPE_PCI && 1173 if (ssb_dev->bus->bustype == SSB_BUSTYPE_PCI)
1171 !dma_supported(dev, mask)) 1174 return dma_set_mask(dma_dev, mask);
1172 return -EIO;
1173#endif 1175#endif
1174 dev->coherent_dma_mask = mask; 1176 dma_dev->coherent_dma_mask = mask;
1175 dev->dma_mask = &dev->coherent_dma_mask; 1177 dma_dev->dma_mask = &dma_dev->coherent_dma_mask;
1176 1178
1177 return 0; 1179 return 0;
1178} 1180}
diff --git a/drivers/thermal/thermal.c b/drivers/thermal/thermal.c
index 8b86e53ccf7a..7f79bbf652d7 100644
--- a/drivers/thermal/thermal.c
+++ b/drivers/thermal/thermal.c
@@ -196,6 +196,10 @@ static struct device_attribute trip_point_attrs[] = {
196 __ATTR(trip_point_8_temp, 0444, trip_point_temp_show, NULL), 196 __ATTR(trip_point_8_temp, 0444, trip_point_temp_show, NULL),
197 __ATTR(trip_point_9_type, 0444, trip_point_type_show, NULL), 197 __ATTR(trip_point_9_type, 0444, trip_point_type_show, NULL),
198 __ATTR(trip_point_9_temp, 0444, trip_point_temp_show, NULL), 198 __ATTR(trip_point_9_temp, 0444, trip_point_temp_show, NULL),
199 __ATTR(trip_point_10_type, 0444, trip_point_type_show, NULL),
200 __ATTR(trip_point_10_temp, 0444, trip_point_temp_show, NULL),
201 __ATTR(trip_point_11_type, 0444, trip_point_type_show, NULL),
202 __ATTR(trip_point_11_temp, 0444, trip_point_temp_show, NULL),
199}; 203};
200 204
201#define TRIP_POINT_ATTR_ADD(_dev, _index, result) \ 205#define TRIP_POINT_ATTR_ADD(_dev, _index, result) \
diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
index a83e8b798ec9..fd15ced899d8 100644
--- a/drivers/usb/gadget/at91_udc.c
+++ b/drivers/usb/gadget/at91_udc.c
@@ -1884,3 +1884,4 @@ module_exit(udc_exit_module);
1884MODULE_DESCRIPTION("AT91 udc driver"); 1884MODULE_DESCRIPTION("AT91 udc driver");
1885MODULE_AUTHOR("Thomas Rathbone, David Brownell"); 1885MODULE_AUTHOR("Thomas Rathbone, David Brownell");
1886MODULE_LICENSE("GPL"); 1886MODULE_LICENSE("GPL");
1887MODULE_ALIAS("platform:at91_udc");
diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c
index af8b2a3a2d4a..b0db4c31d018 100644
--- a/drivers/usb/gadget/atmel_usba_udc.c
+++ b/drivers/usb/gadget/atmel_usba_udc.c
@@ -2054,6 +2054,7 @@ static struct platform_driver udc_driver = {
2054 .remove = __exit_p(usba_udc_remove), 2054 .remove = __exit_p(usba_udc_remove),
2055 .driver = { 2055 .driver = {
2056 .name = "atmel_usba_udc", 2056 .name = "atmel_usba_udc",
2057 .owner = THIS_MODULE,
2057 }, 2058 },
2058}; 2059};
2059 2060
@@ -2072,3 +2073,4 @@ module_exit(udc_exit);
2072MODULE_DESCRIPTION("Atmel USBA UDC driver"); 2073MODULE_DESCRIPTION("Atmel USBA UDC driver");
2073MODULE_AUTHOR("Haavard Skinnemoen <hskinnemoen@atmel.com>"); 2074MODULE_AUTHOR("Haavard Skinnemoen <hskinnemoen@atmel.com>");
2074MODULE_LICENSE("GPL"); 2075MODULE_LICENSE("GPL");
2076MODULE_ALIAS("platform:atmel_usba_udc");
diff --git a/drivers/usb/gadget/fsl_usb2_udc.c b/drivers/usb/gadget/fsl_usb2_udc.c
index 63e8fa3a69e1..254012ad2b91 100644
--- a/drivers/usb/gadget/fsl_usb2_udc.c
+++ b/drivers/usb/gadget/fsl_usb2_udc.c
@@ -2475,3 +2475,4 @@ module_exit(udc_exit);
2475MODULE_DESCRIPTION(DRIVER_DESC); 2475MODULE_DESCRIPTION(DRIVER_DESC);
2476MODULE_AUTHOR(DRIVER_AUTHOR); 2476MODULE_AUTHOR(DRIVER_AUTHOR);
2477MODULE_LICENSE("GPL"); 2477MODULE_LICENSE("GPL");
2478MODULE_ALIAS("platform:fsl-usb2-udc");
diff --git a/drivers/usb/gadget/lh7a40x_udc.c b/drivers/usb/gadget/lh7a40x_udc.c
index 37243ef7104e..078f72467671 100644
--- a/drivers/usb/gadget/lh7a40x_udc.c
+++ b/drivers/usb/gadget/lh7a40x_udc.c
@@ -2146,3 +2146,4 @@ module_exit(udc_exit);
2146MODULE_DESCRIPTION(DRIVER_DESC); 2146MODULE_DESCRIPTION(DRIVER_DESC);
2147MODULE_AUTHOR("Mikko Lahteenmaki, Bo Henriksen"); 2147MODULE_AUTHOR("Mikko Lahteenmaki, Bo Henriksen");
2148MODULE_LICENSE("GPL"); 2148MODULE_LICENSE("GPL");
2149MODULE_ALIAS("platform:lh7a40x_udc");
diff --git a/drivers/usb/gadget/m66592-udc.c b/drivers/usb/gadget/m66592-udc.c
index 835948f0715a..ee6b35fa870f 100644
--- a/drivers/usb/gadget/m66592-udc.c
+++ b/drivers/usb/gadget/m66592-udc.c
@@ -35,6 +35,7 @@
35MODULE_DESCRIPTION("M66592 USB gadget driver"); 35MODULE_DESCRIPTION("M66592 USB gadget driver");
36MODULE_LICENSE("GPL"); 36MODULE_LICENSE("GPL");
37MODULE_AUTHOR("Yoshihiro Shimoda"); 37MODULE_AUTHOR("Yoshihiro Shimoda");
38MODULE_ALIAS("platform:m66592_udc");
38 39
39#define DRIVER_VERSION "18 Oct 2007" 40#define DRIVER_VERSION "18 Oct 2007"
40 41
@@ -1671,6 +1672,7 @@ static struct platform_driver m66592_driver = {
1671 .remove = __exit_p(m66592_remove), 1672 .remove = __exit_p(m66592_remove),
1672 .driver = { 1673 .driver = {
1673 .name = (char *) udc_name, 1674 .name = (char *) udc_name,
1675 .owner = THIS_MODULE,
1674 }, 1676 },
1675}; 1677};
1676 1678
diff --git a/drivers/usb/gadget/omap_udc.c b/drivers/usb/gadget/omap_udc.c
index e6d68bda428a..ee1e9a314cd1 100644
--- a/drivers/usb/gadget/omap_udc.c
+++ b/drivers/usb/gadget/omap_udc.c
@@ -3109,4 +3109,4 @@ module_exit(udc_exit);
3109 3109
3110MODULE_DESCRIPTION(DRIVER_DESC); 3110MODULE_DESCRIPTION(DRIVER_DESC);
3111MODULE_LICENSE("GPL"); 3111MODULE_LICENSE("GPL");
3112 3112MODULE_ALIAS("platform:omap_udc");
diff --git a/drivers/usb/gadget/pxa2xx_udc.c b/drivers/usb/gadget/pxa2xx_udc.c
index 096c41cc40d1..c00cd8b9d3d1 100644
--- a/drivers/usb/gadget/pxa2xx_udc.c
+++ b/drivers/usb/gadget/pxa2xx_udc.c
@@ -2380,4 +2380,4 @@ module_exit(udc_exit);
2380MODULE_DESCRIPTION(DRIVER_DESC); 2380MODULE_DESCRIPTION(DRIVER_DESC);
2381MODULE_AUTHOR("Frank Becker, Robert Schwebel, David Brownell"); 2381MODULE_AUTHOR("Frank Becker, Robert Schwebel, David Brownell");
2382MODULE_LICENSE("GPL"); 2382MODULE_LICENSE("GPL");
2383 2383MODULE_ALIAS("platform:pxa2xx-udc");
diff --git a/drivers/usb/gadget/s3c2410_udc.c b/drivers/usb/gadget/s3c2410_udc.c
index aadc4204d6f9..6b1ef488043b 100644
--- a/drivers/usb/gadget/s3c2410_udc.c
+++ b/drivers/usb/gadget/s3c2410_udc.c
@@ -2047,3 +2047,5 @@ MODULE_AUTHOR(DRIVER_AUTHOR);
2047MODULE_DESCRIPTION(DRIVER_DESC); 2047MODULE_DESCRIPTION(DRIVER_DESC);
2048MODULE_VERSION(DRIVER_VERSION); 2048MODULE_VERSION(DRIVER_VERSION);
2049MODULE_LICENSE("GPL"); 2049MODULE_LICENSE("GPL");
2050MODULE_ALIAS("platform:s3c2410-usbgadget");
2051MODULE_ALIAS("platform:s3c2440-usbgadget");
diff --git a/drivers/usb/host/isp116x-hcd.c b/drivers/usb/host/isp116x-hcd.c
index d7071c855758..203a3359a648 100644
--- a/drivers/usb/host/isp116x-hcd.c
+++ b/drivers/usb/host/isp116x-hcd.c
@@ -1684,14 +1684,18 @@ static int isp116x_resume(struct platform_device *dev)
1684 1684
1685#endif 1685#endif
1686 1686
1687/* work with hotplug and coldplug */
1688MODULE_ALIAS("platform:isp116x-hcd");
1689
1687static struct platform_driver isp116x_driver = { 1690static struct platform_driver isp116x_driver = {
1688 .probe = isp116x_probe, 1691 .probe = isp116x_probe,
1689 .remove = isp116x_remove, 1692 .remove = isp116x_remove,
1690 .suspend = isp116x_suspend, 1693 .suspend = isp116x_suspend,
1691 .resume = isp116x_resume, 1694 .resume = isp116x_resume,
1692 .driver = { 1695 .driver = {
1693 .name = (char *)hcd_name, 1696 .name = (char *)hcd_name,
1694 }, 1697 .owner = THIS_MODULE,
1698 },
1695}; 1699};
1696 1700
1697/*-----------------------------------------------------------------*/ 1701/*-----------------------------------------------------------------*/
diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c
index 126fcbdd6408..d72dc07dda01 100644
--- a/drivers/usb/host/ohci-at91.c
+++ b/drivers/usb/host/ohci-at91.c
@@ -355,7 +355,7 @@ static int ohci_hcd_at91_drv_resume(struct platform_device *pdev)
355#define ohci_hcd_at91_drv_resume NULL 355#define ohci_hcd_at91_drv_resume NULL
356#endif 356#endif
357 357
358MODULE_ALIAS("at91_ohci"); 358MODULE_ALIAS("platform:at91_ohci");
359 359
360static struct platform_driver ohci_hcd_at91_driver = { 360static struct platform_driver ohci_hcd_at91_driver = {
361 .probe = ohci_hcd_at91_drv_probe, 361 .probe = ohci_hcd_at91_drv_probe,
@@ -368,4 +368,3 @@ static struct platform_driver ohci_hcd_at91_driver = {
368 .owner = THIS_MODULE, 368 .owner = THIS_MODULE,
369 }, 369 },
370}; 370};
371
diff --git a/drivers/usb/host/ohci-au1xxx.c b/drivers/usb/host/ohci-au1xxx.c
index 663a0600b6e7..f90fe0c7373f 100644
--- a/drivers/usb/host/ohci-au1xxx.c
+++ b/drivers/usb/host/ohci-au1xxx.c
@@ -345,3 +345,4 @@ static struct platform_driver ohci_hcd_au1xxx_driver = {
345 }, 345 },
346}; 346};
347 347
348MODULE_ALIAS("platform:au1xxx-ohci");
diff --git a/drivers/usb/host/ohci-ep93xx.c b/drivers/usb/host/ohci-ep93xx.c
index a68ce9d3c525..156e93a9d0df 100644
--- a/drivers/usb/host/ohci-ep93xx.c
+++ b/drivers/usb/host/ohci-ep93xx.c
@@ -211,6 +211,8 @@ static struct platform_driver ohci_hcd_ep93xx_driver = {
211#endif 211#endif
212 .driver = { 212 .driver = {
213 .name = "ep93xx-ohci", 213 .name = "ep93xx-ohci",
214 .owner = THIS_MODULE,
214 }, 215 },
215}; 216};
216 217
218MODULE_ALIAS("platform:ep93xx-ohci");
diff --git a/drivers/usb/host/ohci-lh7a404.c b/drivers/usb/host/ohci-lh7a404.c
index 4a043abd85ea..13c12ed22252 100644
--- a/drivers/usb/host/ohci-lh7a404.c
+++ b/drivers/usb/host/ohci-lh7a404.c
@@ -251,3 +251,4 @@ static struct platform_driver ohci_hcd_lh7a404_driver = {
251 }, 251 },
252}; 252};
253 253
254MODULE_ALIAS("platform:lh7a404-ohci");
diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c
index 74e1f4be10bb..7bfca1ed1b58 100644
--- a/drivers/usb/host/ohci-omap.c
+++ b/drivers/usb/host/ohci-omap.c
@@ -544,3 +544,4 @@ static struct platform_driver ohci_hcd_omap_driver = {
544 }, 544 },
545}; 545};
546 546
547MODULE_ALIAS("platform:ohci");
diff --git a/drivers/usb/host/ohci-pnx4008.c b/drivers/usb/host/ohci-pnx4008.c
index 6c52c66b659f..28b458f20cc3 100644
--- a/drivers/usb/host/ohci-pnx4008.c
+++ b/drivers/usb/host/ohci-pnx4008.c
@@ -456,9 +456,13 @@ static int usb_hcd_pnx4008_remove(struct platform_device *pdev)
456 return 0; 456 return 0;
457} 457}
458 458
459/* work with hotplug and coldplug */
460MODULE_ALIAS("platform:usb-ohci");
461
459static struct platform_driver usb_hcd_pnx4008_driver = { 462static struct platform_driver usb_hcd_pnx4008_driver = {
460 .driver = { 463 .driver = {
461 .name = "usb-ohci", 464 .name = "usb-ohci",
465 .owner = THIS_MODULE,
462 }, 466 },
463 .probe = usb_hcd_pnx4008_probe, 467 .probe = usb_hcd_pnx4008_probe,
464 .remove = usb_hcd_pnx4008_remove, 468 .remove = usb_hcd_pnx4008_remove,
diff --git a/drivers/usb/host/ohci-pnx8550.c b/drivers/usb/host/ohci-pnx8550.c
index 85fdfd2a7ad0..605d59cba28e 100644
--- a/drivers/usb/host/ohci-pnx8550.c
+++ b/drivers/usb/host/ohci-pnx8550.c
@@ -230,11 +230,12 @@ static int ohci_hcd_pnx8550_drv_remove(struct platform_device *pdev)
230 return 0; 230 return 0;
231} 231}
232 232
233MODULE_ALIAS("pnx8550-ohci"); 233MODULE_ALIAS("platform:pnx8550-ohci");
234 234
235static struct platform_driver ohci_hcd_pnx8550_driver = { 235static struct platform_driver ohci_hcd_pnx8550_driver = {
236 .driver = { 236 .driver = {
237 .name = "pnx8550-ohci", 237 .name = "pnx8550-ohci",
238 .owner = THIS_MODULE,
238 }, 239 },
239 .probe = ohci_hcd_pnx8550_drv_probe, 240 .probe = ohci_hcd_pnx8550_drv_probe,
240 .remove = ohci_hcd_pnx8550_drv_remove, 241 .remove = ohci_hcd_pnx8550_drv_remove,
diff --git a/drivers/usb/host/ohci-ppc-soc.c b/drivers/usb/host/ohci-ppc-soc.c
index f95be1896b0d..523c30125577 100644
--- a/drivers/usb/host/ohci-ppc-soc.c
+++ b/drivers/usb/host/ohci-ppc-soc.c
@@ -213,3 +213,4 @@ static struct platform_driver ohci_hcd_ppc_soc_driver = {
213 }, 213 },
214}; 214};
215 215
216MODULE_ALIAS("platform:ppc-soc-ohci");
diff --git a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c
index ff9a79843471..8ad9b3b604b5 100644
--- a/drivers/usb/host/ohci-pxa27x.c
+++ b/drivers/usb/host/ohci-pxa27x.c
@@ -364,6 +364,8 @@ static int ohci_hcd_pxa27x_drv_resume(struct platform_device *pdev)
364} 364}
365#endif 365#endif
366 366
367/* work with hotplug and coldplug */
368MODULE_ALIAS("platform:pxa27x-ohci");
367 369
368static struct platform_driver ohci_hcd_pxa27x_driver = { 370static struct platform_driver ohci_hcd_pxa27x_driver = {
369 .probe = ohci_hcd_pxa27x_drv_probe, 371 .probe = ohci_hcd_pxa27x_drv_probe,
@@ -375,6 +377,7 @@ static struct platform_driver ohci_hcd_pxa27x_driver = {
375#endif 377#endif
376 .driver = { 378 .driver = {
377 .name = "pxa27x-ohci", 379 .name = "pxa27x-ohci",
380 .owner = THIS_MODULE,
378 }, 381 },
379}; 382};
380 383
diff --git a/drivers/usb/host/ohci-s3c2410.c b/drivers/usb/host/ohci-s3c2410.c
index 44b79e8a6e25..ead4772f0f27 100644
--- a/drivers/usb/host/ohci-s3c2410.c
+++ b/drivers/usb/host/ohci-s3c2410.c
@@ -501,3 +501,4 @@ static struct platform_driver ohci_hcd_s3c2410_driver = {
501 }, 501 },
502}; 502};
503 503
504MODULE_ALIAS("platform:s3c2410-ohci");
diff --git a/drivers/usb/host/ohci-sh.c b/drivers/usb/host/ohci-sh.c
index 5309ac039e15..e7ee607278fe 100644
--- a/drivers/usb/host/ohci-sh.c
+++ b/drivers/usb/host/ohci-sh.c
@@ -141,3 +141,4 @@ static struct platform_driver ohci_hcd_sh_driver = {
141 }, 141 },
142}; 142};
143 143
144MODULE_ALIAS("platform:sh_ohci");
diff --git a/drivers/usb/host/ohci-sm501.c b/drivers/usb/host/ohci-sm501.c
index a97070142869..4ea92762fb28 100644
--- a/drivers/usb/host/ohci-sm501.c
+++ b/drivers/usb/host/ohci-sm501.c
@@ -262,3 +262,4 @@ static struct platform_driver ohci_hcd_sm501_driver = {
262 .name = "sm501-usb", 262 .name = "sm501-usb",
263 }, 263 },
264}; 264};
265MODULE_ALIAS("platform:sm501-usb");
diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c
index 0ce2fc5e396b..9f80e5285575 100644
--- a/drivers/usb/host/r8a66597-hcd.c
+++ b/drivers/usb/host/r8a66597-hcd.c
@@ -44,6 +44,7 @@
44MODULE_DESCRIPTION("R8A66597 USB Host Controller Driver"); 44MODULE_DESCRIPTION("R8A66597 USB Host Controller Driver");
45MODULE_LICENSE("GPL"); 45MODULE_LICENSE("GPL");
46MODULE_AUTHOR("Yoshihiro Shimoda"); 46MODULE_AUTHOR("Yoshihiro Shimoda");
47MODULE_ALIAS("platform:r8a66597_hcd");
47 48
48#define DRIVER_VERSION "29 May 2007" 49#define DRIVER_VERSION "29 May 2007"
49 50
@@ -2219,6 +2220,7 @@ static struct platform_driver r8a66597_driver = {
2219 .resume = r8a66597_resume, 2220 .resume = r8a66597_resume,
2220 .driver = { 2221 .driver = {
2221 .name = (char *) hcd_name, 2222 .name = (char *) hcd_name,
2223 .owner = THIS_MODULE,
2222 }, 2224 },
2223}; 2225};
2224 2226
diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c
index 59be276ccd9d..629bca0ebe8f 100644
--- a/drivers/usb/host/sl811-hcd.c
+++ b/drivers/usb/host/sl811-hcd.c
@@ -58,6 +58,7 @@
58 58
59MODULE_DESCRIPTION("SL811HS USB Host Controller Driver"); 59MODULE_DESCRIPTION("SL811HS USB Host Controller Driver");
60MODULE_LICENSE("GPL"); 60MODULE_LICENSE("GPL");
61MODULE_ALIAS("platform:sl811-hcd");
61 62
62#define DRIVER_VERSION "19 May 2005" 63#define DRIVER_VERSION "19 May 2005"
63 64
diff --git a/drivers/usb/host/u132-hcd.c b/drivers/usb/host/u132-hcd.c
index 3033d6945202..8e117a795e93 100644
--- a/drivers/usb/host/u132-hcd.c
+++ b/drivers/usb/host/u132-hcd.c
@@ -3316,3 +3316,4 @@ static void __exit u132_hcd_exit(void)
3316 3316
3317module_exit(u132_hcd_exit); 3317module_exit(u132_hcd_exit);
3318MODULE_LICENSE("GPL"); 3318MODULE_LICENSE("GPL");
3319MODULE_ALIAS("platform:u132_hcd");
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index a396fbbdc9c2..d101025a4c63 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -109,6 +109,22 @@ static int option_send_setup(struct usb_serial_port *port);
109#define HUAWEI_PRODUCT_E600 0x1001 109#define HUAWEI_PRODUCT_E600 0x1001
110#define HUAWEI_PRODUCT_E220 0x1003 110#define HUAWEI_PRODUCT_E220 0x1003
111#define HUAWEI_PRODUCT_E220BIS 0x1004 111#define HUAWEI_PRODUCT_E220BIS 0x1004
112#define HUAWEI_PRODUCT_E1401 0x1401
113#define HUAWEI_PRODUCT_E1403 0x1403
114#define HUAWEI_PRODUCT_E1405 0x1405
115#define HUAWEI_PRODUCT_E1406 0x1406
116#define HUAWEI_PRODUCT_E1408 0x1408
117#define HUAWEI_PRODUCT_E1409 0x1409
118#define HUAWEI_PRODUCT_E1410 0x1410
119#define HUAWEI_PRODUCT_E1411 0x1411
120#define HUAWEI_PRODUCT_E1412 0x1412
121#define HUAWEI_PRODUCT_E1413 0x1413
122#define HUAWEI_PRODUCT_E1414 0x1414
123#define HUAWEI_PRODUCT_E1415 0x1415
124#define HUAWEI_PRODUCT_E1416 0x1416
125#define HUAWEI_PRODUCT_E1417 0x1417
126#define HUAWEI_PRODUCT_E1418 0x1418
127#define HUAWEI_PRODUCT_E1419 0x1419
112 128
113#define NOVATELWIRELESS_VENDOR_ID 0x1410 129#define NOVATELWIRELESS_VENDOR_ID 0x1410
114 130
@@ -129,6 +145,7 @@ static int option_send_setup(struct usb_serial_port *port);
129#define NOVATELWIRELESS_PRODUCT_EV620 0x2100 145#define NOVATELWIRELESS_PRODUCT_EV620 0x2100
130#define NOVATELWIRELESS_PRODUCT_ES720 0x2110 146#define NOVATELWIRELESS_PRODUCT_ES720 0x2110
131#define NOVATELWIRELESS_PRODUCT_E725 0x2120 147#define NOVATELWIRELESS_PRODUCT_E725 0x2120
148#define NOVATELWIRELESS_PRODUCT_ES620 0x2130
132#define NOVATELWIRELESS_PRODUCT_EU730 0x2400 149#define NOVATELWIRELESS_PRODUCT_EU730 0x2400
133#define NOVATELWIRELESS_PRODUCT_EU740 0x2410 150#define NOVATELWIRELESS_PRODUCT_EU740 0x2410
134#define NOVATELWIRELESS_PRODUCT_EU870D 0x2420 151#define NOVATELWIRELESS_PRODUCT_EU870D 0x2420
@@ -137,6 +154,8 @@ static int option_send_setup(struct usb_serial_port *port);
137#define NOVATELWIRELESS_PRODUCT_MC727 0x4100 154#define NOVATELWIRELESS_PRODUCT_MC727 0x4100
138#define NOVATELWIRELESS_PRODUCT_MC950D 0x4400 155#define NOVATELWIRELESS_PRODUCT_MC950D 0x4400
139 156
157#define NOVATELWIRELESS_PRODUCT_U727 0x5010
158
140/* FUTURE NOVATEL PRODUCTS */ 159/* FUTURE NOVATEL PRODUCTS */
141#define NOVATELWIRELESS_PRODUCT_EVDO_1 0x6000 160#define NOVATELWIRELESS_PRODUCT_EVDO_1 0x6000
142#define NOVATELWIRELESS_PRODUCT_HSPA_1 0x7000 161#define NOVATELWIRELESS_PRODUCT_HSPA_1 0x7000
@@ -147,6 +166,12 @@ static int option_send_setup(struct usb_serial_port *port);
147#define NOVATELWIRELESS_PRODUCT_EMBEDDED_2 0x8001 166#define NOVATELWIRELESS_PRODUCT_EMBEDDED_2 0x8001
148#define NOVATELWIRELESS_PRODUCT_GLOBAL_2 0x9001 167#define NOVATELWIRELESS_PRODUCT_GLOBAL_2 0x9001
149 168
169/* AMOI PRODUCTS */
170#define AMOI_VENDOR_ID 0x1614
171#define AMOI_PRODUCT_H01 0x0800
172#define AMOI_PRODUCT_H01A 0x7002
173#define AMOI_PRODUCT_H02 0x0802
174
150#define DELL_VENDOR_ID 0x413C 175#define DELL_VENDOR_ID 0x413C
151 176
152#define KYOCERA_VENDOR_ID 0x0c88 177#define KYOCERA_VENDOR_ID 0x0c88
@@ -163,8 +188,13 @@ static int option_send_setup(struct usb_serial_port *port);
163#define BANDRICH_PRODUCT_C100_1 0x1002 188#define BANDRICH_PRODUCT_C100_1 0x1002
164#define BANDRICH_PRODUCT_C100_2 0x1003 189#define BANDRICH_PRODUCT_C100_2 0x1003
165 190
191#define AMOI_VENDOR_ID 0x1614
192#define AMOI_PRODUCT_9508 0x0800
193
166#define QUALCOMM_VENDOR_ID 0x05C6 194#define QUALCOMM_VENDOR_ID 0x05C6
167 195
196#define MAXON_VENDOR_ID 0x16d8
197
168static struct usb_device_id option_ids[] = { 198static struct usb_device_id option_ids[] = {
169 { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, 199 { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) },
170 { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) }, 200 { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) },
@@ -204,6 +234,23 @@ static struct usb_device_id option_ids[] = {
204 { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600) }, 234 { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600) },
205 { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220, 0xff, 0xff, 0xff) }, 235 { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220, 0xff, 0xff, 0xff) },
206 { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220BIS, 0xff, 0xff, 0xff) }, 236 { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220BIS, 0xff, 0xff, 0xff) },
237 { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1401) },
238 { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1403) },
239 { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1405) },
240 { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1406) },
241 { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1408) },
242 { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1409) },
243 { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1410) },
244 { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1411) },
245 { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1412) },
246 { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1413) },
247 { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1414) },
248 { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1415) },
249 { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1416) },
250 { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1417) },
251 { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1418) },
252 { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1419) },
253 { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_9508) },
207 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V640) }, /* Novatel Merlin V640/XV620 */ 254 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V640) }, /* Novatel Merlin V640/XV620 */
208 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V620) }, /* Novatel Merlin V620/S620 */ 255 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V620) }, /* Novatel Merlin V620/S620 */
209 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V740) }, /* Novatel Merlin EX720/V740/X720 */ 256 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V740) }, /* Novatel Merlin EX720/V740/X720 */
@@ -216,13 +263,13 @@ static struct usb_device_id option_ids[] = {
216 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EV620) }, /* Novatel EV620/ES620 CDMA/EV-DO */ 263 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EV620) }, /* Novatel EV620/ES620 CDMA/EV-DO */
217 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_ES720) }, /* Novatel ES620/ES720/U720/USB720 */ 264 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_ES720) }, /* Novatel ES620/ES720/U720/USB720 */
218 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_E725) }, /* Novatel E725/E726 */ 265 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_E725) }, /* Novatel E725/E726 */
219 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x2130) }, /* Novatel Merlin ES620 SM Bus */ 266 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_ES620) }, /* Novatel Merlin ES620 SM Bus */
220 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EU730) }, /* Novatel EU730 and Vodafone EU740 */ 267 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EU730) }, /* Novatel EU730 and Vodafone EU740 */
221 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EU740) }, /* Novatel non-Vodafone EU740 */ 268 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EU740) }, /* Novatel non-Vodafone EU740 */
222 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EU870D) }, /* Novatel EU850D/EU860D/EU870D */ 269 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EU870D) }, /* Novatel EU850D/EU860D/EU870D */
223 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC950D) }, /* Novatel MC930D/MC950D */ 270 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC950D) }, /* Novatel MC930D/MC950D */
224 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC727) }, /* Novatel MC727/U727/USB727 */ 271 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC727) }, /* Novatel MC727/U727/USB727 */
225 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x5010) }, /* Novatel U727 */ 272 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_U727) }, /* Novatel U727 */
226 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EVDO_1) }, /* Novatel EVDO product */ 273 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EVDO_1) }, /* Novatel EVDO product */
227 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_1) }, /* Novatel HSPA product */ 274 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_1) }, /* Novatel HSPA product */
228 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EMBEDDED_1) }, /* Novatel Embedded product */ 275 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EMBEDDED_1) }, /* Novatel Embedded product */
@@ -232,6 +279,10 @@ static struct usb_device_id option_ids[] = {
232 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EMBEDDED_2) }, /* Novatel Embedded product */ 279 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EMBEDDED_2) }, /* Novatel Embedded product */
233 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_GLOBAL_2) }, /* Novatel Global product */ 280 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_GLOBAL_2) }, /* Novatel Global product */
234 281
282 { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H01) },
283 { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H01A) },
284 { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H02) },
285
235 { USB_DEVICE(DELL_VENDOR_ID, 0x8114) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO Mini-Card == Novatel Expedite EV620 CDMA/EV-DO */ 286 { USB_DEVICE(DELL_VENDOR_ID, 0x8114) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO Mini-Card == Novatel Expedite EV620 CDMA/EV-DO */
236 { USB_DEVICE(DELL_VENDOR_ID, 0x8115) }, /* Dell Wireless 5500 Mobile Broadband HSDPA Mini-Card == Novatel Expedite EU740 HSDPA/3G */ 287 { USB_DEVICE(DELL_VENDOR_ID, 0x8115) }, /* Dell Wireless 5500 Mobile Broadband HSDPA Mini-Card == Novatel Expedite EU740 HSDPA/3G */
237 { USB_DEVICE(DELL_VENDOR_ID, 0x8116) }, /* Dell Wireless 5505 Mobile Broadband HSDPA Mini-Card == Novatel Expedite EU740 HSDPA/3G */ 288 { USB_DEVICE(DELL_VENDOR_ID, 0x8116) }, /* Dell Wireless 5505 Mobile Broadband HSDPA Mini-Card == Novatel Expedite EU740 HSDPA/3G */
@@ -249,6 +300,7 @@ static struct usb_device_id option_ids[] = {
249 { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_2) }, 300 { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_2) },
250 { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC680) }, 301 { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC680) },
251 { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */ 302 { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */
303 { USB_DEVICE(MAXON_VENDOR_ID, 0x6280) }, /* BP3-USB & BP3-EXT HSDPA */
252 { } /* Terminating entry */ 304 { } /* Terminating entry */
253}; 305};
254MODULE_DEVICE_TABLE(usb, option_ids); 306MODULE_DEVICE_TABLE(usb, option_ids);
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index 3ce98e8d7bce..2138ba8aeb69 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -854,6 +854,7 @@ int usb_serial_probe(struct usb_interface *interface,
854 serial->num_interrupt_in = num_interrupt_in; 854 serial->num_interrupt_in = num_interrupt_in;
855 serial->num_interrupt_out = num_interrupt_out; 855 serial->num_interrupt_out = num_interrupt_out;
856 856
857#if 0
857 /* check that the device meets the driver's requirements */ 858 /* check that the device meets the driver's requirements */
858 if ((type->num_interrupt_in != NUM_DONT_CARE && 859 if ((type->num_interrupt_in != NUM_DONT_CARE &&
859 type->num_interrupt_in != num_interrupt_in) 860 type->num_interrupt_in != num_interrupt_in)
@@ -867,6 +868,7 @@ int usb_serial_probe(struct usb_interface *interface,
867 kfree(serial); 868 kfree(serial);
868 return -EIO; 869 return -EIO;
869 } 870 }
871#endif
870 872
871 /* found all that we need */ 873 /* found all that we need */
872 dev_info(&interface->dev, "%s converter detected\n", 874 dev_info(&interface->dev, "%s converter detected\n",
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
index e5219a56947c..91252075e6e1 100644
--- a/drivers/usb/storage/unusual_devs.h
+++ b/drivers/usb/storage/unusual_devs.h
@@ -1530,16 +1530,104 @@ UNUSUAL_DEV( 0x1210, 0x0003, 0x0100, 0x0100,
1530 US_SC_DEVICE, US_PR_DEVICE, NULL, 1530 US_SC_DEVICE, US_PR_DEVICE, NULL,
1531 US_FL_IGNORE_RESIDUE ), 1531 US_FL_IGNORE_RESIDUE ),
1532 1532
1533/* Reported by fangxiaozhi <fangxiaozhi60675@huawei.com> 1533/* Reported by fangxiaozhi <huananhu@huawei.com>
1534 * and by linlei <linlei83@huawei.com> 1534 * This brings the HUAWEI data card devices into multi-port mode
1535 * Patch reworked by Johann Wilhelm <johann.wilhelm@student.tugraz.at>
1536 * This brings the HUAWEI E220 devices into multi-port mode
1537 */ 1535 */
1536UNUSUAL_DEV( 0x12d1, 0x1001, 0x0000, 0x0000,
1537 "HUAWEI MOBILE",
1538 "Mass Storage",
1539 US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
1540 0),
1538UNUSUAL_DEV( 0x12d1, 0x1003, 0x0000, 0x0000, 1541UNUSUAL_DEV( 0x12d1, 0x1003, 0x0000, 0x0000,
1539 "HUAWEI MOBILE", 1542 "HUAWEI MOBILE",
1540 "Mass Storage", 1543 "Mass Storage",
1541 US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, 1544 US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
1542 0), 1545 0),
1546UNUSUAL_DEV( 0x12d1, 0x1004, 0x0000, 0x0000,
1547 "HUAWEI MOBILE",
1548 "Mass Storage",
1549 US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
1550 0),
1551UNUSUAL_DEV( 0x12d1, 0x1401, 0x0000, 0x0000,
1552 "HUAWEI MOBILE",
1553 "Mass Storage",
1554 US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
1555 0),
1556UNUSUAL_DEV( 0x12d1, 0x1403, 0x0000, 0x0000,
1557 "HUAWEI MOBILE",
1558 "Mass Storage",
1559 US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
1560 0),
1561UNUSUAL_DEV( 0x12d1, 0x1405, 0x0000, 0x0000,
1562 "HUAWEI MOBILE",
1563 "Mass Storage",
1564 US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
1565 0),
1566UNUSUAL_DEV( 0x12d1, 0x1406, 0x0000, 0x0000,
1567 "HUAWEI MOBILE",
1568 "Mass Storage",
1569 US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
1570 0),
1571UNUSUAL_DEV( 0x12d1, 0x1408, 0x0000, 0x0000,
1572 "HUAWEI MOBILE",
1573 "Mass Storage",
1574 US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
1575 0),
1576UNUSUAL_DEV( 0x12d1, 0x1409, 0x0000, 0x0000,
1577 "HUAWEI MOBILE",
1578 "Mass Storage",
1579 US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
1580 0),
1581UNUSUAL_DEV( 0x12d1, 0x1410, 0x0000, 0x0000,
1582 "HUAWEI MOBILE",
1583 "Mass Storage",
1584 US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
1585 0),
1586UNUSUAL_DEV( 0x12d1, 0x1411, 0x0000, 0x0000,
1587 "HUAWEI MOBILE",
1588 "Mass Storage",
1589 US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
1590 0),
1591UNUSUAL_DEV( 0x12d1, 0x1412, 0x0000, 0x0000,
1592 "HUAWEI MOBILE",
1593 "Mass Storage",
1594 US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
1595 0),
1596UNUSUAL_DEV( 0x12d1, 0x1413, 0x0000, 0x0000,
1597 "HUAWEI MOBILE",
1598 "Mass Storage",
1599 US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
1600 0),
1601UNUSUAL_DEV( 0x12d1, 0x1414, 0x0000, 0x0000,
1602 "HUAWEI MOBILE",
1603 "Mass Storage",
1604 US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
1605 0),
1606UNUSUAL_DEV( 0x12d1, 0x1415, 0x0000, 0x0000,
1607 "HUAWEI MOBILE",
1608 "Mass Storage",
1609 US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
1610 0),
1611UNUSUAL_DEV( 0x12d1, 0x1416, 0x0000, 0x0000,
1612 "HUAWEI MOBILE",
1613 "Mass Storage",
1614 US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
1615 0),
1616UNUSUAL_DEV( 0x12d1, 0x1417, 0x0000, 0x0000,
1617 "HUAWEI MOBILE",
1618 "Mass Storage",
1619 US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
1620 0),
1621UNUSUAL_DEV( 0x12d1, 0x1418, 0x0000, 0x0000,
1622 "HUAWEI MOBILE",
1623 "Mass Storage",
1624 US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
1625 0),
1626UNUSUAL_DEV( 0x12d1, 0x1419, 0x0000, 0x0000,
1627 "HUAWEI MOBILE",
1628 "Mass Storage",
1629 US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
1630 0),
1543 1631
1544/* Reported by Vilius Bilinkevicius <vilisas AT xxx DOT lt) */ 1632/* Reported by Vilius Bilinkevicius <vilisas AT xxx DOT lt) */
1545UNUSUAL_DEV( 0x132b, 0x000b, 0x0001, 0x0001, 1633UNUSUAL_DEV( 0x132b, 0x000b, 0x0001, 0x0001,
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 1194f5e060ea..01072f4b3e8f 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -1521,6 +1521,7 @@ module_init(fbmem_init);
1521static void __exit 1521static void __exit
1522fbmem_exit(void) 1522fbmem_exit(void)
1523{ 1523{
1524 remove_proc_entry("fb", NULL);
1524 class_destroy(fb_class); 1525 class_destroy(fb_class);
1525 unregister_chrdev(FB_MAJOR, "fb"); 1526 unregister_chrdev(FB_MAJOR, "fb");
1526} 1527}
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index aa714028641e..c2fa5c630813 100644
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -214,10 +214,7 @@ static void vring_disable_cb(struct virtqueue *_vq)
214{ 214{
215 struct vring_virtqueue *vq = to_vvq(_vq); 215 struct vring_virtqueue *vq = to_vvq(_vq);
216 216
217 START_USE(vq);
218 BUG_ON(vq->vring.avail->flags & VRING_AVAIL_F_NO_INTERRUPT);
219 vq->vring.avail->flags |= VRING_AVAIL_F_NO_INTERRUPT; 217 vq->vring.avail->flags |= VRING_AVAIL_F_NO_INTERRUPT;
220 END_USE(vq);
221} 218}
222 219
223static bool vring_enable_cb(struct virtqueue *_vq) 220static bool vring_enable_cb(struct virtqueue *_vq)
diff --git a/drivers/watchdog/at32ap700x_wdt.c b/drivers/watchdog/at32ap700x_wdt.c
index fb5ed6478f78..ae0fca5e8749 100644
--- a/drivers/watchdog/at32ap700x_wdt.c
+++ b/drivers/watchdog/at32ap700x_wdt.c
@@ -418,6 +418,9 @@ static int at32_wdt_resume(struct platform_device *pdev)
418#define at32_wdt_resume NULL 418#define at32_wdt_resume NULL
419#endif 419#endif
420 420
421/* work with hotplug and coldplug */
422MODULE_ALIAS("platform:at32_wdt");
423
421static struct platform_driver at32_wdt_driver = { 424static struct platform_driver at32_wdt_driver = {
422 .remove = __exit_p(at32_wdt_remove), 425 .remove = __exit_p(at32_wdt_remove),
423 .suspend = at32_wdt_suspend, 426 .suspend = at32_wdt_suspend,
diff --git a/drivers/watchdog/at91rm9200_wdt.c b/drivers/watchdog/at91rm9200_wdt.c
index a684b1e87372..9ff9a9565320 100644
--- a/drivers/watchdog/at91rm9200_wdt.c
+++ b/drivers/watchdog/at91rm9200_wdt.c
@@ -286,3 +286,4 @@ MODULE_AUTHOR("Andrew Victor");
286MODULE_DESCRIPTION("Watchdog driver for Atmel AT91RM9200"); 286MODULE_DESCRIPTION("Watchdog driver for Atmel AT91RM9200");
287MODULE_LICENSE("GPL"); 287MODULE_LICENSE("GPL");
288MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); 288MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
289MODULE_ALIAS("platform:at91_wdt");
diff --git a/drivers/watchdog/davinci_wdt.c b/drivers/watchdog/davinci_wdt.c
index a61cbd48dc07..1782c79eff06 100644
--- a/drivers/watchdog/davinci_wdt.c
+++ b/drivers/watchdog/davinci_wdt.c
@@ -248,6 +248,7 @@ static int davinci_wdt_remove(struct platform_device *pdev)
248static struct platform_driver platform_wdt_driver = { 248static struct platform_driver platform_wdt_driver = {
249 .driver = { 249 .driver = {
250 .name = "watchdog", 250 .name = "watchdog",
251 .owner = THIS_MODULE,
251 }, 252 },
252 .probe = davinci_wdt_probe, 253 .probe = davinci_wdt_probe,
253 .remove = davinci_wdt_remove, 254 .remove = davinci_wdt_remove,
@@ -277,3 +278,4 @@ MODULE_PARM_DESC(heartbeat,
277 278
278MODULE_LICENSE("GPL"); 279MODULE_LICENSE("GPL");
279MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); 280MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
281MODULE_ALIAS("platform:watchdog");
diff --git a/drivers/watchdog/it8712f_wdt.c b/drivers/watchdog/it8712f_wdt.c
index ca90c5192596..445b7e812112 100644
--- a/drivers/watchdog/it8712f_wdt.c
+++ b/drivers/watchdog/it8712f_wdt.c
@@ -200,6 +200,8 @@ it8712f_wdt_disable(void)
200 200
201 superio_outb(0, WDT_CONFIG); 201 superio_outb(0, WDT_CONFIG);
202 superio_outb(0, WDT_CONTROL); 202 superio_outb(0, WDT_CONTROL);
203 if (revision >= 0x08)
204 superio_outb(0, WDT_TIMEOUT + 1);
203 superio_outb(0, WDT_TIMEOUT); 205 superio_outb(0, WDT_TIMEOUT);
204 206
205 superio_exit(); 207 superio_exit();
diff --git a/drivers/watchdog/ks8695_wdt.c b/drivers/watchdog/ks8695_wdt.c
index e3a29c302309..df5a6b811ccd 100644
--- a/drivers/watchdog/ks8695_wdt.c
+++ b/drivers/watchdog/ks8695_wdt.c
@@ -306,3 +306,4 @@ MODULE_AUTHOR("Andrew Victor");
306MODULE_DESCRIPTION("Watchdog driver for KS8695"); 306MODULE_DESCRIPTION("Watchdog driver for KS8695");
307MODULE_LICENSE("GPL"); 307MODULE_LICENSE("GPL");
308MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); 308MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
309MODULE_ALIAS("platform:ks8695_wdt");
diff --git a/drivers/watchdog/mpc83xx_wdt.c b/drivers/watchdog/mpc83xx_wdt.c
index 6369f569517f..b16c5cd972eb 100644
--- a/drivers/watchdog/mpc83xx_wdt.c
+++ b/drivers/watchdog/mpc83xx_wdt.c
@@ -206,6 +206,7 @@ static struct platform_driver mpc83xx_wdt_driver = {
206 .remove = __devexit_p(mpc83xx_wdt_remove), 206 .remove = __devexit_p(mpc83xx_wdt_remove),
207 .driver = { 207 .driver = {
208 .name = "mpc83xx_wdt", 208 .name = "mpc83xx_wdt",
209 .owner = THIS_MODULE,
209 }, 210 },
210}; 211};
211 212
@@ -226,3 +227,4 @@ MODULE_AUTHOR("Dave Updegraff, Kumar Gala");
226MODULE_DESCRIPTION("Driver for watchdog timer in MPC83xx uProcessor"); 227MODULE_DESCRIPTION("Driver for watchdog timer in MPC83xx uProcessor");
227MODULE_LICENSE("GPL"); 228MODULE_LICENSE("GPL");
228MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); 229MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
230MODULE_ALIAS("platform:mpc83xx_wdt");
diff --git a/drivers/watchdog/mpcore_wdt.c b/drivers/watchdog/mpcore_wdt.c
index 0d2b27735419..009573b81496 100644
--- a/drivers/watchdog/mpcore_wdt.c
+++ b/drivers/watchdog/mpcore_wdt.c
@@ -392,6 +392,9 @@ static int __devexit mpcore_wdt_remove(struct platform_device *dev)
392 return 0; 392 return 0;
393} 393}
394 394
395/* work with hotplug and coldplug */
396MODULE_ALIAS("platform:mpcore_wdt");
397
395static struct platform_driver mpcore_wdt_driver = { 398static struct platform_driver mpcore_wdt_driver = {
396 .probe = mpcore_wdt_probe, 399 .probe = mpcore_wdt_probe,
397 .remove = __devexit_p(mpcore_wdt_remove), 400 .remove = __devexit_p(mpcore_wdt_remove),
diff --git a/drivers/watchdog/mtx-1_wdt.c b/drivers/watchdog/mtx-1_wdt.c
index 10b89f2703bd..a8e67383784e 100644
--- a/drivers/watchdog/mtx-1_wdt.c
+++ b/drivers/watchdog/mtx-1_wdt.c
@@ -243,6 +243,7 @@ static struct platform_driver mtx1_wdt = {
243 .probe = mtx1_wdt_probe, 243 .probe = mtx1_wdt_probe,
244 .remove = mtx1_wdt_remove, 244 .remove = mtx1_wdt_remove,
245 .driver.name = "mtx1-wdt", 245 .driver.name = "mtx1-wdt",
246 .driver.owner = THIS_MODULE,
246}; 247};
247 248
248static int __init mtx1_wdt_init(void) 249static int __init mtx1_wdt_init(void)
@@ -262,3 +263,4 @@ MODULE_AUTHOR("Michael Stickel, Florian Fainelli");
262MODULE_DESCRIPTION("Driver for the MTX-1 watchdog"); 263MODULE_DESCRIPTION("Driver for the MTX-1 watchdog");
263MODULE_LICENSE("GPL"); 264MODULE_LICENSE("GPL");
264MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); 265MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
266MODULE_ALIAS("platform:mtx1-wdt");
diff --git a/drivers/watchdog/mv64x60_wdt.c b/drivers/watchdog/mv64x60_wdt.c
index 0365c317f7e1..b59ca3273967 100644
--- a/drivers/watchdog/mv64x60_wdt.c
+++ b/drivers/watchdog/mv64x60_wdt.c
@@ -324,3 +324,4 @@ MODULE_AUTHOR("James Chapman <jchapman@katalix.com>");
324MODULE_DESCRIPTION("MV64x60 watchdog driver"); 324MODULE_DESCRIPTION("MV64x60 watchdog driver");
325MODULE_LICENSE("GPL"); 325MODULE_LICENSE("GPL");
326MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); 326MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
327MODULE_ALIAS("platform:" MV64x60_WDT_NAME);
diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
index 635ca454f56b..74bc39aa1ce8 100644
--- a/drivers/watchdog/omap_wdt.c
+++ b/drivers/watchdog/omap_wdt.c
@@ -387,3 +387,4 @@ module_exit(omap_wdt_exit);
387MODULE_AUTHOR("George G. Davis"); 387MODULE_AUTHOR("George G. Davis");
388MODULE_LICENSE("GPL"); 388MODULE_LICENSE("GPL");
389MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); 389MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
390MODULE_ALIAS("platform:omap_wdt");
diff --git a/drivers/watchdog/pnx4008_wdt.c b/drivers/watchdog/pnx4008_wdt.c
index b04aa096a10a..6b8483d3c783 100644
--- a/drivers/watchdog/pnx4008_wdt.c
+++ b/drivers/watchdog/pnx4008_wdt.c
@@ -321,6 +321,7 @@ static int pnx4008_wdt_remove(struct platform_device *pdev)
321static struct platform_driver platform_wdt_driver = { 321static struct platform_driver platform_wdt_driver = {
322 .driver = { 322 .driver = {
323 .name = "watchdog", 323 .name = "watchdog",
324 .owner = THIS_MODULE,
324 }, 325 },
325 .probe = pnx4008_wdt_probe, 326 .probe = pnx4008_wdt_probe,
326 .remove = pnx4008_wdt_remove, 327 .remove = pnx4008_wdt_remove,
@@ -354,3 +355,4 @@ MODULE_PARM_DESC(nowayout,
354 355
355MODULE_LICENSE("GPL"); 356MODULE_LICENSE("GPL");
356MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); 357MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
358MODULE_ALIAS("platform:watchdog");
diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c
index 7645e8812156..98532c0e0689 100644
--- a/drivers/watchdog/s3c2410_wdt.c
+++ b/drivers/watchdog/s3c2410_wdt.c
@@ -561,3 +561,4 @@ MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>, "
561MODULE_DESCRIPTION("S3C2410 Watchdog Device Driver"); 561MODULE_DESCRIPTION("S3C2410 Watchdog Device Driver");
562MODULE_LICENSE("GPL"); 562MODULE_LICENSE("GPL");
563MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); 563MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
564MODULE_ALIAS("platform:s3c2410-wdt");
diff --git a/drivers/watchdog/txx9wdt.c b/drivers/watchdog/txx9wdt.c
index 328b3c7211ef..57cefef27ce3 100644
--- a/drivers/watchdog/txx9wdt.c
+++ b/drivers/watchdog/txx9wdt.c
@@ -274,3 +274,4 @@ module_exit(watchdog_exit);
274MODULE_DESCRIPTION("TXx9 Watchdog Driver"); 274MODULE_DESCRIPTION("TXx9 Watchdog Driver");
275MODULE_LICENSE("GPL"); 275MODULE_LICENSE("GPL");
276MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); 276MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
277MODULE_ALIAS("platform:txx9wdt");
diff --git a/drivers/xen/grant-table.c b/drivers/xen/grant-table.c
index ea94dbabf9a9..d85dc6d41c2a 100644
--- a/drivers/xen/grant-table.c
+++ b/drivers/xen/grant-table.c
@@ -381,11 +381,15 @@ EXPORT_SYMBOL_GPL(gnttab_cancel_free_callback);
381static int grow_gnttab_list(unsigned int more_frames) 381static int grow_gnttab_list(unsigned int more_frames)
382{ 382{
383 unsigned int new_nr_grant_frames, extra_entries, i; 383 unsigned int new_nr_grant_frames, extra_entries, i;
384 unsigned int nr_glist_frames, new_nr_glist_frames;
384 385
385 new_nr_grant_frames = nr_grant_frames + more_frames; 386 new_nr_grant_frames = nr_grant_frames + more_frames;
386 extra_entries = more_frames * GREFS_PER_GRANT_FRAME; 387 extra_entries = more_frames * GREFS_PER_GRANT_FRAME;
387 388
388 for (i = nr_grant_frames; i < new_nr_grant_frames; i++) { 389 nr_glist_frames = (nr_grant_frames * GREFS_PER_GRANT_FRAME + RPP - 1) / RPP;
390 new_nr_glist_frames =
391 (new_nr_grant_frames * GREFS_PER_GRANT_FRAME + RPP - 1) / RPP;
392 for (i = nr_glist_frames; i < new_nr_glist_frames; i++) {
389 gnttab_list[i] = (grant_ref_t *)__get_free_page(GFP_ATOMIC); 393 gnttab_list[i] = (grant_ref_t *)__get_free_page(GFP_ATOMIC);
390 if (!gnttab_list[i]) 394 if (!gnttab_list[i])
391 goto grow_nomem; 395 goto grow_nomem;
@@ -407,7 +411,7 @@ static int grow_gnttab_list(unsigned int more_frames)
407 return 0; 411 return 0;
408 412
409grow_nomem: 413grow_nomem:
410 for ( ; i >= nr_grant_frames; i--) 414 for ( ; i >= nr_glist_frames; i--)
411 free_page((unsigned long) gnttab_list[i]); 415 free_page((unsigned long) gnttab_list[i]);
412 return -ENOMEM; 416 return -ENOMEM;
413} 417}
@@ -530,7 +534,7 @@ static int gnttab_expand(unsigned int req_entries)
530static int __devinit gnttab_init(void) 534static int __devinit gnttab_init(void)
531{ 535{
532 int i; 536 int i;
533 unsigned int max_nr_glist_frames; 537 unsigned int max_nr_glist_frames, nr_glist_frames;
534 unsigned int nr_init_grefs; 538 unsigned int nr_init_grefs;
535 539
536 if (!is_running_on_xen()) 540 if (!is_running_on_xen())
@@ -543,15 +547,15 @@ static int __devinit gnttab_init(void)
543 * grant reference free list on the current hypervisor. 547 * grant reference free list on the current hypervisor.
544 */ 548 */
545 max_nr_glist_frames = (boot_max_nr_grant_frames * 549 max_nr_glist_frames = (boot_max_nr_grant_frames *
546 GREFS_PER_GRANT_FRAME / 550 GREFS_PER_GRANT_FRAME / RPP);
547 (PAGE_SIZE / sizeof(grant_ref_t)));
548 551
549 gnttab_list = kmalloc(max_nr_glist_frames * sizeof(grant_ref_t *), 552 gnttab_list = kmalloc(max_nr_glist_frames * sizeof(grant_ref_t *),
550 GFP_KERNEL); 553 GFP_KERNEL);
551 if (gnttab_list == NULL) 554 if (gnttab_list == NULL)
552 return -ENOMEM; 555 return -ENOMEM;
553 556
554 for (i = 0; i < nr_grant_frames; i++) { 557 nr_glist_frames = (nr_grant_frames * GREFS_PER_GRANT_FRAME + RPP - 1) / RPP;
558 for (i = 0; i < nr_glist_frames; i++) {
555 gnttab_list[i] = (grant_ref_t *)__get_free_page(GFP_KERNEL); 559 gnttab_list[i] = (grant_ref_t *)__get_free_page(GFP_KERNEL);
556 if (gnttab_list[i] == NULL) 560 if (gnttab_list[i] == NULL)
557 goto ini_nomem; 561 goto ini_nomem;