]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blobdiff - drivers/s390/cio/css.c
Merge branch 'linus' into core/softlockup
[mirror_ubuntu-hirsute-kernel.git] / drivers / s390 / cio / css.c
index b24618b5362eb7294f3ed24824880317b1f67ca1..46c021d880dc5ee7441cd11f8e885bf54d79b7dd 100644 (file)
@@ -164,7 +164,8 @@ static int css_sch_device_register(struct subchannel *sch)
 void css_sch_device_unregister(struct subchannel *sch)
 {
        mutex_lock(&sch->reg_mutex);
-       device_unregister(&sch->dev);
+       if (device_is_registered(&sch->dev))
+               device_unregister(&sch->dev);
        mutex_unlock(&sch->reg_mutex);
 }
 EXPORT_SYMBOL_GPL(css_sch_device_unregister);
@@ -806,7 +807,7 @@ init_channel_subsystem (void)
        css_init_done = 1;
 
        /* Enable default isc for I/O subchannels. */
-       ctl_set_bit(6, 31 - IO_SCH_ISC);
+       isc_register(IO_SCH_ISC);
 
        for_each_subchannel(__init_channel_subsystem, NULL);
        return 0;
@@ -850,19 +851,16 @@ int sch_is_pseudo_sch(struct subchannel *sch)
        return sch == to_css(sch->dev.parent)->pseudo_subchannel;
 }
 
-/*
- * find a driver for a subchannel. They identify by the subchannel
- * type with the exception that the console subchannel driver has its own
- * subchannel type although the device is an i/o subchannel
- */
-static int
-css_bus_match (struct device *dev, struct device_driver *drv)
+static int css_bus_match(struct device *dev, struct device_driver *drv)
 {
        struct subchannel *sch = to_subchannel(dev);
        struct css_driver *driver = to_cssdriver(drv);
+       struct css_device_id *id;
 
-       if (sch->st == driver->subchannel_type)
-               return 1;
+       for (id = driver->subchannel_type; id->match_flags; id++) {
+               if (sch->st == id->type)
+                       return 1;
+       }
 
        return 0;
 }