diff --git a/[refs] b/[refs] index e6ec54c16af0..669924157e9a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 57312b75aa06b09c28acd9c5a9c70827da3696d2 +refs/heads/master: 26ab705396b65a469233a8327ecb51b8aebb6be0 diff --git a/trunk/MAINTAINERS b/trunk/MAINTAINERS index b42dcfcbee44..dc94fc5cb25b 100644 --- a/trunk/MAINTAINERS +++ b/trunk/MAINTAINERS @@ -1646,10 +1646,8 @@ W: http://linux-fbdev.sourceforge.net/ S: Maintained FREESCALE DMA DRIVER -P: Li Yang -M: leoli@freescale.com -P: Zhang Wei -M: zw@zh-kernel.org +P; Zhang Wei +M: wei.zhang@freescale.com L: linuxppc-embedded@ozlabs.org L: linux-kernel@vger.kernel.org S: Maintained @@ -3145,7 +3143,7 @@ PCI ERROR RECOVERY P: Linas Vepstas M: linas@austin.ibm.com L: linux-kernel@vger.kernel.org -L: linux-pci@vger.kernel.org +L: linux-pci@atrey.karlin.mff.cuni.cz S: Supported PCI SUBSYSTEM diff --git a/trunk/arch/x86/pci/common.c b/trunk/arch/x86/pci/common.c index 6e64aaf00d1d..8545c8a9d107 100644 --- a/trunk/arch/x86/pci/common.c +++ b/trunk/arch/x86/pci/common.c @@ -302,18 +302,18 @@ static struct dmi_system_id __devinitdata pciprobe_dmi_table[] = { }, { .callback = set_bf_sort, - .ident = "HP ProLiant DL360", + .ident = "HP ProLiant DL385 G2", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "HP"), - DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL360"), + DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL385 G2"), }, }, { .callback = set_bf_sort, - .ident = "HP ProLiant DL380", + .ident = "HP ProLiant DL585 G2", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "HP"), - DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL380"), + DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL585 G2"), }, }, #ifdef __i386__ diff --git a/trunk/drivers/base/core.c b/trunk/drivers/base/core.c index f861c2b1dcff..be288b5e4180 100644 --- a/trunk/drivers/base/core.c +++ b/trunk/drivers/base/core.c @@ -1084,13 +1084,11 @@ static void device_create_release(struct device *dev) } /** - * device_create_vargs - creates a device and registers it with sysfs + * device_create - creates a device and registers it with sysfs * @class: pointer to the struct class that this device should be registered to * @parent: pointer to the parent struct device of this new device, if any * @devt: the dev_t for the char device to be added - * @drvdata: the data to be added to the device for callbacks * @fmt: string for the device's name - * @args: va_list for the device's name * * This function can be used by char device classes. A struct device * will be created in sysfs, registered to the specified class. @@ -1106,10 +1104,10 @@ static void device_create_release(struct device *dev) * Note: the struct class passed to this function must have previously * been created with a call to class_create(). */ -struct device *device_create_vargs(struct class *class, struct device *parent, - dev_t devt, void *drvdata, const char *fmt, - va_list args) +struct device *device_create(struct class *class, struct device *parent, + dev_t devt, const char *fmt, ...) { + va_list args; struct device *dev = NULL; int retval = -ENODEV; @@ -1126,9 +1124,10 @@ struct device *device_create_vargs(struct class *class, struct device *parent, dev->class = class; dev->parent = parent; dev->release = device_create_release; - dev_set_drvdata(dev, drvdata); + va_start(args, fmt); vsnprintf(dev->bus_id, BUS_ID_SIZE, fmt, args); + va_end(args); retval = device_register(dev); if (retval) goto error; @@ -1139,78 +1138,6 @@ struct device *device_create_vargs(struct class *class, struct device *parent, kfree(dev); return ERR_PTR(retval); } -EXPORT_SYMBOL_GPL(device_create_vargs); - -/** - * device_create_drvdata - creates a device and registers it with sysfs - * @class: pointer to the struct class that this device should be registered to - * @parent: pointer to the parent struct device of this new device, if any - * @devt: the dev_t for the char device to be added - * @drvdata: the data to be added to the device for callbacks - * @fmt: string for the device's name - * - * This function can be used by char device classes. A struct device - * will be created in sysfs, registered to the specified class. - * - * A "dev" file will be created, showing the dev_t for the device, if - * the dev_t is not 0,0. - * If a pointer to a parent struct device is passed in, the newly created - * struct device will be a child of that device in sysfs. - * The pointer to the struct device will be returned from the call. - * Any further sysfs files that might be required can be created using this - * pointer. - * - * Note: the struct class passed to this function must have previously - * been created with a call to class_create(). - */ -struct device *device_create_drvdata(struct class *class, - struct device *parent, - dev_t devt, - void *drvdata, - const char *fmt, ...) -{ - va_list vargs; - struct device *dev; - - va_start(vargs, fmt); - dev = device_create_vargs(class, parent, devt, drvdata, fmt, vargs); - va_end(vargs); - return dev; -} -EXPORT_SYMBOL_GPL(device_create_drvdata); - -/** - * device_create - creates a device and registers it with sysfs - * @class: pointer to the struct class that this device should be registered to - * @parent: pointer to the parent struct device of this new device, if any - * @devt: the dev_t for the char device to be added - * @fmt: string for the device's name - * - * This function can be used by char device classes. A struct device - * will be created in sysfs, registered to the specified class. - * - * A "dev" file will be created, showing the dev_t for the device, if - * the dev_t is not 0,0. - * If a pointer to a parent struct device is passed in, the newly created - * struct device will be a child of that device in sysfs. - * The pointer to the struct device will be returned from the call. - * Any further sysfs files that might be required can be created using this - * pointer. - * - * Note: the struct class passed to this function must have previously - * been created with a call to class_create(). - */ -struct device *device_create(struct class *class, struct device *parent, - dev_t devt, const char *fmt, ...) -{ - va_list vargs; - struct device *dev; - - va_start(vargs, fmt); - dev = device_create_vargs(class, parent, devt, NULL, fmt, vargs); - va_end(vargs); - return dev; -} EXPORT_SYMBOL_GPL(device_create); static int __match_devt(struct device *dev, void *data) diff --git a/trunk/drivers/dma/iop-adma.c b/trunk/drivers/dma/iop-adma.c index 0ec0f431e6a1..762b729672e0 100644 --- a/trunk/drivers/dma/iop-adma.c +++ b/trunk/drivers/dma/iop-adma.c @@ -821,10 +821,10 @@ static int __devinit iop_adma_memcpy_self_test(struct iop_adma_device *device) dev_dbg(device->common.dev, "%s\n", __func__); - src = kmalloc(IOP_ADMA_TEST_SIZE, GFP_KERNEL); + src = kzalloc(sizeof(u8) * IOP_ADMA_TEST_SIZE, GFP_KERNEL); if (!src) return -ENOMEM; - dest = kzalloc(IOP_ADMA_TEST_SIZE, GFP_KERNEL); + dest = kzalloc(sizeof(u8) * IOP_ADMA_TEST_SIZE, GFP_KERNEL); if (!dest) { kfree(src); return -ENOMEM; @@ -834,6 +834,8 @@ static int __devinit iop_adma_memcpy_self_test(struct iop_adma_device *device) for (i = 0; i < IOP_ADMA_TEST_SIZE; i++) ((u8 *) src)[i] = (u8)i; + memset(dest, 0, IOP_ADMA_TEST_SIZE); + /* Start copy, using first DMA channel */ dma_chan = container_of(device->common.channels.next, struct dma_chan, diff --git a/trunk/drivers/ide/ide-probe.c b/trunk/drivers/ide/ide-probe.c index 655ec7ef568a..34b0d4f26b58 100644 --- a/trunk/drivers/ide/ide-probe.c +++ b/trunk/drivers/ide/ide-probe.c @@ -648,12 +648,13 @@ static int ide_register_port(ide_hwif_t *hwif) get_device(&hwif->gendev); - hwif->portdev = device_create_drvdata(ide_port_class, &hwif->gendev, - MKDEV(0, 0), hwif, hwif->name); + hwif->portdev = device_create(ide_port_class, &hwif->gendev, + MKDEV(0, 0), hwif->name); if (IS_ERR(hwif->portdev)) { ret = PTR_ERR(hwif->portdev); device_unregister(&hwif->gendev); } + dev_set_drvdata(hwif->portdev, hwif); out: return ret; } diff --git a/trunk/drivers/infiniband/core/user_mad.c b/trunk/drivers/infiniband/core/user_mad.c index 840ede9ae965..3aa2db54eae4 100644 --- a/trunk/drivers/infiniband/core/user_mad.c +++ b/trunk/drivers/infiniband/core/user_mad.c @@ -1005,9 +1005,8 @@ static int ib_umad_init_port(struct ib_device *device, int port_num, if (cdev_add(port->cdev, base_dev + port->dev_num, 1)) goto err_cdev; - port->dev = device_create_drvdata(umad_class, device->dma_device, - port->cdev->dev, port, - "umad%d", port->dev_num); + port->dev = device_create(umad_class, device->dma_device, + port->cdev->dev, "umad%d", port->dev_num); if (IS_ERR(port->dev)) goto err_cdev; @@ -1025,12 +1024,15 @@ static int ib_umad_init_port(struct ib_device *device, int port_num, if (cdev_add(port->sm_cdev, base_dev + port->dev_num + IB_UMAD_MAX_PORTS, 1)) goto err_sm_cdev; - port->sm_dev = device_create_drvdata(umad_class, device->dma_device, - port->sm_cdev->dev, port, - "issm%d", port->dev_num); + port->sm_dev = device_create(umad_class, device->dma_device, + port->sm_cdev->dev, + "issm%d", port->dev_num); if (IS_ERR(port->sm_dev)) goto err_sm_cdev; + dev_set_drvdata(port->dev, port); + dev_set_drvdata(port->sm_dev, port); + if (device_create_file(port->sm_dev, &dev_attr_ibdev)) goto err_sm_dev; if (device_create_file(port->sm_dev, &dev_attr_port)) diff --git a/trunk/drivers/infiniband/core/uverbs_main.c b/trunk/drivers/infiniband/core/uverbs_main.c index f806da184b51..cc1afa28c181 100644 --- a/trunk/drivers/infiniband/core/uverbs_main.c +++ b/trunk/drivers/infiniband/core/uverbs_main.c @@ -755,15 +755,14 @@ static void ib_uverbs_add_one(struct ib_device *device) if (cdev_add(uverbs_dev->cdev, IB_UVERBS_BASE_DEV + uverbs_dev->devnum, 1)) goto err_cdev; - uverbs_dev->dev = device_create_drvdata(uverbs_class, - device->dma_device, - uverbs_dev->cdev->dev, - uverbs_dev, - "uverbs%d", - uverbs_dev->devnum); + uverbs_dev->dev = device_create(uverbs_class, device->dma_device, + uverbs_dev->cdev->dev, + "uverbs%d", uverbs_dev->devnum); if (IS_ERR(uverbs_dev->dev)) goto err_cdev; + dev_set_drvdata(uverbs_dev->dev, uverbs_dev); + if (device_create_file(uverbs_dev->dev, &dev_attr_ibdev)) goto err_class; if (device_create_file(uverbs_dev->dev, &dev_attr_abi_version)) diff --git a/trunk/drivers/leds/led-class.c b/trunk/drivers/leds/led-class.c index 559a40861c39..b3c54be74556 100644 --- a/trunk/drivers/leds/led-class.c +++ b/trunk/drivers/leds/led-class.c @@ -103,11 +103,13 @@ int led_classdev_register(struct device *parent, struct led_classdev *led_cdev) { int rc; - led_cdev->dev = device_create_drvdata(leds_class, parent, 0, led_cdev, - "%s", led_cdev->name); + led_cdev->dev = device_create(leds_class, parent, 0, "%s", + led_cdev->name); if (IS_ERR(led_cdev->dev)) return PTR_ERR(led_cdev->dev); + dev_set_drvdata(led_cdev->dev, led_cdev); + /* register the attributes */ rc = device_create_file(led_cdev->dev, &dev_attr_brightness); if (rc) diff --git a/trunk/drivers/power/power_supply_core.c b/trunk/drivers/power/power_supply_core.c index af1633eb3b70..138dd76ee347 100644 --- a/trunk/drivers/power/power_supply_core.c +++ b/trunk/drivers/power/power_supply_core.c @@ -91,13 +91,15 @@ int power_supply_register(struct device *parent, struct power_supply *psy) { int rc = 0; - psy->dev = device_create_drvdata(power_supply_class, parent, 0, - psy, "%s", psy->name); + psy->dev = device_create(power_supply_class, parent, 0, + "%s", psy->name); if (IS_ERR(psy->dev)) { rc = PTR_ERR(psy->dev); goto dev_create_failed; } + dev_set_drvdata(psy->dev, psy); + INIT_WORK(&psy->changed_work, power_supply_changed_work); rc = power_supply_create_attrs(psy); diff --git a/trunk/drivers/s390/char/vmlogrdr.c b/trunk/drivers/s390/char/vmlogrdr.c index 2c2428cc05d8..e8487347e4d4 100644 --- a/trunk/drivers/s390/char/vmlogrdr.c +++ b/trunk/drivers/s390/char/vmlogrdr.c @@ -762,10 +762,10 @@ static int vmlogrdr_register_device(struct vmlogrdr_priv_t *priv) device_unregister(dev); return ret; } - priv->class_device = device_create_drvdata(vmlogrdr_class, dev, - MKDEV(vmlogrdr_major, - priv->minor_num), - priv, "%s", dev->bus_id); + priv->class_device = device_create(vmlogrdr_class, dev, + MKDEV(vmlogrdr_major, + priv->minor_num), + "%s", dev->bus_id); if (IS_ERR(priv->class_device)) { ret = PTR_ERR(priv->class_device); priv->class_device=NULL; @@ -773,6 +773,7 @@ static int vmlogrdr_register_device(struct vmlogrdr_priv_t *priv) device_unregister(dev); return ret; } + dev->driver_data = priv; priv->device = dev; return 0; } diff --git a/trunk/drivers/scsi/ch.c b/trunk/drivers/scsi/ch.c index c4b938bc30d3..75c84d7b9ce8 100644 --- a/trunk/drivers/scsi/ch.c +++ b/trunk/drivers/scsi/ch.c @@ -910,9 +910,9 @@ static int ch_probe(struct device *dev) ch->minor = minor; sprintf(ch->name,"ch%d",ch->minor); - class_dev = device_create_drvdata(ch_sysfs_class, dev, - MKDEV(SCSI_CHANGER_MAJOR, ch->minor), - ch, "s%s", ch->name); + class_dev = device_create(ch_sysfs_class, dev, + MKDEV(SCSI_CHANGER_MAJOR,ch->minor), + "s%s", ch->name); if (IS_ERR(class_dev)) { printk(KERN_WARNING "ch%d: device_create failed\n", ch->minor); @@ -926,6 +926,7 @@ static int ch_probe(struct device *dev) if (init) ch_init_elem(ch); + dev_set_drvdata(dev, ch); sdev_printk(KERN_INFO, sd, "Attached scsi changer %s\n", ch->name); return 0; diff --git a/trunk/drivers/scsi/osst.c b/trunk/drivers/scsi/osst.c index 243d8becd30f..31f7aec44d90 100644 --- a/trunk/drivers/scsi/osst.c +++ b/trunk/drivers/scsi/osst.c @@ -5695,12 +5695,13 @@ static int osst_sysfs_add(dev_t dev, struct device *device, struct osst_tape * S struct device *osst_member; int err; - osst_member = device_create_drvdata(osst_sysfs_class, device, dev, STp, "%s", name); + osst_member = device_create(osst_sysfs_class, device, dev, "%s", name); if (IS_ERR(osst_member)) { printk(KERN_WARNING "osst :W: Unable to add sysfs class member %s\n", name); return PTR_ERR(osst_member); } + dev_set_drvdata(osst_member, STp); err = device_create_file(osst_member, &dev_attr_ADR_rev); if (err) goto err_out; diff --git a/trunk/drivers/scsi/sg.c b/trunk/drivers/scsi/sg.c index ea0edd1b2e76..c9d7f721b9e2 100644 --- a/trunk/drivers/scsi/sg.c +++ b/trunk/drivers/scsi/sg.c @@ -1441,18 +1441,17 @@ sg_add(struct device *cl_dev, struct class_interface *cl_intf) if (sg_sysfs_valid) { struct device *sg_class_member; - sg_class_member = device_create_drvdata(sg_sysfs_class, - cl_dev->parent, - MKDEV(SCSI_GENERIC_MAJOR, - sdp->index), - sdp, - "%s", disk->disk_name); + sg_class_member = device_create(sg_sysfs_class, cl_dev->parent, + MKDEV(SCSI_GENERIC_MAJOR, + sdp->index), + "%s", disk->disk_name); if (IS_ERR(sg_class_member)) { printk(KERN_ERR "sg_add: " "device_create failed\n"); error = PTR_ERR(sg_class_member); goto cdev_add_err; } + dev_set_drvdata(sg_class_member, sdp); error = sysfs_create_link(&scsidp->sdev_gendev.kobj, &sg_class_member->kobj, "generic"); if (error) diff --git a/trunk/drivers/scsi/st.c b/trunk/drivers/scsi/st.c index 6e5a5bb31311..e8db66ad0bde 100644 --- a/trunk/drivers/scsi/st.c +++ b/trunk/drivers/scsi/st.c @@ -4424,19 +4424,17 @@ static int do_create_class_files(struct scsi_tape *STp, int dev_num, int mode) snprintf(name, 10, "%s%s%s", rew ? "n" : "", STp->disk->disk_name, st_formats[i]); st_class_member = - device_create_drvdata(st_sysfs_class, - &STp->device->sdev_gendev, - MKDEV(SCSI_TAPE_MAJOR, - TAPE_MINOR(dev_num, - mode, rew)), - &STp->modes[mode], - "%s", name); + device_create(st_sysfs_class, &STp->device->sdev_gendev, + MKDEV(SCSI_TAPE_MAJOR, + TAPE_MINOR(dev_num, mode, rew)), + "%s", name); if (IS_ERR(st_class_member)) { printk(KERN_WARNING "st%d: device_create failed\n", dev_num); error = PTR_ERR(st_class_member); goto out; } + dev_set_drvdata(st_class_member, &STp->modes[mode]); error = device_create_file(st_class_member, &dev_attr_defined); diff --git a/trunk/drivers/uio/uio.c b/trunk/drivers/uio/uio.c index 0a12e90ad416..55cc7b80422a 100644 --- a/trunk/drivers/uio/uio.c +++ b/trunk/drivers/uio/uio.c @@ -649,14 +649,15 @@ int __uio_register_device(struct module *owner, if (ret) goto err_get_minor; - idev->dev = device_create_drvdata(uio_class->class, parent, - MKDEV(uio_major, idev->minor), idev, - "uio%d", idev->minor); + idev->dev = device_create(uio_class->class, parent, + MKDEV(uio_major, idev->minor), + "uio%d", idev->minor); if (IS_ERR(idev->dev)) { printk(KERN_ERR "UIO: device register failed\n"); ret = PTR_ERR(idev->dev); goto err_device_create; } + dev_set_drvdata(idev->dev, idev); ret = uio_dev_add_attributes(idev); if (ret) diff --git a/trunk/drivers/usb/core/hcd.c b/trunk/drivers/usb/core/hcd.c index 09a53e7f3327..bf10e9c4195e 100644 --- a/trunk/drivers/usb/core/hcd.c +++ b/trunk/drivers/usb/core/hcd.c @@ -818,12 +818,12 @@ static int usb_register_bus(struct usb_bus *bus) set_bit (busnum, busmap.busmap); bus->busnum = busnum; - bus->dev = device_create_drvdata(usb_host_class, bus->controller, - MKDEV(0, 0), bus, - "usb_host%d", busnum); + bus->dev = device_create(usb_host_class, bus->controller, MKDEV(0, 0), + "usb_host%d", busnum); result = PTR_ERR(bus->dev); if (IS_ERR(bus->dev)) goto error_create_class_dev; + dev_set_drvdata(bus->dev, bus); /* Add it to the local list of buses */ list_add (&bus->bus_list, &usb_bus_list); diff --git a/trunk/drivers/usb/misc/phidgetkit.c b/trunk/drivers/usb/misc/phidgetkit.c index 4cfa25b0f44e..24230c638b8e 100644 --- a/trunk/drivers/usb/misc/phidgetkit.c +++ b/trunk/drivers/usb/misc/phidgetkit.c @@ -595,14 +595,14 @@ static int interfacekit_probe(struct usb_interface *intf, const struct usb_devic } while(value); kit->dev_no = bit; - kit->dev = device_create_drvdata(phidget_class, &kit->udev->dev, - MKDEV(0, 0), kit, - "interfacekit%d", kit->dev_no); + kit->dev = device_create(phidget_class, &kit->udev->dev, 0, + "interfacekit%d", kit->dev_no); if (IS_ERR(kit->dev)) { rc = PTR_ERR(kit->dev); kit->dev = NULL; goto out; } + dev_set_drvdata(kit->dev, kit); if (usb_submit_urb(kit->irq, GFP_KERNEL)) { rc = -EIO; diff --git a/trunk/drivers/usb/misc/phidgetmotorcontrol.c b/trunk/drivers/usb/misc/phidgetmotorcontrol.c index 9b4696f21b22..f0113c17cc5a 100644 --- a/trunk/drivers/usb/misc/phidgetmotorcontrol.c +++ b/trunk/drivers/usb/misc/phidgetmotorcontrol.c @@ -365,15 +365,16 @@ static int motorcontrol_probe(struct usb_interface *intf, const struct usb_devic } while(value); mc->dev_no = bit; - mc->dev = device_create_drvdata(phidget_class, &mc->udev->dev, - MKDEV(0, 0), mc, - "motorcontrol%d", mc->dev_no); + mc->dev = device_create(phidget_class, &mc->udev->dev, 0, + "motorcontrol%d", mc->dev_no); if (IS_ERR(mc->dev)) { rc = PTR_ERR(mc->dev); mc->dev = NULL; goto out; } + dev_set_drvdata(mc->dev, mc); + if (usb_submit_urb(mc->irq, GFP_KERNEL)) { rc = -EIO; goto out; diff --git a/trunk/drivers/usb/misc/phidgetservo.c b/trunk/drivers/usb/misc/phidgetservo.c index 1ca7ddb41d4d..7d590c09434a 100644 --- a/trunk/drivers/usb/misc/phidgetservo.c +++ b/trunk/drivers/usb/misc/phidgetservo.c @@ -275,14 +275,14 @@ servo_probe(struct usb_interface *interface, const struct usb_device_id *id) } while (value); dev->dev_no = bit; - dev->dev = device_create_drvdata(phidget_class, &dev->udev->dev, - MKDEV(0, 0), dev, - "servo%d", dev->dev_no); + dev->dev = device_create(phidget_class, &dev->udev->dev, 0, + "servo%d", dev->dev_no); if (IS_ERR(dev->dev)) { rc = PTR_ERR(dev->dev); dev->dev = NULL; goto out; } + dev_set_drvdata(dev->dev, dev); servo_count = dev->type & SERVO_COUNT_QUAD ? 4 : 1; diff --git a/trunk/drivers/usb/serial/ftdi_sio.c b/trunk/drivers/usb/serial/ftdi_sio.c index 5b349ece7247..3cee6feac174 100644 --- a/trunk/drivers/usb/serial/ftdi_sio.c +++ b/trunk/drivers/usb/serial/ftdi_sio.c @@ -374,6 +374,7 @@ static struct usb_device_id id_table_combined [] = { .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, { USB_DEVICE(FTDI_VID, FTDI_OOCDLINK_PID), .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, + { USB_DEVICE(RATOC_VENDOR_ID, RATOC_PRODUCT_ID_USB60F) }, { }, /* Optional parameter entry */ { } /* Terminating entry */ }; diff --git a/trunk/drivers/usb/serial/ftdi_sio.h b/trunk/drivers/usb/serial/ftdi_sio.h index 504edf8c3a3f..a72f2c81d664 100644 --- a/trunk/drivers/usb/serial/ftdi_sio.h +++ b/trunk/drivers/usb/serial/ftdi_sio.h @@ -591,6 +591,12 @@ #define FIC_VID 0x1457 #define FIC_NEO1973_DEBUG_PID 0x5118 +/* + * RATOC REX-USB60F + */ +#define RATOC_VENDOR_ID 0x0584 +#define RATOC_PRODUCT_ID_USB60F 0xb020 + /* * BmRequestType: 1100 0000b * bRequest: FTDI_E2_READ diff --git a/trunk/drivers/usb/serial/pl2303.c b/trunk/drivers/usb/serial/pl2303.c index c605fb68f807..234c5eea95a2 100644 --- a/trunk/drivers/usb/serial/pl2303.c +++ b/trunk/drivers/usb/serial/pl2303.c @@ -66,7 +66,6 @@ static struct usb_device_id id_table [] = { { USB_DEVICE(ITEGNO_VENDOR_ID, ITEGNO_PRODUCT_ID_2080) }, { USB_DEVICE(MA620_VENDOR_ID, MA620_PRODUCT_ID) }, { USB_DEVICE(RATOC_VENDOR_ID, RATOC_PRODUCT_ID) }, - { USB_DEVICE(RATOC_VENDOR_ID, RATOC_PRODUCT_ID_USB60F) }, { USB_DEVICE(TRIPP_VENDOR_ID, TRIPP_PRODUCT_ID) }, { USB_DEVICE(RADIOSHACK_VENDOR_ID, RADIOSHACK_PRODUCT_ID) }, { USB_DEVICE(DCU10_VENDOR_ID, DCU10_PRODUCT_ID) }, diff --git a/trunk/drivers/usb/serial/pl2303.h b/trunk/drivers/usb/serial/pl2303.h index 10cf872e5ecb..3bdefe020501 100644 --- a/trunk/drivers/usb/serial/pl2303.h +++ b/trunk/drivers/usb/serial/pl2303.h @@ -36,7 +36,6 @@ #define RATOC_VENDOR_ID 0x0584 #define RATOC_PRODUCT_ID 0xb000 -#define RATOC_PRODUCT_ID_USB60F 0xb020 #define TRIPP_VENDOR_ID 0x2478 #define TRIPP_PRODUCT_ID 0x2008 diff --git a/trunk/drivers/video/display/display-sysfs.c b/trunk/drivers/video/display/display-sysfs.c index 6ef800bdf482..35477177bef4 100644 --- a/trunk/drivers/video/display/display-sysfs.c +++ b/trunk/drivers/video/display/display-sysfs.c @@ -26,7 +26,6 @@ #include #include #include -#include static ssize_t display_show_name(struct device *dev, struct device_attribute *attr, char *buf) @@ -153,13 +152,10 @@ struct display_device *display_device_register(struct display_driver *driver, mutex_unlock(&allocated_dsp_lock); if (!ret) { - new_dev->dev = device_create_drvdata(display_class, - parent, - MKDEV(0,0), - new_dev, - "display%d", - new_dev->idx); + new_dev->dev = device_create(display_class, parent, 0, + "display%d", new_dev->idx); if (!IS_ERR(new_dev->dev)) { + dev_set_drvdata(new_dev->dev, new_dev); new_dev->parent = parent; new_dev->driver = driver; mutex_init(&new_dev->lock); diff --git a/trunk/include/linux/device.h b/trunk/include/linux/device.h index 14616e80213c..15e9fa3ad3af 100644 --- a/trunk/include/linux/device.h +++ b/trunk/include/linux/device.h @@ -449,21 +449,9 @@ extern int __must_check device_reprobe(struct device *dev); /* * Easy functions for dynamically creating devices on the fly */ -extern struct device *device_create_vargs(struct class *cls, - struct device *parent, - dev_t devt, - void *drvdata, - const char *fmt, - va_list vargs); extern struct device *device_create(struct class *cls, struct device *parent, dev_t devt, const char *fmt, ...) __attribute__((format(printf, 4, 5))); -extern struct device *device_create_drvdata(struct class *cls, - struct device *parent, - dev_t devt, - void *drvdata, - const char *fmt, ...) - __attribute__((format(printf, 5, 6))); extern void device_destroy(struct class *cls, dev_t devt); /* diff --git a/trunk/mm/backing-dev.c b/trunk/mm/backing-dev.c index f2e574dbc300..7c4f9e097095 100644 --- a/trunk/mm/backing-dev.c +++ b/trunk/mm/backing-dev.c @@ -172,22 +172,30 @@ postcore_initcall(bdi_class_init); int bdi_register(struct backing_dev_info *bdi, struct device *parent, const char *fmt, ...) { + char *name; va_list args; int ret = 0; struct device *dev; va_start(args, fmt); - dev = device_create_vargs(bdi_class, parent, MKDEV(0, 0), bdi, fmt, args); + name = kvasprintf(GFP_KERNEL, fmt, args); va_end(args); + + if (!name) + return -ENOMEM; + + dev = device_create(bdi_class, parent, MKDEV(0, 0), name); if (IS_ERR(dev)) { ret = PTR_ERR(dev); goto exit; } bdi->dev = dev; - bdi_debug_register(bdi, dev_name(dev)); + dev_set_drvdata(bdi->dev, bdi); + bdi_debug_register(bdi, name); exit: + kfree(name); return ret; } EXPORT_SYMBOL(bdi_register); diff --git a/trunk/sound/core/sound.c b/trunk/sound/core/sound.c index 6c8ab48c689a..812f91b3de5b 100644 --- a/trunk/sound/core/sound.c +++ b/trunk/sound/core/sound.c @@ -259,9 +259,8 @@ int snd_register_device_for_dev(int type, struct snd_card *card, int dev, return minor; } snd_minors[minor] = preg; - preg->dev = device_create_drvdata(sound_class, device, - MKDEV(major, minor), - private_data, "%s", name); + preg->dev = device_create(sound_class, device, MKDEV(major, minor), + "%s", name); if (IS_ERR(preg->dev)) { snd_minors[minor] = NULL; mutex_unlock(&sound_mutex); @@ -270,6 +269,9 @@ int snd_register_device_for_dev(int type, struct snd_card *card, int dev, return minor; } + if (preg->dev) + dev_set_drvdata(preg->dev, private_data); + mutex_unlock(&sound_mutex); return 0; }