Thread (7 messages) flat view 7 messages, 2 authors, 2016-09-13
STALE3621d

[PATCH 1/4] ipmi: Add a reference from BMC devices to their interfaces

From: Jeremy Kerr <jk@ozlabs.org>
Date: 2016-09-12 08:57:07
Subsystem: ipmi subsystem, the rest · Maintainers: Corey Minyard, Linus Torvalds

In an upcoming change, we'll want to grab a reference to the ipmi_smi_t
from a struct bmc_device. This change adds a pointer to allow this.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
---
 drivers/char/ipmi/ipmi_msghandler.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
index d8619998..41990bb 100644
--- a/drivers/char/ipmi/ipmi_msghandler.c
+++ b/drivers/char/ipmi/ipmi_msghandler.c
@@ -195,6 +195,7 @@ struct ipmi_proc_entry {
 struct bmc_device {
 	struct platform_device pdev;
 	struct ipmi_device_id  id;
+	ipmi_smi_t             intf;
 	unsigned char          guid[16];
 	int                    guid_set;
 	char                   name[16];
@@ -2796,6 +2797,7 @@ int ipmi_register_smi(const struct ipmi_smi_handlers *handlers,
 	}
 	intf->intf_num = -1; /* Mark it invalid for now. */
 	kref_init(&intf->refcount);
+	intf->bmc->intf = intf;
 	intf->bmc->id = *device_id;
 	intf->si_dev = si_dev;
 	for (j = 0; j < IPMI_MAX_CHANNELS; j++) {
-- 
2.7.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help