diff options
Diffstat (limited to 'drivers/uio')
-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 1a0415e77a30..5a7ca2e6094d 100644 --- a/drivers/uio/uio.c +++ b/drivers/uio/uio.c | |||
@@ -656,15 +656,14 @@ int __uio_register_device(struct module *owner, | |||
656 | if (ret) | 656 | if (ret) |
657 | goto err_get_minor; | 657 | goto err_get_minor; |
658 | 658 | ||
659 | idev->dev = device_create(uio_class->class, parent, | 659 | idev->dev = device_create_drvdata(uio_class->class, parent, |
660 | MKDEV(uio_major, idev->minor), | 660 | MKDEV(uio_major, idev->minor), idev, |
661 | "uio%d", idev->minor); | 661 | "uio%d", idev->minor); |
662 | if (IS_ERR(idev->dev)) { | 662 | if (IS_ERR(idev->dev)) { |
663 | printk(KERN_ERR "UIO: device register failed\n"); | 663 | printk(KERN_ERR "UIO: device register failed\n"); |
664 | ret = PTR_ERR(idev->dev); | 664 | ret = PTR_ERR(idev->dev); |
665 | goto err_device_create; | 665 | goto err_device_create; |
666 | } | 666 | } |
667 | dev_set_drvdata(idev->dev, idev); | ||
668 | 667 | ||
669 | ret = uio_dev_add_attributes(idev); | 668 | ret = uio_dev_add_attributes(idev); |
670 | if (ret) | 669 | if (ret) |