Skip to content

Commit bb398a4

Browse files
committed
ipmi_si: Change ipmi_si_add_smi() to take just I/O info
Instead of allocating the smi_info structure, filling in the I/O info, and passing it to ipmi_si_add_smi(), just pass the I/O info in the io structure and let ipmi_si_add_smi() allocate the smi_info structure. This required redoing the way the remove functions for some device interfaces worked, a new function named ipmi_si_remove_by_dev() allows the device to be passed in and detected instead of using driver data, which couldn't be filled out easily othersize. After this the platform handling should be decoupled from the smi_info structure and that handling can be pulled out to its own files. Signed-off-by: Corey Minyard <cminyard@mvista.com>
1 parent e1eeb7f commit bb398a4

3 files changed

Lines changed: 229 additions & 309 deletions

File tree

‎drivers/char/ipmi/ipmi_si.h‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@
1414
#define DEFAULT_REGSPACING 1
1515
#define DEFAULT_REGSIZE 1
1616

17-
struct smi_info;
18-
19-
int ipmi_si_add_smi(struct smi_info *info);
17+
int ipmi_si_add_smi(struct si_sm_io *io);
2018
irqreturn_t ipmi_si_irq_handler(int irq, void *data);
2119
void ipmi_irq_start_cleanup(struct si_sm_io *io);
2220
int ipmi_std_irq_setup(struct si_sm_io *io);
2321
void ipmi_irq_finish_setup(struct si_sm_io *io);
22+
int ipmi_si_remove_by_dev(struct device *dev);

0 commit comments

Comments
 (0)