aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-09-19 19:24:03 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-09-19 19:24:03 -0400
commit9824b8f11373b0df806c135a342da9319ef1d893 (patch)
treefb07079ecc7058e3947261aab57d1138c0a9e41c
parentab048fb1aafff7883a6bbe62b5354fbc2fa5597c (diff)
parent9adb8c1d4f0ac78b3469e377ce5f8a846cbaedaf (diff)
Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6: [S390] cio: fix orb initialization in cio_start_key [S390] cio: Fix driver_data handling for ccwgroup devices.
-rw-r--r--drivers/s390/cio/ccwgroup.c4
-rw-r--r--drivers/s390/cio/cio.c1
2 files changed, 4 insertions, 1 deletions
diff --git a/drivers/s390/cio/ccwgroup.c b/drivers/s390/cio/ccwgroup.c
index e0ce65fca4e7..9a50f245774b 100644
--- a/drivers/s390/cio/ccwgroup.c
+++ b/drivers/s390/cio/ccwgroup.c
@@ -113,7 +113,8 @@ ccwgroup_release (struct device *dev)
113 113
114 for (i = 0; i < gdev->count; i++) { 114 for (i = 0; i < gdev->count; i++) {
115 if (gdev->cdev[i]) { 115 if (gdev->cdev[i]) {
116 dev_set_drvdata(&gdev->cdev[i]->dev, NULL); 116 if (dev_get_drvdata(&gdev->cdev[i]->dev) == gdev)
117 dev_set_drvdata(&gdev->cdev[i]->dev, NULL);
117 put_device(&gdev->cdev[i]->dev); 118 put_device(&gdev->cdev[i]->dev);
118 } 119 }
119 } 120 }
@@ -296,6 +297,7 @@ error:
296 if (dev_get_drvdata(&gdev->cdev[i]->dev) == gdev) 297 if (dev_get_drvdata(&gdev->cdev[i]->dev) == gdev)
297 dev_set_drvdata(&gdev->cdev[i]->dev, NULL); 298 dev_set_drvdata(&gdev->cdev[i]->dev, NULL);
298 put_device(&gdev->cdev[i]->dev); 299 put_device(&gdev->cdev[i]->dev);
300 gdev->cdev[i] = NULL;
299 } 301 }
300 mutex_unlock(&gdev->reg_mutex); 302 mutex_unlock(&gdev->reg_mutex);
301 put_device(&gdev->dev); 303 put_device(&gdev->dev);
diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c
index 5954b905e3ca..326f4cc7f92c 100644
--- a/drivers/s390/cio/cio.c
+++ b/drivers/s390/cio/cio.c
@@ -174,6 +174,7 @@ cio_start_key (struct subchannel *sch, /* subchannel structure */
174 CIO_TRACE_EVENT(4, sch->dev.bus_id); 174 CIO_TRACE_EVENT(4, sch->dev.bus_id);
175 175
176 orb = &to_io_private(sch)->orb; 176 orb = &to_io_private(sch)->orb;
177 memset(orb, 0, sizeof(union orb));
177 /* sch is always under 2G. */ 178 /* sch is always under 2G. */
178 orb->cmd.intparm = (u32)(addr_t)sch; 179 orb->cmd.intparm = (u32)(addr_t)sch;
179 orb->cmd.fmt = 1; 180 orb->cmd.fmt = 1;