Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e6aed122 authored by Sebastian Ott's avatar Sebastian Ott Committed by Martin Schwidefsky
Browse files

[S390] css_driver: remove duplicate members



Remove the owner and name members of struct
css_driver and convert all drivers to store
this data in the embedded struct device_driver.

Signed-off-by: default avatarSebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 085ee9db
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -148,7 +148,10 @@ static struct css_device_id chsc_subchannel_ids[] = {
MODULE_DEVICE_TABLE(css, chsc_subchannel_ids);
MODULE_DEVICE_TABLE(css, chsc_subchannel_ids);


static struct css_driver chsc_subchannel_driver = {
static struct css_driver chsc_subchannel_driver = {
	.drv = {
		.owner = THIS_MODULE,
		.owner = THIS_MODULE,
		.name = "chsc_subchannel",
	},
	.subchannel_type = chsc_subchannel_ids,
	.subchannel_type = chsc_subchannel_ids,
	.irq = chsc_subchannel_irq,
	.irq = chsc_subchannel_irq,
	.probe = chsc_subchannel_probe,
	.probe = chsc_subchannel_probe,
@@ -158,7 +161,6 @@ static struct css_driver chsc_subchannel_driver = {
	.freeze = chsc_subchannel_freeze,
	.freeze = chsc_subchannel_freeze,
	.thaw = chsc_subchannel_restore,
	.thaw = chsc_subchannel_restore,
	.restore = chsc_subchannel_restore,
	.restore = chsc_subchannel_restore,
	.name = "chsc_subchannel",
};
};


static int __init chsc_init_dbfs(void)
static int __init chsc_init_dbfs(void)
+0 −2
Original line number Original line Diff line number Diff line
@@ -1233,9 +1233,7 @@ struct bus_type css_bus_type = {
 */
 */
int css_driver_register(struct css_driver *cdrv)
int css_driver_register(struct css_driver *cdrv)
{
{
	cdrv->drv.name = cdrv->name;
	cdrv->drv.bus = &css_bus_type;
	cdrv->drv.bus = &css_bus_type;
	cdrv->drv.owner = cdrv->owner;
	return driver_register(&cdrv->drv);
	return driver_register(&cdrv->drv);
}
}
EXPORT_SYMBOL_GPL(css_driver_register);
EXPORT_SYMBOL_GPL(css_driver_register);
+0 −4
Original line number Original line Diff line number Diff line
@@ -63,7 +63,6 @@ struct subchannel;
struct chp_link;
struct chp_link;
/**
/**
 * struct css_driver - device driver for subchannels
 * struct css_driver - device driver for subchannels
 * @owner: owning module
 * @subchannel_type: subchannel type supported by this driver
 * @subchannel_type: subchannel type supported by this driver
 * @drv: embedded device driver structure
 * @drv: embedded device driver structure
 * @irq: called on interrupts
 * @irq: called on interrupts
@@ -78,10 +77,8 @@ struct chp_link;
 * @thaw: undo work done in @freeze
 * @thaw: undo work done in @freeze
 * @restore: callback for restoring after hibernation
 * @restore: callback for restoring after hibernation
 * @settle: wait for asynchronous work to finish
 * @settle: wait for asynchronous work to finish
 * @name: name of the device driver
 */
 */
struct css_driver {
struct css_driver {
	struct module *owner;
	struct css_device_id *subchannel_type;
	struct css_device_id *subchannel_type;
	struct device_driver drv;
	struct device_driver drv;
	void (*irq)(struct subchannel *);
	void (*irq)(struct subchannel *);
@@ -96,7 +93,6 @@ struct css_driver {
	int (*thaw) (struct subchannel *);
	int (*thaw) (struct subchannel *);
	int (*restore)(struct subchannel *);
	int (*restore)(struct subchannel *);
	int (*settle)(void);
	int (*settle)(void);
	const char *name;
};
};


#define to_cssdriver(n) container_of(n, struct css_driver, drv)
#define to_cssdriver(n) container_of(n, struct css_driver, drv)
+4 −2
Original line number Original line Diff line number Diff line
@@ -172,9 +172,11 @@ static int io_subchannel_settle(void)
}
}


static struct css_driver io_subchannel_driver = {
static struct css_driver io_subchannel_driver = {
	.drv = {
		.owner = THIS_MODULE,
		.owner = THIS_MODULE,
	.subchannel_type = io_subchannel_ids,
		.name = "io_subchannel",
		.name = "io_subchannel",
	},
	.subchannel_type = io_subchannel_ids,
	.irq = io_subchannel_irq,
	.irq = io_subchannel_irq,
	.sch_event = io_subchannel_sch_event,
	.sch_event = io_subchannel_sch_event,
	.chp_event = io_subchannel_chp_event,
	.chp_event = io_subchannel_chp_event,