Skip to content

Commit

Permalink
[S390] cio: fix drvdata usage for the console subchannel
Browse files Browse the repository at this point in the history
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: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Sebastian Ott authored and Martin Schwidefsky committed Dec 18, 2009
1 parent 70ee951 commit ffa8d2a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/s390/cio/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -1519,6 +1519,7 @@ static int ccw_device_console_enable(struct ccw_device *cdev,
sch->driver = &io_subchannel_driver;
/* Initialize the ccw_device structure. */
cdev->dev.parent= &sch->dev;
sch_set_cdev(sch, cdev);
io_subchannel_recog(cdev, sch);
/* Now wait for the async. recognition to come to an end. */
spin_lock_irq(cdev->ccwlock);
Expand Down

0 comments on commit ffa8d2a

Please sign in to comment.