提交 faf16aa9 编写于 作者: C Cornelia Huck 提交者: Martin Schwidefsky

[S390] dasd: Use accessors instead of using driver_data directly.

Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 2bf373b3
...@@ -561,7 +561,7 @@ dasd_create_device(struct ccw_device *cdev) ...@@ -561,7 +561,7 @@ dasd_create_device(struct ccw_device *cdev)
} }
spin_lock_irqsave(get_ccwdev_lock(cdev), flags); spin_lock_irqsave(get_ccwdev_lock(cdev), flags);
cdev->dev.driver_data = device; dev_set_drvdata(&cdev->dev, device);
spin_unlock_irqrestore(get_ccwdev_lock(cdev), flags); spin_unlock_irqrestore(get_ccwdev_lock(cdev), flags);
return device; return device;
...@@ -597,7 +597,7 @@ dasd_delete_device(struct dasd_device *device) ...@@ -597,7 +597,7 @@ dasd_delete_device(struct dasd_device *device)
/* Disconnect dasd_device structure from ccw_device structure. */ /* Disconnect dasd_device structure from ccw_device structure. */
spin_lock_irqsave(get_ccwdev_lock(device->cdev), flags); spin_lock_irqsave(get_ccwdev_lock(device->cdev), flags);
device->cdev->dev.driver_data = NULL; dev_set_drvdata(&device->cdev->dev, NULL);
spin_unlock_irqrestore(get_ccwdev_lock(device->cdev), flags); spin_unlock_irqrestore(get_ccwdev_lock(device->cdev), flags);
/* /*
...@@ -638,7 +638,7 @@ dasd_put_device_wake(struct dasd_device *device) ...@@ -638,7 +638,7 @@ dasd_put_device_wake(struct dasd_device *device)
struct dasd_device * struct dasd_device *
dasd_device_from_cdev_locked(struct ccw_device *cdev) dasd_device_from_cdev_locked(struct ccw_device *cdev)
{ {
struct dasd_device *device = cdev->dev.driver_data; struct dasd_device *device = dev_get_drvdata(&cdev->dev);
if (!device) if (!device)
return ERR_PTR(-ENODEV); return ERR_PTR(-ENODEV);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册