IPMI: Some small fixes

Nothing big, just aligning things with some changes.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE/Q1c5nzg9ZpmiCaGYfOMkJGb/4EFAmWb/wUACgkQYfOMkJGb
 /4HzohAArYTGsugd2OT2pcG0YLXLy3b+gyNAoQyIAipTicHLe3Chy8OsT0XORarH
 jDeVLXy5+G4Ln0IL9vxJj3+lLU1glP+TAPy+3ITDPF9dKPviLA+5uraxvSIURDiQ
 cNpuE4HmuGSkeeidA15qVRZEjVZaIVQL1mETczuDmw/0jtgxzmiU/6jekMa9q/Ce
 m9prXXc1XUwomiXN9Rugca9xu5+LC8KoY/klnHCJOXxVflhwjY3OVZE3lFgpXLO8
 MYg9699tWT6bXWNX59wmj+hO+Snz9vlg7WDz59WL6kpWUpAyeTL7m0EQ1K0XYfg/
 c2WwaKvcbaBZlGFP6dzBf4UYyGLofngAiKl7hdT3a3zzZvS31is3GJA8lPebm9eO
 NX3Zw3W1JBo4r9TlnVh7i+OpAzIQ4Qowdi4XMHAmYrvp+OKXdAWA7FeTus/B8Z3o
 8LtGFAoDbrZqPChFMvRS0v2q/Lq6e3V5GnrUvv6O/d6cmcU2rojbs46Nnlxua+qB
 dVBn8JQ2m7GenUflp+3F74s5OJkGUCWktqYQoCKHVVCeYujrEOaDQybX/6ecoccV
 T2ikQKrZxIyRodDA+luRl1sWy/JVgwGzCX4bqLYa7yP8lmghKEN5aD3dnEFFTY9O
 ii7KkyFgzbAkJUV22bfkyJaoH1hntYmZO6lFfmuaDDPK1+Dg2Fg=
 =4NYH
 -----END PGP SIGNATURE-----

Merge tag 'for-linus-6.8-1' of https://github.com/cminyard/linux-ipmi

Pull IPMI updates from Corey Minyard:
 "Some small fixes. Nothing big, just aligning things with some changes"

* tag 'for-linus-6.8-1' of https://github.com/cminyard/linux-ipmi:
  ipmi: Remove usage of the deprecated ida_simple_xx() API
  ipmi: Use regspacings passed as a module parameter
  ipmi: si: Use device_get_match_data()
This commit is contained in:
Linus Torvalds 2024-01-09 17:09:44 -08:00
commit 7c6a3fc925
3 changed files with 7 additions and 11 deletions

View file

@ -3053,7 +3053,7 @@ static void cleanup_bmc_work(struct work_struct *work)
int id = bmc->pdev.id; /* Unregister overwrites id */
platform_device_unregister(&bmc->pdev);
ida_simple_remove(&ipmi_bmc_ida, id);
ida_free(&ipmi_bmc_ida, id);
}
static void
@ -3169,7 +3169,7 @@ static int __ipmi_bmc_register(struct ipmi_smi *intf,
bmc->pdev.name = "ipmi_bmc";
rv = ida_simple_get(&ipmi_bmc_ida, 0, 0, GFP_KERNEL);
rv = ida_alloc(&ipmi_bmc_ida, GFP_KERNEL);
if (rv < 0) {
kfree(bmc);
goto out;

View file

@ -80,10 +80,10 @@ static void __init ipmi_hardcode_init_one(const char *si_type_str,
}
p.regsize = regsizes[i];
p.regspacing = regspacings[i];
p.slave_addr = slave_addrs[i];
p.addr_source = SI_HARDCODED;
p.regshift = regshifts[i];
p.regsize = regsizes[i];
p.addr = addr;
p.space = addr_space;

View file

@ -11,10 +11,11 @@
#include <linux/types.h>
#include <linux/module.h>
#include <linux/of_device.h>
#include <linux/of_platform.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_irq.h>
#include <linux/platform_device.h>
#include <linux/property.h>
#include <linux/acpi.h>
#include "ipmi_si.h"
#include "ipmi_dmi.h"
@ -224,7 +225,6 @@ MODULE_DEVICE_TABLE(of, of_ipmi_match);
static int of_ipmi_probe(struct platform_device *pdev)
{
const struct of_device_id *match;
struct si_sm_io io;
struct resource resource;
const __be32 *regsize, *regspacing, *regshift;
@ -237,10 +237,6 @@ static int of_ipmi_probe(struct platform_device *pdev)
dev_info(&pdev->dev, "probing via device tree\n");
match = of_match_device(of_ipmi_match, &pdev->dev);
if (!match)
return -ENODEV;
if (!of_device_is_available(np))
return -EINVAL;
@ -269,7 +265,7 @@ static int of_ipmi_probe(struct platform_device *pdev)
}
memset(&io, 0, sizeof(io));
io.si_type = (unsigned long) match->data;
io.si_type = (enum si_type)device_get_match_data(&pdev->dev);
io.addr_source = SI_DEVICETREE;
io.irq_setup = ipmi_std_irq_setup;