diff options
author | Sebastian Ott <sebott@linux.vnet.ibm.com> | 2012-05-15 12:03:46 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2012-05-16 08:42:49 -0400 |
commit | 9814fdfbecbb030454c46ebab88f8ea9819bc143 (patch) | |
tree | 9955c8f76caffaa5298239c42a003ac564b10224 /drivers/s390/cio | |
parent | c041f2d487654eb2f981f517b216cf1efdf3cdf2 (diff) |
s390/ccwgroup: remove ccwgroup_create_from_string
Remove the old ccwgroup_create_from_string interface since all
drivers have been converted to ccwgroup_create_dev. Also remove
now unused members of ccwgroup_driver.
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio')
-rw-r--r-- | drivers/s390/cio/ccwgroup.c | 57 |
1 files changed, 2 insertions, 55 deletions
diff --git a/drivers/s390/cio/ccwgroup.c b/drivers/s390/cio/ccwgroup.c index c69cee607aed..731470e68493 100644 --- a/drivers/s390/cio/ccwgroup.c +++ b/drivers/s390/cio/ccwgroup.c | |||
@@ -30,19 +30,6 @@ | |||
30 | * to devices that use multiple subchannels. | 30 | * to devices that use multiple subchannels. |
31 | */ | 31 | */ |
32 | 32 | ||
33 | /* a device matches a driver if all its slave devices match the same | ||
34 | * entry of the driver */ | ||
35 | static int ccwgroup_bus_match(struct device *dev, struct device_driver * drv) | ||
36 | { | ||
37 | struct ccwgroup_device *gdev = to_ccwgroupdev(dev); | ||
38 | struct ccwgroup_driver *gdrv = to_ccwgroupdrv(drv); | ||
39 | |||
40 | if (gdev->creator_id == gdrv->driver_id) | ||
41 | return 1; | ||
42 | |||
43 | return 0; | ||
44 | } | ||
45 | |||
46 | static struct bus_type ccwgroup_bus_type; | 33 | static struct bus_type ccwgroup_bus_type; |
47 | 34 | ||
48 | static void __ccwgroup_remove_symlinks(struct ccwgroup_device *gdev) | 35 | static void __ccwgroup_remove_symlinks(struct ccwgroup_device *gdev) |
@@ -292,7 +279,6 @@ static int __get_next_id(const char **buf, struct ccw_dev_id *id) | |||
292 | /** | 279 | /** |
293 | * ccwgroup_create_dev() - create and register a ccw group device | 280 | * ccwgroup_create_dev() - create and register a ccw group device |
294 | * @parent: parent device for the new device | 281 | * @parent: parent device for the new device |
295 | * @creator_id: identifier of creating driver | ||
296 | * @gdrv: driver for the new group device | 282 | * @gdrv: driver for the new group device |
297 | * @num_devices: number of slave devices | 283 | * @num_devices: number of slave devices |
298 | * @buf: buffer containing comma separated bus ids of slave devices | 284 | * @buf: buffer containing comma separated bus ids of slave devices |
@@ -304,9 +290,8 @@ static int __get_next_id(const char **buf, struct ccw_dev_id *id) | |||
304 | * Context: | 290 | * Context: |
305 | * non-atomic | 291 | * non-atomic |
306 | */ | 292 | */ |
307 | int ccwgroup_create_dev(struct device *parent, unsigned int creator_id, | 293 | int ccwgroup_create_dev(struct device *parent, struct ccwgroup_driver *gdrv, |
308 | struct ccwgroup_driver *gdrv, int num_devices, | 294 | int num_devices, const char *buf) |
309 | const char *buf) | ||
310 | { | 295 | { |
311 | struct ccwgroup_device *gdev; | 296 | struct ccwgroup_device *gdev; |
312 | struct ccw_dev_id dev_id; | 297 | struct ccw_dev_id dev_id; |
@@ -320,10 +305,6 @@ int ccwgroup_create_dev(struct device *parent, unsigned int creator_id, | |||
320 | atomic_set(&gdev->onoff, 0); | 305 | atomic_set(&gdev->onoff, 0); |
321 | mutex_init(&gdev->reg_mutex); | 306 | mutex_init(&gdev->reg_mutex); |
322 | mutex_lock(&gdev->reg_mutex); | 307 | mutex_lock(&gdev->reg_mutex); |
323 | if (gdrv) | ||
324 | gdev->creator_id = gdrv->driver_id; | ||
325 | else | ||
326 | gdev->creator_id = creator_id; | ||
327 | gdev->count = num_devices; | 308 | gdev->count = num_devices; |
328 | gdev->dev.bus = &ccwgroup_bus_type; | 309 | gdev->dev.bus = &ccwgroup_bus_type; |
329 | gdev->dev.parent = parent; | 310 | gdev->dev.parent = parent; |
@@ -402,30 +383,6 @@ error: | |||
402 | } | 383 | } |
403 | EXPORT_SYMBOL(ccwgroup_create_dev); | 384 | EXPORT_SYMBOL(ccwgroup_create_dev); |
404 | 385 | ||
405 | /** | ||
406 | * ccwgroup_create_from_string() - create and register a ccw group device | ||
407 | * @root: parent device for the new device | ||
408 | * @creator_id: identifier of creating driver | ||
409 | * @cdrv: ccw driver of slave devices | ||
410 | * @num_devices: number of slave devices | ||
411 | * @buf: buffer containing comma separated bus ids of slave devices | ||
412 | * | ||
413 | * Create and register a new ccw group device as a child of @root. Slave | ||
414 | * devices are obtained from the list of bus ids given in @buf and must all | ||
415 | * belong to @cdrv. | ||
416 | * Returns: | ||
417 | * %0 on success and an error code on failure. | ||
418 | * Context: | ||
419 | * non-atomic | ||
420 | */ | ||
421 | int ccwgroup_create_from_string(struct device *root, unsigned int creator_id, | ||
422 | struct ccw_driver *cdrv, int num_devices, | ||
423 | const char *buf) | ||
424 | { | ||
425 | return ccwgroup_create_dev(root, creator_id, NULL, num_devices, buf); | ||
426 | } | ||
427 | EXPORT_SYMBOL(ccwgroup_create_from_string); | ||
428 | |||
429 | static int ccwgroup_notifier(struct notifier_block *nb, unsigned long action, | 386 | static int ccwgroup_notifier(struct notifier_block *nb, unsigned long action, |
430 | void *data) | 387 | void *data) |
431 | { | 388 | { |
@@ -467,14 +424,6 @@ module_exit(cleanup_ccwgroup); | |||
467 | 424 | ||
468 | /************************** driver stuff ******************************/ | 425 | /************************** driver stuff ******************************/ |
469 | 426 | ||
470 | static int ccwgroup_probe(struct device *dev) | ||
471 | { | ||
472 | struct ccwgroup_device *gdev = to_ccwgroupdev(dev); | ||
473 | struct ccwgroup_driver *gdrv = to_ccwgroupdrv(dev->driver); | ||
474 | |||
475 | return gdrv->probe ? gdrv->probe(gdev) : -ENODEV; | ||
476 | } | ||
477 | |||
478 | static int ccwgroup_remove(struct device *dev) | 427 | static int ccwgroup_remove(struct device *dev) |
479 | { | 428 | { |
480 | struct ccwgroup_device *gdev = to_ccwgroupdev(dev); | 429 | struct ccwgroup_device *gdev = to_ccwgroupdev(dev); |
@@ -569,8 +518,6 @@ static const struct dev_pm_ops ccwgroup_pm_ops = { | |||
569 | 518 | ||
570 | static struct bus_type ccwgroup_bus_type = { | 519 | static struct bus_type ccwgroup_bus_type = { |
571 | .name = "ccwgroup", | 520 | .name = "ccwgroup", |
572 | .match = ccwgroup_bus_match, | ||
573 | .probe = ccwgroup_probe, | ||
574 | .remove = ccwgroup_remove, | 521 | .remove = ccwgroup_remove, |
575 | .shutdown = ccwgroup_shutdown, | 522 | .shutdown = ccwgroup_shutdown, |
576 | .pm = &ccwgroup_pm_ops, | 523 | .pm = &ccwgroup_pm_ops, |