You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
device create: usb: convert device_create to device_create_drvdata
device_create() is race-prone, so use the race-free device_create_drvdata() instead as device_create() is going away. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
@@ -1360,8 +1360,8 @@ printer_bind(struct usb_gadget *gadget)
|
||||
|
||||
|
||||
/* Setup the sysfs files for the printer gadget. */
|
||||
dev->pdev = device_create(usb_gadget_class, NULL, g_printer_devno,
|
||||
"g_printer");
|
||||
dev->pdev = device_create_drvdata(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;
|
||||
|
||||
Reference in New Issue
Block a user