2 * drivers/s390/s390_rdev.c
6 * Copyright (C) 2002, 2005 IBM Deutschland Entwicklung GmbH,
8 * Author(s): Cornelia Huck (cohuck@de.ibm.com)
9 * Carsten Otte (cotte@de.ibm.com)
12 #include <linux/slab.h>
13 #include <linux/err.h>
14 #include <linux/device.h>
15 #include <asm/s390_rdev.h>
18 s390_root_dev_release(struct device *dev)
24 s390_root_dev_register(const char *name)
30 return ERR_PTR(-EINVAL);
31 dev = kmalloc(sizeof(struct device), GFP_KERNEL);
33 return ERR_PTR(-ENOMEM);
34 memset(dev, 0, sizeof(struct device));
35 strncpy(dev->bus_id, name, min(strlen(name), (size_t)BUS_ID_SIZE));
36 dev->release = s390_root_dev_release;
37 ret = device_register(dev);
46 s390_root_dev_unregister(struct device *dev)
49 device_unregister(dev);
52 EXPORT_SYMBOL(s390_root_dev_register);
53 EXPORT_SYMBOL(s390_root_dev_unregister);