提交 ffa8d2a3 编写于 作者: S Sebastian Ott 提交者: Martin Schwidefsky

[S390] cio: fix drvdata usage for the console subchannel

Using dev_set_drvdata prior to device_register will force the driver core
to kmalloc its private data. Since we use this for the console subchannel
lets set the drvdata before taking the subchannels spinlock.
Signed-off-by: NSebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 70ee9518
...@@ -1519,6 +1519,7 @@ static int ccw_device_console_enable(struct ccw_device *cdev, ...@@ -1519,6 +1519,7 @@ static int ccw_device_console_enable(struct ccw_device *cdev,
sch->driver = &io_subchannel_driver; sch->driver = &io_subchannel_driver;
/* Initialize the ccw_device structure. */ /* Initialize the ccw_device structure. */
cdev->dev.parent= &sch->dev; cdev->dev.parent= &sch->dev;
sch_set_cdev(sch, cdev);
io_subchannel_recog(cdev, sch); io_subchannel_recog(cdev, sch);
/* Now wait for the async. recognition to come to an end. */ /* Now wait for the async. recognition to come to an end. */
spin_lock_irq(cdev->ccwlock); spin_lock_irq(cdev->ccwlock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册