mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
[S390] ccwgroup_driver: remove duplicate members
Remove the owner and name members of struct ccwgroup_driver and convert all drivers to store this data in the embedded struct device_driver. Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
parent
d5ab5276ba
commit
3c190c51f5
@ -29,8 +29,6 @@ struct ccwgroup_device {
|
||||
|
||||
/**
|
||||
* struct ccwgroup_driver - driver for ccw group devices
|
||||
* @owner: driver owner
|
||||
* @name: driver name
|
||||
* @max_slaves: maximum number of slave devices
|
||||
* @driver_id: unique id
|
||||
* @probe: function called on probe
|
||||
@ -46,8 +44,6 @@ struct ccwgroup_device {
|
||||
* @driver: embedded driver structure
|
||||
*/
|
||||
struct ccwgroup_driver {
|
||||
struct module *owner;
|
||||
char *name;
|
||||
int max_slaves;
|
||||
unsigned long driver_id;
|
||||
|
||||
|
@ -428,7 +428,7 @@ ccwgroup_online_store (struct device *dev, struct device_attribute *attr, const
|
||||
gdev = to_ccwgroupdev(dev);
|
||||
gdrv = to_ccwgroupdrv(dev->driver);
|
||||
|
||||
if (!try_module_get(gdrv->owner))
|
||||
if (!try_module_get(gdrv->driver.owner))
|
||||
return -EINVAL;
|
||||
|
||||
ret = strict_strtoul(buf, 0, &value);
|
||||
@ -442,7 +442,7 @@ ccwgroup_online_store (struct device *dev, struct device_attribute *attr, const
|
||||
else
|
||||
ret = -EINVAL;
|
||||
out:
|
||||
module_put(gdrv->owner);
|
||||
module_put(gdrv->driver.owner);
|
||||
return (ret == 0) ? count : ret;
|
||||
}
|
||||
|
||||
@ -616,8 +616,6 @@ int ccwgroup_driver_register(struct ccwgroup_driver *cdriver)
|
||||
{
|
||||
/* register our new driver with the core */
|
||||
cdriver->driver.bus = &ccwgroup_bus_type;
|
||||
cdriver->driver.name = cdriver->name;
|
||||
cdriver->driver.owner = cdriver->owner;
|
||||
|
||||
return driver_register(&cdriver->driver);
|
||||
}
|
||||
|
@ -264,8 +264,10 @@ static struct device *claw_root_dev;
|
||||
/* ccwgroup table */
|
||||
|
||||
static struct ccwgroup_driver claw_group_driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "claw",
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "claw",
|
||||
},
|
||||
.max_slaves = 2,
|
||||
.driver_id = 0xC3D3C1E6,
|
||||
.probe = claw_probe,
|
||||
|
@ -1774,8 +1774,10 @@ static struct ccw_driver ctcm_ccw_driver = {
|
||||
};
|
||||
|
||||
static struct ccwgroup_driver ctcm_group_driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = CTC_DRIVER_NAME,
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = CTC_DRIVER_NAME,
|
||||
},
|
||||
.max_slaves = 2,
|
||||
.driver_id = 0xC3E3C3D4, /* CTCM */
|
||||
.probe = ctcm_probe_device,
|
||||
|
@ -2409,8 +2409,10 @@ static struct ccw_driver lcs_ccw_driver = {
|
||||
* LCS ccwgroup driver registration
|
||||
*/
|
||||
static struct ccwgroup_driver lcs_group_driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "lcs",
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "lcs",
|
||||
},
|
||||
.max_slaves = 2,
|
||||
.driver_id = 0xD3C3E2,
|
||||
.probe = lcs_probe_device,
|
||||
|
@ -4430,8 +4430,10 @@ static int qeth_core_restore(struct ccwgroup_device *gdev)
|
||||
}
|
||||
|
||||
static struct ccwgroup_driver qeth_core_ccwgroup_driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "qeth",
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "qeth",
|
||||
},
|
||||
.driver_id = 0xD8C5E3C8,
|
||||
.probe = qeth_core_probe_device,
|
||||
.remove = qeth_core_remove_device,
|
||||
|
Loading…
Reference in New Issue
Block a user