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

Commit b0b090e5 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

device create: usb: convert device_create_drvdata to device_create



Now that device_create() has been audited, rename things back to the
original call to be sane.

Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent abe9ab8f
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1729,9 +1729,9 @@ static int usb_classdev_add(struct usb_device *dev)
{
	struct device *cldev;

	cldev = device_create_drvdata(usb_classdev_class, &dev->dev,
				      dev->dev.devt, NULL, "usbdev%d.%d",
				      dev->bus->busnum, dev->devnum);
	cldev = device_create(usb_classdev_class, &dev->dev, dev->dev.devt,
			      NULL, "usbdev%d.%d", dev->bus->busnum,
			      dev->devnum);
	if (IS_ERR(cldev))
		return PTR_ERR(cldev);
	dev->usb_classdev = cldev;
+3 −3
Original line number Diff line number Diff line
@@ -196,7 +196,7 @@ int usb_register_dev(struct usb_interface *intf,
		++temp;
	else
		temp = name;
	intf->usb_dev = device_create_drvdata(usb_class->class, &intf->dev,
	intf->usb_dev = device_create(usb_class->class, &intf->dev,
				      MKDEV(USB_MAJOR, minor), NULL,
				      "%s", temp);
	if (IS_ERR(intf->usb_dev)) {
+2 −3
Original line number Diff line number Diff line
@@ -818,9 +818,8 @@ 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),
				 bus, "usb_host%d", busnum);
	result = PTR_ERR(bus->dev);
	if (IS_ERR(bus->dev))
		goto error_create_class_dev;
+2 −2
Original line number Diff line number Diff line
@@ -1360,8 +1360,8 @@ printer_bind(struct usb_gadget *gadget)


	/* Setup the sysfs files for the printer gadget. */
	dev->pdev = device_create_drvdata(usb_gadget_class, NULL,
					  g_printer_devno, NULL, "g_printer");
	dev->pdev = device_create(usb_gadget_class, NULL, g_printer_devno,
				  NULL, "g_printer");
	if (IS_ERR(dev->pdev)) {
		ERROR(dev, "Failed to create device: g_printer\n");
		goto fail;
+2 −3
Original line number Diff line number Diff line
@@ -595,9 +595,8 @@ 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, MKDEV(0, 0),
				 kit, "interfacekit%d", kit->dev_no);
        if (IS_ERR(kit->dev)) {
                rc = PTR_ERR(kit->dev);
                kit->dev = NULL;
Loading