summaryrefslogtreecommitdiff
path: root/drivers/usb/misc/phidgetmotorcontrol.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/misc/phidgetmotorcontrol.c')
-rw-r--r--drivers/usb/misc/phidgetmotorcontrol.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/usb/misc/phidgetmotorcontrol.c b/drivers/usb/misc/phidgetmotorcontrol.c
index f0113c17cc5a..9b4696f21b22 100644
--- a/drivers/usb/misc/phidgetmotorcontrol.c
+++ b/drivers/usb/misc/phidgetmotorcontrol.c
@@ -365,16 +365,15 @@ static int motorcontrol_probe(struct usb_interface *intf, const struct usb_devic
} while(value);
mc->dev_no = bit;
- mc->dev = device_create(phidget_class, &mc->udev->dev, 0,
- "motorcontrol%d", mc->dev_no);
+ mc->dev = device_create_drvdata(phidget_class, &mc->udev->dev,
+ MKDEV(0, 0), mc,
+ "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;