diff options
-rw-r--r-- | drivers/uio/uio.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c index 55cc7b80422a..0a12e90ad416 100644 --- a/drivers/uio/uio.c +++ b/drivers/uio/uio.c | |||
@@ -649,15 +649,14 @@ int __uio_register_device(struct module *owner, | |||
649 | if (ret) | 649 | if (ret) |
650 | goto err_get_minor; | 650 | goto err_get_minor; |
651 | 651 | ||
652 | idev->dev = device_create(uio_class->class, parent, | 652 | idev->dev = device_create_drvdata(uio_class->class, parent, |
653 | MKDEV(uio_major, idev->minor), | 653 | MKDEV(uio_major, idev->minor), idev, |
654 | "uio%d", idev->minor); | 654 | "uio%d", idev->minor); |
655 | if (IS_ERR(idev->dev)) { | 655 | if (IS_ERR(idev->dev)) { |
656 | printk(KERN_ERR "UIO: device register failed\n"); | 656 | printk(KERN_ERR "UIO: device register failed\n"); |
657 | ret = PTR_ERR(idev->dev); | 657 | ret = PTR_ERR(idev->dev); |
658 | goto err_device_create; | 658 | goto err_device_create; |
659 | } | 659 | } |
660 | dev_set_drvdata(idev->dev, idev); | ||
661 | 660 | ||
662 | ret = uio_dev_add_attributes(idev); | 661 | ret = uio_dev_add_attributes(idev); |
663 | if (ret) | 662 | if (ret) |