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

Commit a50d4538 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: misc: diag_bridge: use platform_device_register_simple"

parents 8b2a6db7 dca35bba
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -464,12 +464,7 @@ diag_bridge_probe(struct usb_interface *ifc, const struct usb_device_id *id)
		pr_err("unable to allocate dev");
		return -ENOMEM;
	}
	dev->pdev = platform_device_alloc("diag_bridge", devid);
	if (!dev->pdev) {
		pr_err("unable to allocate platform device");
		kfree(dev);
		return -ENOMEM;
	}

	__dev[devid] = dev;
	dev->id = devid;

@@ -498,7 +493,13 @@ diag_bridge_probe(struct usb_interface *ifc, const struct usb_device_id *id)

	usb_set_intfdata(ifc, dev);
	diag_bridge_debugfs_init();
	platform_device_add(dev->pdev);
	dev->pdev = platform_device_register_simple("diag_bridge", devid,
						    NULL, 0);
	if (IS_ERR(dev->pdev)) {
		pr_err("unable to allocate platform device");
		ret = PTR_ERR(dev->pdev);
		goto error;
	}

	dev_dbg(&dev->ifc->dev, "%s: complete\n", __func__);