]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/s390/net/cu3088.c
Merge branches 'at91', 'dyntick', 'ep93xx', 'iop', 'ixp', 'misc', 'orion', 'omap...
[linux-2.6-omap-h63xx.git] / drivers / s390 / net / cu3088.c
index b12533104c1ff5b38242791d22d0e94c0f0293de..8e7697305a4cd9ab6d871f1d569d6d1e9ef31b4b 100644 (file)
@@ -20,7 +20,7 @@
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
  */
-\f
+
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/err.h>
@@ -57,35 +57,19 @@ static struct ccw_device_id cu3088_ids[] = {
 
 static struct ccw_driver cu3088_driver;
 
-struct device *cu3088_root_dev;
+static struct device *cu3088_root_dev;
 
 static ssize_t
 group_write(struct device_driver *drv, const char *buf, size_t count)
 {
-       const char *start, *end;
-       char bus_ids[2][BUS_ID_SIZE], *argv[2];
-       int i;
        int ret;
        struct ccwgroup_driver *cdrv;
 
        cdrv = to_ccwgroupdrv(drv);
        if (!cdrv)
                return -EINVAL;
-       start = buf;
-       for (i=0; i<2; i++) {
-               static const char delim[] = {',', '\n'};
-               int len;
-
-               if (!(end = strchr(start, delim[i])))
-                       return count;
-               len = min_t(ptrdiff_t, BUS_ID_SIZE, end - start + 1);
-               strlcpy (bus_ids[i], start, len);
-               argv[i] = bus_ids[i];
-               start = end + 1;
-       }
-
-       ret = ccwgroup_create(cu3088_root_dev, cdrv->driver_id,
-                             &cu3088_driver, 2, argv);
+       ret = ccwgroup_create_from_string(cu3088_root_dev, cdrv->driver_id,
+                                         &cu3088_driver, 2, buf);
 
        return (ret == 0) ? count : ret;
 }
@@ -94,7 +78,7 @@ static DRIVER_ATTR(group, 0200, NULL, group_write);
 
 /* Register-unregister for ctc&lcs */
 int
-register_cu3088_discipline(struct ccwgroup_driver *dcp) 
+register_cu3088_discipline(struct ccwgroup_driver *dcp)
 {
        int rc;
 
@@ -109,7 +93,7 @@ register_cu3088_discipline(struct ccwgroup_driver *dcp)
        rc = driver_create_file(&dcp->driver, &driver_attr_group);
        if (rc)
                ccwgroup_driver_unregister(dcp);
-               
+
        return rc;
 
 }
@@ -137,7 +121,7 @@ static int __init
 cu3088_init (void)
 {
        int rc;
-       
+
        cu3088_root_dev = s390_root_dev_register("cu3088");
        if (IS_ERR(cu3088_root_dev))
                return PTR_ERR(cu3088_root_dev);