diff options
author | Corey Minyard <cminyard@mvista.com> | 2019-02-21 14:21:17 -0600 |
---|---|---|
committer | Corey Minyard <cminyard@mvista.com> | 2019-02-22 07:12:41 -0600 |
commit | 3cd83bac481dc4fde8bedf09c8aecb3652e7e547 (patch) | |
tree | c9fe554281414cf03aa8ce0d6cfee870dbd4578c /drivers/char/ipmi/ipmi_si_platform.c | |
parent | f6296bdc49c4d3794b5a3ef0012fc0889e2f3f94 (diff) |
ipmi: Consolidate the adding of platform devices
It was being done in two different places now that hard-coded devices
use platform devices, and it's about to be three with hotmod switching
to platform devices. So put the code in one place.
This required some rework on some interfaces to make the type space
clean.
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Diffstat (limited to 'drivers/char/ipmi/ipmi_si_platform.c')
-rw-r--r-- | drivers/char/ipmi/ipmi_si_platform.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/char/ipmi/ipmi_si_platform.c b/drivers/char/ipmi/ipmi_si_platform.c index f690e9edb08c..f2b5ac0986f2 100644 --- a/drivers/char/ipmi/ipmi_si_platform.c +++ b/drivers/char/ipmi/ipmi_si_platform.c @@ -307,15 +307,10 @@ static int of_ipmi_probe(struct platform_device *dev) static int find_slave_address(struct si_sm_io *io, int slave_addr) { #ifdef CONFIG_IPMI_DMI_DECODE - if (!slave_addr) { - u32 flags = IORESOURCE_IO; - - if (io->addr_space == IPMI_MEM_ADDR_SPACE) - flags = IORESOURCE_MEM; - - slave_addr = ipmi_dmi_get_slave_addr(io->si_type, flags, + if (!slave_addr) + slave_addr = ipmi_dmi_get_slave_addr(io->si_type, + io->addr_space, io->addr_data); - } #endif return slave_addr; |