diff options
Diffstat (limited to 'arch/um/drivers/ubd_kern.c')
-rw-r--r-- | arch/um/drivers/ubd_kern.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c index aa9e926e13d7..8f05d4d9da12 100644 --- a/arch/um/drivers/ubd_kern.c +++ b/arch/um/drivers/ubd_kern.c | |||
@@ -778,7 +778,7 @@ static int ubd_open_dev(struct ubd *ubd_dev) | |||
778 | 778 | ||
779 | static void ubd_device_release(struct device *dev) | 779 | static void ubd_device_release(struct device *dev) |
780 | { | 780 | { |
781 | struct ubd *ubd_dev = dev->driver_data; | 781 | struct ubd *ubd_dev = dev_get_drvdata(dev); |
782 | 782 | ||
783 | blk_cleanup_queue(ubd_dev->queue); | 783 | blk_cleanup_queue(ubd_dev->queue); |
784 | *ubd_dev = ((struct ubd) DEFAULT_UBD); | 784 | *ubd_dev = ((struct ubd) DEFAULT_UBD); |
@@ -807,7 +807,7 @@ static int ubd_disk_register(int major, u64 size, int unit, | |||
807 | ubd_devs[unit].pdev.id = unit; | 807 | ubd_devs[unit].pdev.id = unit; |
808 | ubd_devs[unit].pdev.name = DRIVER_NAME; | 808 | ubd_devs[unit].pdev.name = DRIVER_NAME; |
809 | ubd_devs[unit].pdev.dev.release = ubd_device_release; | 809 | ubd_devs[unit].pdev.dev.release = ubd_device_release; |
810 | ubd_devs[unit].pdev.dev.driver_data = &ubd_devs[unit]; | 810 | dev_set_drvdata(&ubd_devs[unit].pdev.dev, &ubd_devs[unit]); |
811 | platform_device_register(&ubd_devs[unit].pdev); | 811 | platform_device_register(&ubd_devs[unit].pdev); |
812 | disk->driverfs_dev = &ubd_devs[unit].pdev.dev; | 812 | disk->driverfs_dev = &ubd_devs[unit].pdev.dev; |
813 | } | 813 | } |