summaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2012-05-15 18:03:46 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2012-05-16 14:42:49 +0200
commit9814fdfbecbb030454c46ebab88f8ea9819bc143 (patch)
tree9955c8f76caffaa5298239c42a003ac564b10224 /drivers/s390
parentc041f2d487654eb2f981f517b216cf1efdf3cdf2 (diff)
s390/ccwgroup: remove ccwgroup_create_from_string
Remove the old ccwgroup_create_from_string interface since all drivers have been converted to ccwgroup_create_dev. Also remove now unused members of ccwgroup_driver. Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/cio/ccwgroup.c57
-rw-r--r--drivers/s390/net/claw.c11
-rw-r--r--drivers/s390/net/ctcm_main.c5
-rw-r--r--drivers/s390/net/lcs.c5
-rw-r--r--drivers/s390/net/qeth_core_main.c2
5 files changed, 8 insertions, 72 deletions
diff --git a/drivers/s390/cio/ccwgroup.c b/drivers/s390/cio/ccwgroup.c
index c69cee607ae..731470e6849 100644
--- a/drivers/s390/cio/ccwgroup.c
+++ b/drivers/s390/cio/ccwgroup.c
@@ -30,19 +30,6 @@
* to devices that use multiple subchannels.
*/
-/* a device matches a driver if all its slave devices match the same
- * entry of the driver */
-static int ccwgroup_bus_match(struct device *dev, struct device_driver * drv)
-{
- struct ccwgroup_device *gdev = to_ccwgroupdev(dev);
- struct ccwgroup_driver *gdrv = to_ccwgroupdrv(drv);
-
- if (gdev->creator_id == gdrv->driver_id)
- return 1;
-
- return 0;
-}
-
static struct bus_type ccwgroup_bus_type;
static void __ccwgroup_remove_symlinks(struct ccwgroup_device *gdev)
@@ -292,7 +279,6 @@ static int __get_next_id(const char **buf, struct ccw_dev_id *id)
/**
* ccwgroup_create_dev() - create and register a ccw group device
* @parent: parent device for the new device
- * @creator_id: identifier of creating driver
* @gdrv: driver for the new group device
* @num_devices: number of slave devices
* @buf: buffer containing comma separated bus ids of slave devices
@@ -304,9 +290,8 @@ static int __get_next_id(const char **buf, struct ccw_dev_id *id)
* Context:
* non-atomic
*/
-int ccwgroup_create_dev(struct device *parent, unsigned int creator_id,
- struct ccwgroup_driver *gdrv, int num_devices,
- const char *buf)
+int ccwgroup_create_dev(struct device *parent, struct ccwgroup_driver *gdrv,
+ int num_devices, const char *buf)
{
struct ccwgroup_device *gdev;
struct ccw_dev_id dev_id;
@@ -320,10 +305,6 @@ int ccwgroup_create_dev(struct device *parent, unsigned int creator_id,
atomic_set(&gdev->onoff, 0);
mutex_init(&gdev->reg_mutex);
mutex_lock(&gdev->reg_mutex);
- if (gdrv)
- gdev->creator_id = gdrv->driver_id;
- else
- gdev->creator_id = creator_id;
gdev->count = num_devices;
gdev->dev.bus = &ccwgroup_bus_type;
gdev->dev.parent = parent;
@@ -402,30 +383,6 @@ error:
}
EXPORT_SYMBOL(ccwgroup_create_dev);
-/**
- * ccwgroup_create_from_string() - create and register a ccw group device
- * @root: parent device for the new device
- * @creator_id: identifier of creating driver
- * @cdrv: ccw driver of slave devices
- * @num_devices: number of slave devices
- * @buf: buffer containing comma separated bus ids of slave devices
- *
- * Create and register a new ccw group device as a child of @root. Slave
- * devices are obtained from the list of bus ids given in @buf and must all
- * belong to @cdrv.
- * Returns:
- * %0 on success and an error code on failure.
- * Context:
- * non-atomic
- */
-int ccwgroup_create_from_string(struct device *root, unsigned int creator_id,
- struct ccw_driver *cdrv, int num_devices,
- const char *buf)
-{
- return ccwgroup_create_dev(root, creator_id, NULL, num_devices, buf);
-}
-EXPORT_SYMBOL(ccwgroup_create_from_string);
-
static int ccwgroup_notifier(struct notifier_block *nb, unsigned long action,
void *data)
{
@@ -467,14 +424,6 @@ module_exit(cleanup_ccwgroup);
/************************** driver stuff ******************************/
-static int ccwgroup_probe(struct device *dev)
-{
- struct ccwgroup_device *gdev = to_ccwgroupdev(dev);
- struct ccwgroup_driver *gdrv = to_ccwgroupdrv(dev->driver);
-
- return gdrv->probe ? gdrv->probe(gdev) : -ENODEV;
-}
-
static int ccwgroup_remove(struct device *dev)
{
struct ccwgroup_device *gdev = to_ccwgroupdev(dev);
@@ -569,8 +518,6 @@ static const struct dev_pm_ops ccwgroup_pm_ops = {
static struct bus_type ccwgroup_bus_type = {
.name = "ccwgroup",
- .match = ccwgroup_bus_match,
- .probe = ccwgroup_probe,
.remove = ccwgroup_remove,
.shutdown = ccwgroup_shutdown,
.pm = &ccwgroup_pm_ops,
diff --git a/drivers/s390/net/claw.c b/drivers/s390/net/claw.c
index f7e7dcd7481..634c7e8e631 100644
--- a/drivers/s390/net/claw.c
+++ b/drivers/s390/net/claw.c
@@ -262,12 +262,10 @@ static struct ccwgroup_driver claw_group_driver = {
.owner = THIS_MODULE,
.name = "claw",
},
- .max_slaves = 2,
- .driver_id = 0xC3D3C1E6,
.setup = claw_probe,
- .remove = claw_remove_device,
- .set_online = claw_new_device,
- .set_offline = claw_shutdown_device,
+ .remove = claw_remove_device,
+ .set_online = claw_new_device,
+ .set_offline = claw_shutdown_device,
.prepare = claw_pm_prepare,
};
@@ -292,8 +290,7 @@ static ssize_t claw_driver_group_store(struct device_driver *ddrv,
const char *buf, size_t count)
{
int err;
- err = ccwgroup_create_dev(claw_root_dev, claw_group_driver.driver_id,
- &claw_group_driver, 2, buf);
+ err = ccwgroup_create_dev(claw_root_dev, &claw_group_driver, 2, buf);
return err ? err : count;
}
static DRIVER_ATTR(group, 0200, NULL, claw_driver_group_store);
diff --git a/drivers/s390/net/ctcm_main.c b/drivers/s390/net/ctcm_main.c
index abb84c3849e..84777e369a2 100644
--- a/drivers/s390/net/ctcm_main.c
+++ b/drivers/s390/net/ctcm_main.c
@@ -1767,8 +1767,6 @@ static struct ccwgroup_driver ctcm_group_driver = {
.owner = THIS_MODULE,
.name = CTC_DRIVER_NAME,
},
- .max_slaves = 2,
- .driver_id = 0xC3E3C3D4, /* CTCM */
.setup = ctcm_probe_device,
.remove = ctcm_remove_device,
.set_online = ctcm_new_device,
@@ -1783,8 +1781,7 @@ static ssize_t ctcm_driver_group_store(struct device_driver *ddrv,
{
int err;
- err = ccwgroup_create_dev(ctcm_root_dev, ctcm_group_driver.driver_id,
- &ctcm_group_driver, 2, buf);
+ err = ccwgroup_create_dev(ctcm_root_dev, &ctcm_group_driver, 2, buf);
return err ? err : count;
}
static DRIVER_ATTR(group, 0200, NULL, ctcm_driver_group_store);
diff --git a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c
index 0abba936421..f1dfc8d72d7 100644
--- a/drivers/s390/net/lcs.c
+++ b/drivers/s390/net/lcs.c
@@ -2412,8 +2412,6 @@ static struct ccwgroup_driver lcs_group_driver = {
.owner = THIS_MODULE,
.name = "lcs",
},
- .max_slaves = 2,
- .driver_id = 0xD3C3E2,
.setup = lcs_probe_device,
.remove = lcs_remove_device,
.set_online = lcs_new_device,
@@ -2429,8 +2427,7 @@ static ssize_t lcs_driver_group_store(struct device_driver *ddrv,
const char *buf, size_t count)
{
int err;
- err = ccwgroup_create_dev(lcs_root_dev, lcs_group_driver.driver_id,
- &lcs_group_driver, 2, buf);
+ err = ccwgroup_create_dev(lcs_root_dev, &lcs_group_driver, 2, buf);
return err ? err : count;
}
static DRIVER_ATTR(group, 0200, NULL, lcs_driver_group_store);
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index 9423f3d7e20..d1c87420edf 100644
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -5267,7 +5267,6 @@ static struct ccwgroup_driver qeth_core_ccwgroup_driver = {
.owner = THIS_MODULE,
.name = "qeth",
},
- .driver_id = 0xD8C5E3C8,
.setup = qeth_core_probe_device,
.remove = qeth_core_remove_device,
.set_online = qeth_core_set_online,
@@ -5286,7 +5285,6 @@ static ssize_t qeth_core_driver_group_store(struct device_driver *ddrv,
int err;
err = ccwgroup_create_dev(qeth_core_root_dev,
- qeth_core_ccwgroup_driver.driver_id,
&qeth_core_ccwgroup_driver, 3, buf);
return err ? err : count;