diff options
Diffstat (limited to 'drivers/s390/cio')
-rw-r--r-- | drivers/s390/cio/css.c | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c index 555119cacc27..7e4d57b4266f 100644 --- a/drivers/s390/cio/css.c +++ b/drivers/s390/cio/css.c | |||
@@ -481,45 +481,6 @@ struct bus_type css_bus_type = { | |||
481 | 481 | ||
482 | subsys_initcall(init_channel_subsystem); | 482 | subsys_initcall(init_channel_subsystem); |
483 | 483 | ||
484 | /* | ||
485 | * Register root devices for some drivers. The release function must not be | ||
486 | * in the device drivers, so we do it here. | ||
487 | */ | ||
488 | static void | ||
489 | s390_root_dev_release(struct device *dev) | ||
490 | { | ||
491 | kfree(dev); | ||
492 | } | ||
493 | |||
494 | struct device * | ||
495 | s390_root_dev_register(const char *name) | ||
496 | { | ||
497 | struct device *dev; | ||
498 | int ret; | ||
499 | |||
500 | if (!strlen(name)) | ||
501 | return ERR_PTR(-EINVAL); | ||
502 | dev = kmalloc(sizeof(struct device), GFP_KERNEL); | ||
503 | if (!dev) | ||
504 | return ERR_PTR(-ENOMEM); | ||
505 | memset(dev, 0, sizeof(struct device)); | ||
506 | strncpy(dev->bus_id, name, min(strlen(name), (size_t)BUS_ID_SIZE)); | ||
507 | dev->release = s390_root_dev_release; | ||
508 | ret = device_register(dev); | ||
509 | if (ret) { | ||
510 | kfree(dev); | ||
511 | return ERR_PTR(ret); | ||
512 | } | ||
513 | return dev; | ||
514 | } | ||
515 | |||
516 | void | ||
517 | s390_root_dev_unregister(struct device *dev) | ||
518 | { | ||
519 | if (dev) | ||
520 | device_unregister(dev); | ||
521 | } | ||
522 | |||
523 | int | 484 | int |
524 | css_enqueue_subchannel_slow(unsigned long schid) | 485 | css_enqueue_subchannel_slow(unsigned long schid) |
525 | { | 486 | { |
@@ -564,6 +525,4 @@ css_slow_subchannels_exist(void) | |||
564 | 525 | ||
565 | MODULE_LICENSE("GPL"); | 526 | MODULE_LICENSE("GPL"); |
566 | EXPORT_SYMBOL(css_bus_type); | 527 | EXPORT_SYMBOL(css_bus_type); |
567 | EXPORT_SYMBOL(s390_root_dev_register); | ||
568 | EXPORT_SYMBOL(s390_root_dev_unregister); | ||
569 | EXPORT_SYMBOL_GPL(css_characteristics_avail); | 528 | EXPORT_SYMBOL_GPL(css_characteristics_avail); |