diff options
author | Sebastian Ott <sebott@linux.vnet.ibm.com> | 2012-05-15 11:49:12 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2012-05-16 08:42:46 -0400 |
commit | f2962dae0efd81fed06d0687f300725ab063587a (patch) | |
tree | 35ffb7fcbc9466e80e29da10e52ca82ab06dd3df /arch/s390/include | |
parent | eda0c6d6b04d3cf72f5e8d656e39bffe3568e6db (diff) |
s390/ccwgroup: introduce ccwgroup_create_dev
Add a new interface for drivers to create a group device. Via the old
interface ccwgroup_create_from_string we would create a virtual device
in a way that only the caller of this function would match and bind to.
Via the new ccwgroup_create_dev we stop playing games with the driver
core and directly set the driver of the new group device. For drivers
which have todo additional setup steps (like setting driver_data)
provide a new setup driver callback.
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 'arch/s390/include')
-rw-r--r-- | arch/s390/include/asm/ccwgroup.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/s390/include/asm/ccwgroup.h b/arch/s390/include/asm/ccwgroup.h index f2ea2c56a7e1..f5cfb7925867 100644 --- a/arch/s390/include/asm/ccwgroup.h +++ b/arch/s390/include/asm/ccwgroup.h | |||
@@ -31,6 +31,7 @@ struct ccwgroup_device { | |||
31 | * struct ccwgroup_driver - driver for ccw group devices | 31 | * struct ccwgroup_driver - driver for ccw group devices |
32 | * @max_slaves: maximum number of slave devices | 32 | * @max_slaves: maximum number of slave devices |
33 | * @driver_id: unique id | 33 | * @driver_id: unique id |
34 | * @setup: function called during device creation to setup the device | ||
34 | * @probe: function called on probe | 35 | * @probe: function called on probe |
35 | * @remove: function called on remove | 36 | * @remove: function called on remove |
36 | * @set_online: function called when device is set online | 37 | * @set_online: function called when device is set online |
@@ -47,6 +48,7 @@ struct ccwgroup_driver { | |||
47 | int max_slaves; | 48 | int max_slaves; |
48 | unsigned long driver_id; | 49 | unsigned long driver_id; |
49 | 50 | ||
51 | int (*setup) (struct ccwgroup_device *); | ||
50 | int (*probe) (struct ccwgroup_device *); | 52 | int (*probe) (struct ccwgroup_device *); |
51 | void (*remove) (struct ccwgroup_device *); | 53 | void (*remove) (struct ccwgroup_device *); |
52 | int (*set_online) (struct ccwgroup_device *); | 54 | int (*set_online) (struct ccwgroup_device *); |
@@ -63,6 +65,9 @@ struct ccwgroup_driver { | |||
63 | 65 | ||
64 | extern int ccwgroup_driver_register (struct ccwgroup_driver *cdriver); | 66 | extern int ccwgroup_driver_register (struct ccwgroup_driver *cdriver); |
65 | extern void ccwgroup_driver_unregister (struct ccwgroup_driver *cdriver); | 67 | extern void ccwgroup_driver_unregister (struct ccwgroup_driver *cdriver); |
68 | int ccwgroup_create_dev(struct device *root, unsigned int creator_id, | ||
69 | struct ccw_driver *cdrv, struct ccwgroup_driver *gdrv, | ||
70 | int num_devices, const char *buf); | ||
66 | int ccwgroup_create_from_string(struct device *root, unsigned int creator_id, | 71 | int ccwgroup_create_from_string(struct device *root, unsigned int creator_id, |
67 | struct ccw_driver *cdrv, int num_devices, | 72 | struct ccw_driver *cdrv, int num_devices, |
68 | const char *buf); | 73 | const char *buf); |