2 * drivers/s390/cio/device.c
3 * bus driver for ccw devices
6 * Copyright (C) 2002 IBM Deutschland Entwicklung GmbH,
8 * Author(s): Arnd Bergmann (arndb@de.ibm.com)
9 * Cornelia Huck (cohuck@de.ibm.com)
10 * Martin Schwidefsky (schwidefsky@de.ibm.com)
12 #include <linux/config.h>
13 #include <linux/module.h>
14 #include <linux/init.h>
15 #include <linux/spinlock.h>
16 #include <linux/errno.h>
17 #include <linux/err.h>
18 #include <linux/slab.h>
19 #include <linux/list.h>
20 #include <linux/device.h>
21 #include <linux/workqueue.h>
23 #include <asm/ccwdev.h>
30 /******************* bus type handling ***********************/
32 /* The Linux driver model distinguishes between a bus type and
33 * the bus itself. Of course we only have one channel
34 * subsystem driver and one channel system per machine, but
35 * we still use the abstraction. T.R. says it's a good idea. */
37 ccw_bus_match (struct device * dev, struct device_driver * drv)
39 struct ccw_device *cdev = to_ccwdev(dev);
40 struct ccw_driver *cdrv = to_ccwdrv(drv);
41 const struct ccw_device_id *ids = cdrv->ids, *found;
46 found = ccw_device_id_match(ids, &cdev->id);
50 cdev->id.driver_info = found->driver_info;
56 * Hotplugging interface for ccw devices.
57 * Heavily modeled on pci and usb hotplug.
60 ccw_hotplug (struct device *dev, char **envp, int num_envp,
61 char *buffer, int buffer_size)
63 struct ccw_device *cdev = to_ccwdev(dev);
70 if (cdev->private->state == DEV_STATE_NOT_OPER)
73 /* what we want to pass to /sbin/hotplug */
76 length += scnprintf(buffer, buffer_size - length, "CU_TYPE=%04X",
78 if ((buffer_size - length <= 0) || (i >= num_envp))
84 length += scnprintf(buffer, buffer_size - length, "CU_MODEL=%02X",
86 if ((buffer_size - length <= 0) || (i >= num_envp))
91 /* The next two can be zero, that's ok for us */
93 length += scnprintf(buffer, buffer_size - length, "DEV_TYPE=%04X",
95 if ((buffer_size - length <= 0) || (i >= num_envp))
101 length += scnprintf(buffer, buffer_size - length, "DEV_MODEL=%02X",
103 if ((buffer_size - length <= 0) || (i >= num_envp))
111 struct bus_type ccw_bus_type = {
113 .match = &ccw_bus_match,
114 .hotplug = &ccw_hotplug,
117 static int io_subchannel_probe (struct device *);
118 static int io_subchannel_remove (struct device *);
119 void io_subchannel_irq (struct device *);
120 static int io_subchannel_notify(struct device *, int);
121 static void io_subchannel_verify(struct device *);
122 static void io_subchannel_ioterm(struct device *);
123 static void io_subchannel_shutdown(struct device *);
125 struct css_driver io_subchannel_driver = {
126 .subchannel_type = SUBCHANNEL_TYPE_IO,
128 .name = "io_subchannel",
129 .bus = &css_bus_type,
130 .probe = &io_subchannel_probe,
131 .remove = &io_subchannel_remove,
132 .shutdown = &io_subchannel_shutdown,
134 .irq = io_subchannel_irq,
135 .notify = io_subchannel_notify,
136 .verify = io_subchannel_verify,
137 .termination = io_subchannel_ioterm,
140 struct workqueue_struct *ccw_device_work;
141 struct workqueue_struct *ccw_device_notify_work;
142 static wait_queue_head_t ccw_device_init_wq;
143 static atomic_t ccw_device_init_count;
146 init_ccw_bus_type (void)
150 init_waitqueue_head(&ccw_device_init_wq);
151 atomic_set(&ccw_device_init_count, 0);
153 ccw_device_work = create_singlethread_workqueue("cio");
154 if (!ccw_device_work)
155 return -ENOMEM; /* FIXME: better errno ? */
156 ccw_device_notify_work = create_singlethread_workqueue("cio_notify");
157 if (!ccw_device_notify_work) {
158 ret = -ENOMEM; /* FIXME: better errno ? */
161 if ((ret = bus_register (&ccw_bus_type)))
164 if ((ret = driver_register(&io_subchannel_driver.drv)))
167 wait_event(ccw_device_init_wq,
168 atomic_read(&ccw_device_init_count) == 0);
169 flush_workqueue(ccw_device_work);
173 destroy_workqueue(ccw_device_work);
174 if (ccw_device_notify_work)
175 destroy_workqueue(ccw_device_notify_work);
180 cleanup_ccw_bus_type (void)
182 driver_unregister(&io_subchannel_driver.drv);
183 bus_unregister(&ccw_bus_type);
184 destroy_workqueue(ccw_device_notify_work);
185 destroy_workqueue(ccw_device_work);
188 subsys_initcall(init_ccw_bus_type);
189 module_exit(cleanup_ccw_bus_type);
191 /************************ device handling **************************/
194 * A ccw_device has some interfaces in sysfs in addition to the
196 * The following entries are designed to export the information which
197 * resided in 2.4 in /proc/subchannels. Subchannel and device number
198 * are obvious, so they don't have an entry :)
199 * TODO: Split chpids and pimpampom up? Where is "in use" in the tree?
202 chpids_show (struct device * dev, char * buf)
204 struct subchannel *sch = to_subchannel(dev);
205 struct ssd_info *ssd = &sch->ssd_info;
209 for (chp = 0; chp < 8; chp++)
210 ret += sprintf (buf+ret, "%02x ", ssd->chpid[chp]);
212 ret += sprintf (buf+ret, "\n");
213 return min((ssize_t)PAGE_SIZE, ret);
217 pimpampom_show (struct device * dev, char * buf)
219 struct subchannel *sch = to_subchannel(dev);
220 struct pmcw *pmcw = &sch->schib.pmcw;
222 return sprintf (buf, "%02x %02x %02x\n",
223 pmcw->pim, pmcw->pam, pmcw->pom);
227 devtype_show (struct device *dev, char *buf)
229 struct ccw_device *cdev = to_ccwdev(dev);
230 struct ccw_device_id *id = &(cdev->id);
232 if (id->dev_type != 0)
233 return sprintf(buf, "%04x/%02x\n",
234 id->dev_type, id->dev_model);
236 return sprintf(buf, "n/a\n");
240 cutype_show (struct device *dev, char *buf)
242 struct ccw_device *cdev = to_ccwdev(dev);
243 struct ccw_device_id *id = &(cdev->id);
245 return sprintf(buf, "%04x/%02x\n",
246 id->cu_type, id->cu_model);
250 online_show (struct device *dev, char *buf)
252 struct ccw_device *cdev = to_ccwdev(dev);
254 return sprintf(buf, cdev->online ? "1\n" : "0\n");
258 ccw_device_remove_disconnected(struct ccw_device *cdev)
260 struct subchannel *sch;
262 * Forced offline in disconnected state means
263 * 'throw away device'.
265 sch = to_subchannel(cdev->dev.parent);
266 device_unregister(&sch->dev);
267 /* Reset intparm to zeroes. */
268 sch->schib.pmcw.intparm = 0;
270 put_device(&sch->dev);
274 ccw_device_set_offline(struct ccw_device *cdev)
280 if (!cdev->online || !cdev->drv)
283 if (cdev->drv->set_offline) {
284 ret = cdev->drv->set_offline(cdev);
289 spin_lock_irq(cdev->ccwlock);
290 ret = ccw_device_offline(cdev);
291 spin_unlock_irq(cdev->ccwlock);
293 wait_event(cdev->private->wait_q, dev_fsm_final_state(cdev));
295 pr_debug("ccw_device_offline returned %d, device %s\n",
296 ret, cdev->dev.bus_id);
303 ccw_device_set_online(struct ccw_device *cdev)
309 if (cdev->online || !cdev->drv)
312 spin_lock_irq(cdev->ccwlock);
313 ret = ccw_device_online(cdev);
314 spin_unlock_irq(cdev->ccwlock);
316 wait_event(cdev->private->wait_q, dev_fsm_final_state(cdev));
318 pr_debug("ccw_device_online returned %d, device %s\n",
319 ret, cdev->dev.bus_id);
322 if (cdev->private->state != DEV_STATE_ONLINE)
324 if (!cdev->drv->set_online || cdev->drv->set_online(cdev) == 0) {
328 spin_lock_irq(cdev->ccwlock);
329 ret = ccw_device_offline(cdev);
330 spin_unlock_irq(cdev->ccwlock);
332 wait_event(cdev->private->wait_q, dev_fsm_final_state(cdev));
334 pr_debug("ccw_device_offline returned %d, device %s\n",
335 ret, cdev->dev.bus_id);
336 return (ret = 0) ? -ENODEV : ret;
340 online_store (struct device *dev, const char *buf, size_t count)
342 struct ccw_device *cdev = to_ccwdev(dev);
346 if (atomic_compare_and_swap(0, 1, &cdev->private->onoff))
349 if (cdev->drv && !try_module_get(cdev->drv->owner)) {
350 atomic_set(&cdev->private->onoff, 0);
353 if (!strncmp(buf, "force\n", count)) {
358 i = simple_strtoul(buf, &tmp, 16);
361 /* Do device recognition, if needed. */
362 if (cdev->id.cu_type == 0) {
363 ret = ccw_device_recognition(cdev);
365 printk(KERN_WARNING"Couldn't start recognition "
366 "for device %s (ret=%d)\n",
367 cdev->dev.bus_id, ret);
370 wait_event(cdev->private->wait_q,
371 cdev->private->flags.recog_done);
373 if (cdev->drv && cdev->drv->set_online)
374 ccw_device_set_online(cdev);
376 if (cdev->private->state == DEV_STATE_DISCONNECTED)
377 ccw_device_remove_disconnected(cdev);
378 else if (cdev->drv && cdev->drv->set_offline)
379 ccw_device_set_offline(cdev);
381 if (force && cdev->private->state == DEV_STATE_BOXED) {
382 ret = ccw_device_stlck(cdev);
384 printk(KERN_WARNING"ccw_device_stlck for device %s "
385 "returned %d!\n", cdev->dev.bus_id, ret);
388 /* Do device recognition, if needed. */
389 if (cdev->id.cu_type == 0) {
390 cdev->private->state = DEV_STATE_NOT_OPER;
391 ret = ccw_device_recognition(cdev);
393 printk(KERN_WARNING"Couldn't start recognition "
394 "for device %s (ret=%d)\n",
395 cdev->dev.bus_id, ret);
398 wait_event(cdev->private->wait_q,
399 cdev->private->flags.recog_done);
401 if (cdev->drv && cdev->drv->set_online)
402 ccw_device_set_online(cdev);
406 module_put(cdev->drv->owner);
407 atomic_set(&cdev->private->onoff, 0);
412 available_show (struct device *dev, char *buf)
414 struct ccw_device *cdev = to_ccwdev(dev);
415 struct subchannel *sch;
417 switch (cdev->private->state) {
418 case DEV_STATE_BOXED:
419 return sprintf(buf, "boxed\n");
420 case DEV_STATE_DISCONNECTED:
421 case DEV_STATE_DISCONNECTED_SENSE_ID:
422 case DEV_STATE_NOT_OPER:
423 sch = to_subchannel(dev->parent);
425 return sprintf(buf, "no path\n");
427 return sprintf(buf, "no device\n");
429 /* All other states considered fine. */
430 return sprintf(buf, "good\n");
434 static DEVICE_ATTR(chpids, 0444, chpids_show, NULL);
435 static DEVICE_ATTR(pimpampom, 0444, pimpampom_show, NULL);
436 static DEVICE_ATTR(devtype, 0444, devtype_show, NULL);
437 static DEVICE_ATTR(cutype, 0444, cutype_show, NULL);
438 static DEVICE_ATTR(online, 0644, online_show, online_store);
439 extern struct device_attribute dev_attr_cmb_enable;
440 static DEVICE_ATTR(availability, 0444, available_show, NULL);
442 static struct attribute * subch_attrs[] = {
443 &dev_attr_chpids.attr,
444 &dev_attr_pimpampom.attr,
448 static struct attribute_group subch_attr_group = {
449 .attrs = subch_attrs,
453 subchannel_add_files (struct device *dev)
455 return sysfs_create_group(&dev->kobj, &subch_attr_group);
458 static struct attribute * ccwdev_attrs[] = {
459 &dev_attr_devtype.attr,
460 &dev_attr_cutype.attr,
461 &dev_attr_online.attr,
462 &dev_attr_cmb_enable.attr,
463 &dev_attr_availability.attr,
467 static struct attribute_group ccwdev_attr_group = {
468 .attrs = ccwdev_attrs,
472 device_add_files (struct device *dev)
474 return sysfs_create_group(&dev->kobj, &ccwdev_attr_group);
478 device_remove_files(struct device *dev)
480 sysfs_remove_group(&dev->kobj, &ccwdev_attr_group);
483 /* this is a simple abstraction for device_register that sets the
484 * correct bus type and adds the bus specific files */
486 ccw_device_register(struct ccw_device *cdev)
488 struct device *dev = &cdev->dev;
491 dev->bus = &ccw_bus_type;
493 if ((ret = device_add(dev)))
496 if ((ret = device_add_files(dev)))
503 ccw_device_do_unreg_rereg(void *data)
507 dev = (struct device *)data;
508 device_remove_files(dev);
510 if (device_add(dev)) {
514 if (device_add_files(dev))
515 device_unregister(dev);
519 ccw_device_release(struct device *dev)
521 struct ccw_device *cdev;
523 cdev = to_ccwdev(dev);
524 kfree(cdev->private);
529 * Register recognized device.
532 io_subchannel_register(void *data)
534 struct ccw_device *cdev;
535 struct subchannel *sch;
538 cdev = (struct ccw_device *) data;
539 sch = to_subchannel(cdev->dev.parent);
541 if (!list_empty(&sch->dev.children)) {
542 bus_rescan_devices(&ccw_bus_type);
545 /* make it known to the system */
546 ret = ccw_device_register(cdev);
548 printk (KERN_WARNING "%s: could not register %s\n",
549 __func__, cdev->dev.bus_id);
550 put_device(&cdev->dev);
551 sch->dev.driver_data = 0;
552 kfree (cdev->private);
557 ret = subchannel_add_files(cdev->dev.parent);
559 printk(KERN_WARNING "%s: could not add attributes to %s\n",
560 __func__, sch->dev.bus_id);
561 put_device(&cdev->dev);
563 cdev->private->flags.recog_done = 1;
564 put_device(&sch->dev);
565 wake_up(&cdev->private->wait_q);
569 ccw_device_call_sch_unregister(void *data)
571 struct ccw_device *cdev = data;
572 struct subchannel *sch;
574 sch = to_subchannel(cdev->dev.parent);
575 /* Check if device is registered. */
576 if (!list_empty(&sch->dev.node))
577 device_unregister(&sch->dev);
578 /* Reset intparm to zeroes. */
579 sch->schib.pmcw.intparm = 0;
581 put_device(&cdev->dev);
582 put_device(&sch->dev);
586 * subchannel recognition done. Called from the state machine.
589 io_subchannel_recog_done(struct ccw_device *cdev)
591 struct subchannel *sch;
593 if (css_init_done == 0) {
594 cdev->private->flags.recog_done = 1;
597 switch (cdev->private->state) {
598 case DEV_STATE_NOT_OPER:
599 cdev->private->flags.recog_done = 1;
600 /* Remove device found not operational. */
601 if (!get_device(&cdev->dev))
603 sch = to_subchannel(cdev->dev.parent);
604 INIT_WORK(&cdev->private->kick_work,
605 ccw_device_call_sch_unregister, (void *) cdev);
606 queue_work(ccw_device_work, &cdev->private->kick_work);
608 case DEV_STATE_BOXED:
609 /* Device did not respond in time. */
610 case DEV_STATE_OFFLINE:
612 * We can't register the device in interrupt context so
613 * we schedule a work item.
615 if (!get_device(&cdev->dev))
617 INIT_WORK(&cdev->private->kick_work,
618 io_subchannel_register, (void *) cdev);
619 queue_work(ccw_device_work, &cdev->private->kick_work);
622 if (atomic_dec_and_test(&ccw_device_init_count))
623 wake_up(&ccw_device_init_wq);
627 io_subchannel_recog(struct ccw_device *cdev, struct subchannel *sch)
631 sch->dev.driver_data = cdev;
632 sch->driver = &io_subchannel_driver;
633 cdev->ccwlock = &sch->lock;
634 *cdev->private = (struct ccw_device_private) {
635 .devno = sch->schib.pmcw.dev,
637 .state = DEV_STATE_NOT_OPER,
638 .cmb_list = LIST_HEAD_INIT(cdev->private->cmb_list),
640 init_waitqueue_head(&cdev->private->wait_q);
641 init_timer(&cdev->private->timer);
643 /* Set an initial name for the device. */
644 snprintf (cdev->dev.bus_id, BUS_ID_SIZE, "0.0.%04x",
645 sch->schib.pmcw.dev);
647 /* Increase counter of devices currently in recognition. */
648 atomic_inc(&ccw_device_init_count);
650 /* Start async. device sensing. */
651 spin_lock_irq(&sch->lock);
652 rc = ccw_device_recognition(cdev);
653 spin_unlock_irq(&sch->lock);
655 if (atomic_dec_and_test(&ccw_device_init_count))
656 wake_up(&ccw_device_init_wq);
662 io_subchannel_probe (struct device *pdev)
664 struct subchannel *sch;
665 struct ccw_device *cdev;
668 sch = to_subchannel(pdev);
669 if (sch->dev.driver_data) {
671 * This subchannel already has an associated ccw_device.
672 * Register it and exit. This happens for all early
673 * device, e.g. the console.
675 cdev = sch->dev.driver_data;
676 device_initialize(&cdev->dev);
677 ccw_device_register(cdev);
678 subchannel_add_files(&sch->dev);
680 * Check if the device is already online. If it is
681 * the reference count needs to be corrected
682 * (see ccw_device_online and css_init_done for the
685 if (cdev->private->state != DEV_STATE_NOT_OPER &&
686 cdev->private->state != DEV_STATE_OFFLINE &&
687 cdev->private->state != DEV_STATE_BOXED)
688 get_device(&cdev->dev);
691 cdev = kmalloc (sizeof(*cdev), GFP_KERNEL);
694 memset(cdev, 0, sizeof(struct ccw_device));
695 cdev->private = kmalloc(sizeof(struct ccw_device_private),
696 GFP_KERNEL | GFP_DMA);
697 if (!cdev->private) {
701 memset(cdev->private, 0, sizeof(struct ccw_device_private));
702 atomic_set(&cdev->private->onoff, 0);
703 cdev->dev = (struct device) {
705 .release = ccw_device_release,
707 /* Do first half of device_register. */
708 device_initialize(&cdev->dev);
710 if (!get_device(&sch->dev)) {
711 if (cdev->dev.release)
712 cdev->dev.release(&cdev->dev);
716 rc = io_subchannel_recog(cdev, to_subchannel(pdev));
718 sch->dev.driver_data = 0;
719 if (cdev->dev.release)
720 cdev->dev.release(&cdev->dev);
727 io_subchannel_remove (struct device *dev)
729 struct ccw_device *cdev;
731 if (!dev->driver_data)
733 cdev = dev->driver_data;
734 /* Set ccw device to not operational and drop reference. */
735 cdev->private->state = DEV_STATE_NOT_OPER;
737 * Careful here. Our ccw device might be yet unregistered when
738 * de-registering its subchannel (machine check during device
739 * recognition). Better look if the subchannel has children.
741 if (!list_empty(&dev->children))
742 device_unregister(&cdev->dev);
743 dev->driver_data = NULL;
748 io_subchannel_notify(struct device *dev, int event)
750 struct ccw_device *cdev;
752 cdev = dev->driver_data;
759 return cdev->drv->notify ? cdev->drv->notify(cdev, event) : 0;
763 io_subchannel_verify(struct device *dev)
765 struct ccw_device *cdev;
767 cdev = dev->driver_data;
769 dev_fsm_event(cdev, DEV_EVENT_VERIFY);
773 io_subchannel_ioterm(struct device *dev)
775 struct ccw_device *cdev;
777 cdev = dev->driver_data;
780 cdev->private->state = DEV_STATE_CLEAR_VERIFY;
782 cdev->handler(cdev, cdev->private->intparm,
787 io_subchannel_shutdown(struct device *dev)
789 struct subchannel *sch;
790 struct ccw_device *cdev;
793 sch = to_subchannel(dev);
794 cdev = dev->driver_data;
796 if (cio_is_console(sch->irq))
798 if (!sch->schib.pmcw.ena)
801 ret = cio_disable_subchannel(sch);
803 /* Subchannel is disabled, we're done. */
805 cdev->private->state = DEV_STATE_QUIESCE;
807 cdev->handler(cdev, cdev->private->intparm,
809 ret = ccw_device_cancel_halt_clear(cdev);
811 ccw_device_set_timeout(cdev, HZ/10);
812 wait_event(cdev->private->wait_q, dev_fsm_final_state(cdev));
814 cio_disable_subchannel(sch);
817 #ifdef CONFIG_CCW_CONSOLE
818 static struct ccw_device console_cdev;
819 static struct ccw_device_private console_private;
820 static int console_cdev_in_use;
823 ccw_device_console_enable (struct ccw_device *cdev, struct subchannel *sch)
827 /* Initialize the ccw_device structure. */
828 cdev->dev = (struct device) {
831 /* Initialize the subchannel structure */
832 sch->dev.parent = &css_bus_device;
833 sch->dev.bus = &css_bus_type;
835 rc = io_subchannel_recog(cdev, sch);
839 /* Now wait for the async. recognition to come to an end. */
840 spin_lock_irq(cdev->ccwlock);
841 while (!dev_fsm_final_state(cdev))
844 if (cdev->private->state != DEV_STATE_OFFLINE)
846 ccw_device_online(cdev);
847 while (!dev_fsm_final_state(cdev))
849 if (cdev->private->state != DEV_STATE_ONLINE)
853 spin_unlock_irq(cdev->ccwlock);
858 ccw_device_probe_console(void)
860 struct subchannel *sch;
863 if (xchg(&console_cdev_in_use, 1) != 0)
865 sch = cio_probe_console();
867 console_cdev_in_use = 0;
870 memset(&console_cdev, 0, sizeof(struct ccw_device));
871 memset(&console_private, 0, sizeof(struct ccw_device_private));
872 console_cdev.private = &console_private;
873 ret = ccw_device_console_enable(&console_cdev, sch);
875 cio_release_console();
876 console_cdev_in_use = 0;
879 console_cdev.online = 1;
880 return &console_cdev;
885 * get ccw_device matching the busid, but only if owned by cdrv
888 get_ccwdev_by_busid(struct ccw_driver *cdrv, const char *bus_id)
890 struct device *d, *dev;
891 struct device_driver *drv;
893 drv = get_driver(&cdrv->driver);
897 down_read(&drv->bus->subsys.rwsem);
900 list_for_each_entry(d, &drv->devices, driver_list) {
903 if (dev && !strncmp(bus_id, dev->bus_id, BUS_ID_SIZE))
910 up_read(&drv->bus->subsys.rwsem);
913 return dev ? to_ccwdev(dev) : 0;
916 /************************** device driver handling ************************/
918 /* This is the implementation of the ccw_driver class. The probe, remove
919 * and release methods are initially very similar to the device_driver
920 * implementations, with the difference that they have ccw_device
923 * A ccw driver also contains the information that is needed for
927 ccw_device_probe (struct device *dev)
929 struct ccw_device *cdev = to_ccwdev(dev);
930 struct ccw_driver *cdrv = to_ccwdrv(dev->driver);
933 cdev->drv = cdrv; /* to let the driver call _set_online */
935 ret = cdrv->probe ? cdrv->probe(cdev) : -ENODEV;
946 ccw_device_remove (struct device *dev)
948 struct ccw_device *cdev = to_ccwdev(dev);
949 struct ccw_driver *cdrv = cdev->drv;
952 pr_debug("removing device %s\n", cdev->dev.bus_id);
957 spin_lock_irq(cdev->ccwlock);
958 ret = ccw_device_offline(cdev);
959 spin_unlock_irq(cdev->ccwlock);
961 wait_event(cdev->private->wait_q,
962 dev_fsm_final_state(cdev));
964 //FIXME: we can't fail!
965 pr_debug("ccw_device_offline returned %d, device %s\n",
966 ret, cdev->dev.bus_id);
968 ccw_device_set_timeout(cdev, 0);
974 ccw_driver_register (struct ccw_driver *cdriver)
976 struct device_driver *drv = &cdriver->driver;
978 drv->bus = &ccw_bus_type;
979 drv->name = cdriver->name;
980 drv->probe = ccw_device_probe;
981 drv->remove = ccw_device_remove;
983 return driver_register(drv);
987 ccw_driver_unregister (struct ccw_driver *cdriver)
989 driver_unregister(&cdriver->driver);
992 MODULE_LICENSE("GPL");
993 EXPORT_SYMBOL(ccw_device_set_online);
994 EXPORT_SYMBOL(ccw_device_set_offline);
995 EXPORT_SYMBOL(ccw_driver_register);
996 EXPORT_SYMBOL(ccw_driver_unregister);
997 EXPORT_SYMBOL(get_ccwdev_by_busid);
998 EXPORT_SYMBOL(ccw_bus_type);
999 EXPORT_SYMBOL(ccw_device_work);
1000 EXPORT_SYMBOL(ccw_device_notify_work);