blob: 85b2e51a42ae7ffb806f2266ca04b79c4e556591 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * drivers/s390/cio/ccwgroup.c
3 * bus driver for ccwgroup
Linus Torvalds1da177e2005-04-16 15:20:36 -07004 *
5 * Copyright (C) 2002 IBM Deutschland Entwicklung GmbH,
6 * IBM Corporation
7 * Author(s): Arnd Bergmann (arndb@de.ibm.com)
Cornelia Huck4ce3b302006-01-14 13:21:04 -08008 * Cornelia Huck (cornelia.huck@de.ibm.com)
Linus Torvalds1da177e2005-04-16 15:20:36 -07009 */
10#include <linux/module.h>
11#include <linux/errno.h>
12#include <linux/slab.h>
13#include <linux/list.h>
14#include <linux/device.h>
15#include <linux/init.h>
16#include <linux/ctype.h>
17#include <linux/dcache.h>
18
Linus Torvalds1da177e2005-04-16 15:20:36 -070019#include <asm/ccwdev.h>
20#include <asm/ccwgroup.h>
21
22/* In Linux 2.4, we had a channel device layer called "chandev"
23 * that did all sorts of obscure stuff for networking devices.
24 * This is another driver that serves as a replacement for just
25 * one of its functions, namely the translation of single subchannels
26 * to devices that use multiple subchannels.
27 */
28
29/* a device matches a driver if all its slave devices match the same
30 * entry of the driver */
31static int
32ccwgroup_bus_match (struct device * dev, struct device_driver * drv)
33{
34 struct ccwgroup_device *gdev;
35 struct ccwgroup_driver *gdrv;
36
Cornelia Huck084325d2008-01-26 14:10:38 +010037 gdev = to_ccwgroupdev(dev);
38 gdrv = to_ccwgroupdrv(drv);
Linus Torvalds1da177e2005-04-16 15:20:36 -070039
40 if (gdev->creator_id == gdrv->driver_id)
41 return 1;
42
43 return 0;
44}
45static int
Kay Sievers7eff2e72007-08-14 15:15:12 +020046ccwgroup_uevent (struct device *dev, struct kobj_uevent_env *env)
Linus Torvalds1da177e2005-04-16 15:20:36 -070047{
48 /* TODO */
49 return 0;
50}
51
Russell Kingf9ccf452006-01-05 14:42:09 +000052static struct bus_type ccwgroup_bus_type;
Linus Torvalds1da177e2005-04-16 15:20:36 -070053
Heiko Carstens4d284ca2007-02-05 21:18:53 +010054static void
Linus Torvalds1da177e2005-04-16 15:20:36 -070055__ccwgroup_remove_symlinks(struct ccwgroup_device *gdev)
56{
57 int i;
58 char str[8];
59
60 for (i = 0; i < gdev->count; i++) {
61 sprintf(str, "cdev%d", i);
62 sysfs_remove_link(&gdev->dev.kobj, str);
63 sysfs_remove_link(&gdev->cdev[i]->dev.kobj, "group_device");
64 }
65
66}
67
68/*
69 * Provide an 'ungroup' attribute so the user can remove group devices no
70 * longer needed or accidentially created. Saves memory :)
71 */
Alan Sternd9a9cdf2007-03-15 15:50:34 -040072static void ccwgroup_ungroup_callback(struct device *dev)
73{
74 struct ccwgroup_device *gdev = to_ccwgroupdev(dev);
75
Cornelia Huckd76123e2007-04-27 16:01:37 +020076 mutex_lock(&gdev->reg_mutex);
Cornelia Huck1a908c72008-01-26 14:10:50 +010077 if (device_is_registered(&gdev->dev)) {
78 __ccwgroup_remove_symlinks(gdev);
79 device_unregister(dev);
80 }
Cornelia Huckd76123e2007-04-27 16:01:37 +020081 mutex_unlock(&gdev->reg_mutex);
Alan Sternd9a9cdf2007-03-15 15:50:34 -040082}
83
Linus Torvalds1da177e2005-04-16 15:20:36 -070084static ssize_t
Yani Ioannou3fd3c0a2005-05-17 06:43:27 -040085ccwgroup_ungroup_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
Linus Torvalds1da177e2005-04-16 15:20:36 -070086{
87 struct ccwgroup_device *gdev;
Alan Sternd9a9cdf2007-03-15 15:50:34 -040088 int rc;
Linus Torvalds1da177e2005-04-16 15:20:36 -070089
90 gdev = to_ccwgroupdev(dev);
91
92 if (gdev->state != CCWGROUP_OFFLINE)
93 return -EINVAL;
94
Alan Sternd9a9cdf2007-03-15 15:50:34 -040095 /* Note that we cannot unregister the device from one of its
96 * attribute methods, so we have to use this roundabout approach.
97 */
98 rc = device_schedule_callback(dev, ccwgroup_ungroup_callback);
99 if (rc)
100 count = rc;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700101 return count;
102}
103
104static DEVICE_ATTR(ungroup, 0200, NULL, ccwgroup_ungroup_store);
105
106static void
107ccwgroup_release (struct device *dev)
108{
109 struct ccwgroup_device *gdev;
110 int i;
111
112 gdev = to_ccwgroupdev(dev);
113
114 for (i = 0; i < gdev->count; i++) {
Cornelia Huckdb6a6422008-01-26 14:10:46 +0100115 dev_set_drvdata(&gdev->cdev[i]->dev, NULL);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700116 put_device(&gdev->cdev[i]->dev);
117 }
118 kfree(gdev);
119}
120
Heiko Carstens4d284ca2007-02-05 21:18:53 +0100121static int
Linus Torvalds1da177e2005-04-16 15:20:36 -0700122__ccwgroup_create_symlinks(struct ccwgroup_device *gdev)
123{
124 char str[8];
125 int i, rc;
126
127 for (i = 0; i < gdev->count; i++) {
128 rc = sysfs_create_link(&gdev->cdev[i]->dev.kobj, &gdev->dev.kobj,
129 "group_device");
130 if (rc) {
131 for (--i; i >= 0; i--)
132 sysfs_remove_link(&gdev->cdev[i]->dev.kobj,
133 "group_device");
134 return rc;
135 }
136 }
137 for (i = 0; i < gdev->count; i++) {
138 sprintf(str, "cdev%d", i);
139 rc = sysfs_create_link(&gdev->dev.kobj, &gdev->cdev[i]->dev.kobj,
140 str);
141 if (rc) {
142 for (--i; i >= 0; i--) {
143 sprintf(str, "cdev%d", i);
144 sysfs_remove_link(&gdev->dev.kobj, str);
145 }
146 for (i = 0; i < gdev->count; i++)
147 sysfs_remove_link(&gdev->cdev[i]->dev.kobj,
148 "group_device");
149 return rc;
150 }
151 }
152 return 0;
153}
154
Cornelia Huckb2ffd8e2007-10-12 16:11:17 +0200155/**
156 * ccwgroup_create() - create and register a ccw group device
157 * @root: parent device for the new device
158 * @creator_id: identifier of creating driver
159 * @cdrv: ccw driver of slave devices
160 * @argc: number of slave devices
161 * @argv: bus ids of slave devices
162 *
163 * Create and register a new ccw group device as a child of @root. Slave
164 * devices are obtained from the list of bus ids given in @argv[] and must all
165 * belong to @cdrv.
166 * Returns:
167 * %0 on success and an error code on failure.
168 * Context:
169 * non-atomic
Linus Torvalds1da177e2005-04-16 15:20:36 -0700170 */
Cornelia Huckb2ffd8e2007-10-12 16:11:17 +0200171int ccwgroup_create(struct device *root, unsigned int creator_id,
172 struct ccw_driver *cdrv, int argc, char *argv[])
Linus Torvalds1da177e2005-04-16 15:20:36 -0700173{
174 struct ccwgroup_device *gdev;
175 int i;
176 int rc;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700177
178 if (argc > 256) /* disallow dumb users */
179 return -EINVAL;
180
Eric Sesterhenn88abaab2006-03-24 03:15:31 -0800181 gdev = kzalloc(sizeof(*gdev) + argc*sizeof(gdev->cdev[0]), GFP_KERNEL);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700182 if (!gdev)
183 return -ENOMEM;
184
Linus Torvalds1da177e2005-04-16 15:20:36 -0700185 atomic_set(&gdev->onoff, 0);
Cornelia Huckd76123e2007-04-27 16:01:37 +0200186 mutex_init(&gdev->reg_mutex);
187 mutex_lock(&gdev->reg_mutex);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700188 for (i = 0; i < argc; i++) {
189 gdev->cdev[i] = get_ccwdev_by_busid(cdrv, argv[i]);
190
191 /* all devices have to be of the same type in
192 * order to be grouped */
193 if (!gdev->cdev[i]
194 || gdev->cdev[i]->id.driver_info !=
195 gdev->cdev[0]->id.driver_info) {
196 rc = -EINVAL;
Cornelia Huckd76123e2007-04-27 16:01:37 +0200197 goto error;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700198 }
199 /* Don't allow a device to belong to more than one group. */
Cornelia Huckdb6a6422008-01-26 14:10:46 +0100200 if (dev_get_drvdata(&gdev->cdev[i]->dev)) {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700201 rc = -EINVAL;
Cornelia Huckd76123e2007-04-27 16:01:37 +0200202 goto error;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700203 }
Cornelia Huckdb6a6422008-01-26 14:10:46 +0100204 dev_set_drvdata(&gdev->cdev[i]->dev, gdev);
Cornelia Huck17088222006-07-27 14:00:33 +0200205 }
Linus Torvalds1da177e2005-04-16 15:20:36 -0700206
207 gdev->creator_id = creator_id;
208 gdev->count = argc;
Heiko Carstens292888c2006-08-30 14:33:35 +0200209 gdev->dev.bus = &ccwgroup_bus_type;
210 gdev->dev.parent = root;
211 gdev->dev.release = ccwgroup_release;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700212
213 snprintf (gdev->dev.bus_id, BUS_ID_SIZE, "%s",
214 gdev->cdev[0]->dev.bus_id);
215
216 rc = device_register(&gdev->dev);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700217 if (rc)
Cornelia Huckd76123e2007-04-27 16:01:37 +0200218 goto error;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700219 get_device(&gdev->dev);
220 rc = device_create_file(&gdev->dev, &dev_attr_ungroup);
221
222 if (rc) {
223 device_unregister(&gdev->dev);
224 goto error;
225 }
226
227 rc = __ccwgroup_create_symlinks(gdev);
228 if (!rc) {
Cornelia Huckd76123e2007-04-27 16:01:37 +0200229 mutex_unlock(&gdev->reg_mutex);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700230 put_device(&gdev->dev);
231 return 0;
232 }
233 device_remove_file(&gdev->dev, &dev_attr_ungroup);
234 device_unregister(&gdev->dev);
235error:
236 for (i = 0; i < argc; i++)
237 if (gdev->cdev[i]) {
Cornelia Huckdb6a6422008-01-26 14:10:46 +0100238 if (dev_get_drvdata(&gdev->cdev[i]->dev) == gdev)
239 dev_set_drvdata(&gdev->cdev[i]->dev, NULL);
Cornelia Huck17088222006-07-27 14:00:33 +0200240 put_device(&gdev->cdev[i]->dev);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700241 }
Cornelia Huckd76123e2007-04-27 16:01:37 +0200242 mutex_unlock(&gdev->reg_mutex);
243 put_device(&gdev->dev);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700244 return rc;
245}
246
247static int __init
248init_ccwgroup (void)
249{
250 return bus_register (&ccwgroup_bus_type);
251}
252
253static void __exit
254cleanup_ccwgroup (void)
255{
256 bus_unregister (&ccwgroup_bus_type);
257}
258
259module_init(init_ccwgroup);
260module_exit(cleanup_ccwgroup);
261
262/************************** driver stuff ******************************/
263
264static int
265ccwgroup_set_online(struct ccwgroup_device *gdev)
266{
267 struct ccwgroup_driver *gdrv;
268 int ret;
269
Martin Schwidefsky973bd992006-01-06 00:19:07 -0800270 if (atomic_cmpxchg(&gdev->onoff, 0, 1) != 0)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700271 return -EAGAIN;
272 if (gdev->state == CCWGROUP_ONLINE) {
273 ret = 0;
274 goto out;
275 }
276 if (!gdev->dev.driver) {
277 ret = -EINVAL;
278 goto out;
279 }
280 gdrv = to_ccwgroupdrv (gdev->dev.driver);
Cornelia Hucka0016402005-11-07 00:59:05 -0800281 if ((ret = gdrv->set_online ? gdrv->set_online(gdev) : 0))
Linus Torvalds1da177e2005-04-16 15:20:36 -0700282 goto out;
283
284 gdev->state = CCWGROUP_ONLINE;
285 out:
286 atomic_set(&gdev->onoff, 0);
287 return ret;
288}
289
290static int
291ccwgroup_set_offline(struct ccwgroup_device *gdev)
292{
293 struct ccwgroup_driver *gdrv;
294 int ret;
295
Martin Schwidefsky973bd992006-01-06 00:19:07 -0800296 if (atomic_cmpxchg(&gdev->onoff, 0, 1) != 0)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700297 return -EAGAIN;
298 if (gdev->state == CCWGROUP_OFFLINE) {
299 ret = 0;
300 goto out;
301 }
302 if (!gdev->dev.driver) {
303 ret = -EINVAL;
304 goto out;
305 }
306 gdrv = to_ccwgroupdrv (gdev->dev.driver);
Cornelia Hucka0016402005-11-07 00:59:05 -0800307 if ((ret = gdrv->set_offline ? gdrv->set_offline(gdev) : 0))
Linus Torvalds1da177e2005-04-16 15:20:36 -0700308 goto out;
309
310 gdev->state = CCWGROUP_OFFLINE;
311 out:
312 atomic_set(&gdev->onoff, 0);
313 return ret;
314}
315
316static ssize_t
Yani Ioannou3fd3c0a2005-05-17 06:43:27 -0400317ccwgroup_online_store (struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700318{
319 struct ccwgroup_device *gdev;
320 struct ccwgroup_driver *gdrv;
Cornelia Huck2f972202008-04-30 13:38:33 +0200321 unsigned long value;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700322 int ret;
323
324 gdev = to_ccwgroupdev(dev);
325 if (!dev->driver)
326 return count;
327
328 gdrv = to_ccwgroupdrv (gdev->dev.driver);
329 if (!try_module_get(gdrv->owner))
330 return -EINVAL;
331
Cornelia Huck2f972202008-04-30 13:38:33 +0200332 ret = strict_strtoul(buf, 0, &value);
333 if (ret)
334 goto out;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700335 ret = count;
336 if (value == 1)
337 ccwgroup_set_online(gdev);
338 else if (value == 0)
339 ccwgroup_set_offline(gdev);
340 else
341 ret = -EINVAL;
Cornelia Huck2f972202008-04-30 13:38:33 +0200342out:
Linus Torvalds1da177e2005-04-16 15:20:36 -0700343 module_put(gdrv->owner);
344 return ret;
345}
346
347static ssize_t
Yani Ioannou3fd3c0a2005-05-17 06:43:27 -0400348ccwgroup_online_show (struct device *dev, struct device_attribute *attr, char *buf)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700349{
350 int online;
351
352 online = (to_ccwgroupdev(dev)->state == CCWGROUP_ONLINE);
353
354 return sprintf(buf, online ? "1\n" : "0\n");
355}
356
357static DEVICE_ATTR(online, 0644, ccwgroup_online_show, ccwgroup_online_store);
358
359static int
360ccwgroup_probe (struct device *dev)
361{
362 struct ccwgroup_device *gdev;
363 struct ccwgroup_driver *gdrv;
364
365 int ret;
366
367 gdev = to_ccwgroupdev(dev);
368 gdrv = to_ccwgroupdrv(dev->driver);
369
370 if ((ret = device_create_file(dev, &dev_attr_online)))
371 return ret;
372
Linus Torvalds1da177e2005-04-16 15:20:36 -0700373 ret = gdrv->probe ? gdrv->probe(gdev) : -ENODEV;
374 if (ret)
375 device_remove_file(dev, &dev_attr_online);
376
377 return ret;
378}
379
380static int
381ccwgroup_remove (struct device *dev)
382{
383 struct ccwgroup_device *gdev;
384 struct ccwgroup_driver *gdrv;
385
386 gdev = to_ccwgroupdev(dev);
387 gdrv = to_ccwgroupdrv(dev->driver);
388
Linus Torvalds1da177e2005-04-16 15:20:36 -0700389 device_remove_file(dev, &dev_attr_online);
390
391 if (gdrv && gdrv->remove)
392 gdrv->remove(gdev);
393 return 0;
394}
395
Cornelia Huck01bc8ad2008-02-05 16:50:36 +0100396static void ccwgroup_shutdown(struct device *dev)
397{
398 struct ccwgroup_device *gdev;
399 struct ccwgroup_driver *gdrv;
400
401 gdev = to_ccwgroupdev(dev);
402 gdrv = to_ccwgroupdrv(dev->driver);
403 if (gdrv && gdrv->shutdown)
404 gdrv->shutdown(gdev);
405}
406
Russell Kingf9ccf452006-01-05 14:42:09 +0000407static struct bus_type ccwgroup_bus_type = {
408 .name = "ccwgroup",
409 .match = ccwgroup_bus_match,
410 .uevent = ccwgroup_uevent,
411 .probe = ccwgroup_probe,
412 .remove = ccwgroup_remove,
Cornelia Huck01bc8ad2008-02-05 16:50:36 +0100413 .shutdown = ccwgroup_shutdown,
Russell Kingf9ccf452006-01-05 14:42:09 +0000414};
415
Cornelia Huckb2ffd8e2007-10-12 16:11:17 +0200416/**
417 * ccwgroup_driver_register() - register a ccw group driver
418 * @cdriver: driver to be registered
419 *
420 * This function is mainly a wrapper around driver_register().
421 */
422int ccwgroup_driver_register(struct ccwgroup_driver *cdriver)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700423{
424 /* register our new driver with the core */
Heiko Carstens292888c2006-08-30 14:33:35 +0200425 cdriver->driver.bus = &ccwgroup_bus_type;
426 cdriver->driver.name = cdriver->name;
Cornelia Huck4beee642008-01-26 14:10:47 +0100427 cdriver->driver.owner = cdriver->owner;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700428
429 return driver_register(&cdriver->driver);
430}
431
Cornelia Huckb0744bd2005-06-25 14:55:27 -0700432static int
Cornelia Huck887ab592006-06-29 14:56:52 +0200433__ccwgroup_match_all(struct device *dev, void *data)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700434{
Cornelia Huck887ab592006-06-29 14:56:52 +0200435 return 1;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700436}
437
Cornelia Huckb2ffd8e2007-10-12 16:11:17 +0200438/**
439 * ccwgroup_driver_unregister() - deregister a ccw group driver
440 * @cdriver: driver to be deregistered
441 *
442 * This function is mainly a wrapper around driver_unregister().
443 */
444void ccwgroup_driver_unregister(struct ccwgroup_driver *cdriver)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700445{
Cornelia Huck887ab592006-06-29 14:56:52 +0200446 struct device *dev;
447
Linus Torvalds1da177e2005-04-16 15:20:36 -0700448 /* We don't want ccwgroup devices to live longer than their driver. */
449 get_driver(&cdriver->driver);
Cornelia Huck887ab592006-06-29 14:56:52 +0200450 while ((dev = driver_find_device(&cdriver->driver, NULL, NULL,
451 __ccwgroup_match_all))) {
Cornelia Huckd76123e2007-04-27 16:01:37 +0200452 struct ccwgroup_device *gdev = to_ccwgroupdev(dev);
453
454 mutex_lock(&gdev->reg_mutex);
455 __ccwgroup_remove_symlinks(gdev);
Cornelia Huck887ab592006-06-29 14:56:52 +0200456 device_unregister(dev);
Cornelia Huckd76123e2007-04-27 16:01:37 +0200457 mutex_unlock(&gdev->reg_mutex);
Cornelia Huck887ab592006-06-29 14:56:52 +0200458 put_device(dev);
459 }
Linus Torvalds1da177e2005-04-16 15:20:36 -0700460 put_driver(&cdriver->driver);
461 driver_unregister(&cdriver->driver);
462}
463
Cornelia Huckb2ffd8e2007-10-12 16:11:17 +0200464/**
465 * ccwgroup_probe_ccwdev() - probe function for slave devices
466 * @cdev: ccw device to be probed
467 *
468 * This is a dummy probe function for ccw devices that are slave devices in
469 * a ccw group device.
470 * Returns:
471 * always %0
472 */
473int ccwgroup_probe_ccwdev(struct ccw_device *cdev)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700474{
475 return 0;
476}
477
Heiko Carstens4d284ca2007-02-05 21:18:53 +0100478static struct ccwgroup_device *
Linus Torvalds1da177e2005-04-16 15:20:36 -0700479__ccwgroup_get_gdev_by_cdev(struct ccw_device *cdev)
480{
481 struct ccwgroup_device *gdev;
482
Cornelia Huckdb6a6422008-01-26 14:10:46 +0100483 gdev = dev_get_drvdata(&cdev->dev);
484 if (gdev) {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700485 if (get_device(&gdev->dev)) {
Cornelia Huckd76123e2007-04-27 16:01:37 +0200486 mutex_lock(&gdev->reg_mutex);
Daniel Ritzd305ef52005-09-22 00:47:24 -0700487 if (device_is_registered(&gdev->dev))
Linus Torvalds1da177e2005-04-16 15:20:36 -0700488 return gdev;
Cornelia Huckd76123e2007-04-27 16:01:37 +0200489 mutex_unlock(&gdev->reg_mutex);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700490 put_device(&gdev->dev);
491 }
492 return NULL;
493 }
494 return NULL;
495}
496
Cornelia Huckb2ffd8e2007-10-12 16:11:17 +0200497/**
498 * ccwgroup_remove_ccwdev() - remove function for slave devices
499 * @cdev: ccw device to be removed
500 *
501 * This is a remove function for ccw devices that are slave devices in a ccw
502 * group device. It sets the ccw device offline and also deregisters the
503 * embedding ccw group device.
504 */
505void ccwgroup_remove_ccwdev(struct ccw_device *cdev)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700506{
507 struct ccwgroup_device *gdev;
508
509 /* Ignore offlining errors, device is gone anyway. */
510 ccw_device_set_offline(cdev);
511 /* If one of its devices is gone, the whole group is done for. */
512 gdev = __ccwgroup_get_gdev_by_cdev(cdev);
513 if (gdev) {
514 __ccwgroup_remove_symlinks(gdev);
515 device_unregister(&gdev->dev);
Cornelia Huckd76123e2007-04-27 16:01:37 +0200516 mutex_unlock(&gdev->reg_mutex);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700517 put_device(&gdev->dev);
518 }
519}
520
521MODULE_LICENSE("GPL");
522EXPORT_SYMBOL(ccwgroup_driver_register);
523EXPORT_SYMBOL(ccwgroup_driver_unregister);
524EXPORT_SYMBOL(ccwgroup_create);
525EXPORT_SYMBOL(ccwgroup_probe_ccwdev);
526EXPORT_SYMBOL(ccwgroup_remove_ccwdev);