]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/s390/net/cu3088.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
[linux-2.6-omap-h63xx.git] / drivers / s390 / net / cu3088.c
index 77dacb46573223232125700dd3f8d92365c1ec79..f4a32375c037410d78935033aa047f1ccdb8b2e9 100644 (file)
@@ -1,11 +1,9 @@
 /*
- * $Id: cu3088.c,v 1.36 2005/10/25 14:37:17 cohuck Exp $
- *
  * CTC / LCS ccw_device driver
  *
  * Copyright (C) 2002 IBM Deutschland Entwicklung GmbH, IBM Corporation
  * Author(s): Arnd Bergmann <arndb@de.ibm.com>
- *            Cornelia Huck <cohuck@de.ibm.com>
+ *            Cornelia Huck <cornelia.huck@de.ibm.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -22,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>
@@ -38,7 +36,6 @@ const char *cu3088_type[] = {
        "CTC/A",
        "ESCON channel",
        "FICON channel",
-       "P390 LCS card",
        "OSA LCS card",
        "CLAW channel device",
        "unknown channel type",
@@ -51,7 +48,6 @@ static struct ccw_device_id cu3088_ids[] = {
        { CCW_DEVICE(0x3088, 0x08), .driver_info = channel_type_parallel },
        { CCW_DEVICE(0x3088, 0x1f), .driver_info = channel_type_escon },
        { CCW_DEVICE(0x3088, 0x1e), .driver_info = channel_type_ficon },
-       { CCW_DEVICE(0x3088, 0x01), .driver_info = channel_type_p390 },
        { CCW_DEVICE(0x3088, 0x60), .driver_info = channel_type_osa2 },
        { CCW_DEVICE(0x3088, 0x61), .driver_info = channel_type_claw },
        { /* end of list */ }
@@ -59,35 +55,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;
 }
@@ -96,7 +76,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;
 
@@ -111,7 +91,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;
 
 }
@@ -139,7 +119,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);