diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2006-08-30 08:33:35 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2006-08-30 08:33:35 -0400 |
commit | 292888c81e74115db5e5a4a838f730a7c3662982 (patch) | |
tree | 16f7b7bf39cd8a72fa8d3aa5b71c8dc890b57c96 /drivers/s390/cio/ccwgroup.c | |
parent | 8f61701bdf536c7a80f0f614bac91c7883804c4c (diff) |
[S390] cio: kernel stack overflow.
Use different kind of assignment to make sure gcc doesn't create code
that creates temp variables on the stack, assigns values to it and
copies the content of the whole temp variable to the destination.
This reduces stack usage of e.g. ccwgroup_driver_register from 976
to 48 bytes instead.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio/ccwgroup.c')
-rw-r--r-- | drivers/s390/cio/ccwgroup.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/s390/cio/ccwgroup.c b/drivers/s390/cio/ccwgroup.c index 3cba6c9fab11..38954f5cd14c 100644 --- a/drivers/s390/cio/ccwgroup.c +++ b/drivers/s390/cio/ccwgroup.c | |||
@@ -183,11 +183,9 @@ ccwgroup_create(struct device *root, | |||
183 | 183 | ||
184 | gdev->creator_id = creator_id; | 184 | gdev->creator_id = creator_id; |
185 | gdev->count = argc; | 185 | gdev->count = argc; |
186 | gdev->dev = (struct device ) { | 186 | gdev->dev.bus = &ccwgroup_bus_type; |
187 | .bus = &ccwgroup_bus_type, | 187 | gdev->dev.parent = root; |
188 | .parent = root, | 188 | gdev->dev.release = ccwgroup_release; |
189 | .release = ccwgroup_release, | ||
190 | }; | ||
191 | 189 | ||
192 | snprintf (gdev->dev.bus_id, BUS_ID_SIZE, "%s", | 190 | snprintf (gdev->dev.bus_id, BUS_ID_SIZE, "%s", |
193 | gdev->cdev[0]->dev.bus_id); | 191 | gdev->cdev[0]->dev.bus_id); |
@@ -391,10 +389,8 @@ int | |||
391 | ccwgroup_driver_register (struct ccwgroup_driver *cdriver) | 389 | ccwgroup_driver_register (struct ccwgroup_driver *cdriver) |
392 | { | 390 | { |
393 | /* register our new driver with the core */ | 391 | /* register our new driver with the core */ |
394 | cdriver->driver = (struct device_driver) { | 392 | cdriver->driver.bus = &ccwgroup_bus_type; |
395 | .bus = &ccwgroup_bus_type, | 393 | cdriver->driver.name = cdriver->name; |
396 | .name = cdriver->name, | ||
397 | }; | ||
398 | 394 | ||
399 | return driver_register(&cdriver->driver); | 395 | return driver_register(&cdriver->driver); |
400 | } | 396 | } |