From f2962dae0efd81fed06d0687f300725ab063587a Mon Sep 17 00:00:00 2001 From: Sebastian Ott Date: Tue, 15 May 2012 17:49:12 +0200 Subject: 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 Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky --- arch/s390/include/asm/ccwgroup.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'arch/s390') 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 { * struct ccwgroup_driver - driver for ccw group devices * @max_slaves: maximum number of slave devices * @driver_id: unique id + * @setup: function called during device creation to setup the device * @probe: function called on probe * @remove: function called on remove * @set_online: function called when device is set online @@ -47,6 +48,7 @@ struct ccwgroup_driver { int max_slaves; unsigned long driver_id; + int (*setup) (struct ccwgroup_device *); int (*probe) (struct ccwgroup_device *); void (*remove) (struct ccwgroup_device *); int (*set_online) (struct ccwgroup_device *); @@ -63,6 +65,9 @@ struct ccwgroup_driver { extern int ccwgroup_driver_register (struct ccwgroup_driver *cdriver); extern void ccwgroup_driver_unregister (struct ccwgroup_driver *cdriver); +int ccwgroup_create_dev(struct device *root, unsigned int creator_id, + struct ccw_driver *cdrv, struct ccwgroup_driver *gdrv, + int num_devices, const char *buf); int ccwgroup_create_from_string(struct device *root, unsigned int creator_id, struct ccw_driver *cdrv, int num_devices, const char *buf); -- cgit v1.2.3