summaryrefslogtreecommitdiffstats
path: root/drivers/char/ipmi/ipmi_si.h
Commit message (Collapse)AuthorAgeFilesLines
* parisc: Make struct parisc_driver::remove() return voidUwe Kleine-König2021-08-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | The caller of this function (parisc_driver_remove() in arch/parisc/kernel/drivers.c) ignores the return value, so better don't return any value at all to not wake wrong expectations in driver authors. The only function that could return a non-zero value before was ipmi_parisc_remove() which returns the return value of ipmi_si_remove_by_dev(). Make this function return void, too, as for all other callers the value is ignored, too. Also fold in a small checkpatch fix for: WARNING: Unnecessary space before function pointer arguments + void (*remove) (struct parisc_device *dev); Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> (for drivers/input) Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Acked-by: Jiri Slaby <jirislaby@kernel.org> Signed-off-by: Helge Deller <deller@gmx.de>
* ipmi_si: Get rid of ->addr_source_cleanup()Andy Shevchenko2021-04-021-2/+0
| | | | | | | | | | The ->addr_source_cleanup() callback is solely used by PCI driver and only for one purpose, i.e. to disable device. Get rid of ->addr_source_cleanup() by switching to PCI managed API. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Message-Id: <20210402174334.13466-8-andriy.shevchenko@linux.intel.com> Signed-off-by: Corey Minyard <cminyard@mvista.com>
* ipmi_si: Reuse si_to_str[] array in ipmi_hardcode_init_one()Andy Shevchenko2021-04-021-1/+5
| | | | | | | | | Instead of making the comparison one by one, reuse si_to_str[] array in ipmi_hardcode_init_one() in conjunction with match_string() API. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Message-Id: <20210402174334.13466-7-andriy.shevchenko@linux.intel.com> Signed-off-by: Corey Minyard <cminyard@mvista.com>
* ipmi_si: Rework some include filesCorey Minyard2019-08-021-2/+55
| | | | | | | | | ipmi_si_sm.h was getting included in lots of places it didn't belong. Rework things a bit to remove all the dependencies, mostly just moving things between include files that were in the wrong place and removing bogus includes. Signed-off-by: Corey Minyard <cminyard@mvista.com>
* ipmi_si: Consolidate scanning the platform busCorey Minyard2019-02-221-0/+1
| | | | | | The same basic code was in two places. Signed-off-by: Corey Minyard <cminyard@mvista.com>
* ipmi_si: Remove hotmod devices on removal and exitCorey Minyard2019-02-221-2/+3
| | | | | | | When a hotmod-added device is removed or when the module is removed, remove the platform devices that was created for it. Signed-off-by: Corey Minyard <cminyard@mvista.com>
* ipmi: Consolidate the adding of platform devicesCorey Minyard2019-02-221-0/+1
| | | | | | | | | | | 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>
* ipmi_si: Rename addr_type to addr_space to match what it doesCorey Minyard2019-02-221-4/+1
| | | | | | Make the naming consistent, and make the values an enum. Signed-off-by: Corey Minyard <cminyard@mvista.com>
* ipmi_si: Fix crash when using hard-coded deviceCorey Minyard2019-02-221-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When excuting a command like: modprobe ipmi_si ports=0xffc0e3 type=bt The system would get an oops. The trouble here is that ipmi_si_hardcode_find_bmc() is called before ipmi_si_platform_init(), but initialization of the hard-coded device creates an IPMI platform device, which won't be initialized yet. The real trouble is that hard-coded devices aren't created with any device, and the fixup is done later. So do it right, create the hard-coded devices as normal platform devices. This required adding some new resource types to the IPMI platform code for passing information required by the hard-coded device and adding some code to remove the hard-coded platform devices on module removal. To enforce the "hard-coded devices passed by the user take priority over firmware devices" rule, some special code was added to check and see if a hard-coded device already exists. Reported-by: Yang Yingliang <yangyingliang@huawei.com> Cc: stable@vger.kernel.org # v4.15+ Signed-off-by: Corey Minyard <cminyard@mvista.com> Tested-by: Yang Yingliang <yangyingliang@huawei.com>
* ipmi: Add or fix SPDX-License-Identifier in all filesCorey Minyard2018-02-271-0/+1
| | | | | | | | | | | And get rid of the license text that is no longer necessary. Signed-off-by: Corey Minyard <cminyard@mvista.com> Cc: Kees Cook <keescook@chromium.org> Cc: Alistair Popple <alistair@popple.id.au> Cc: Jeremy Kerr <jk@ozlabs.org> Cc: Joel Stanley <joel@jms.id.au> Cc: Rocky Craig <rocky.craig@hp.com>
* ipmi_si: Move port and mem I/O handling to their own filesCorey Minyard2017-09-281-0/+3
| | | | Signed-off-by: Corey Minyard <cminyard@mvista.com>
* ipmi_si: Move PARISC handling to another fileCorey Minyard2017-09-281-0/+7
| | | | Signed-off-by: Corey Minyard <cminyard@mvista.com>
* ipmi_si: Move PCI setup to another fileCorey Minyard2017-09-281-0/+8
| | | | | | | Signed-off-by: Corey Minyard <cminyard@mvista.com> Stephen Rothwell <sfr@canb.auug.org.au> fixed an issue with the include files
* ipmi_si: Move platform device handling to another fileCorey Minyard2017-09-281-0/+6
| | | | | | | Signed-off-by: Corey Minyard <cminyard@mvista.com> Stephen Rothwell <sfr@canb.auug.org.au> fixed an issue with the include files
* ipmi_si: Move hardcode handling to a separate file.Corey Minyard2017-09-271-0/+1
| | | | Signed-off-by: Corey Minyard <cminyard@mvista.com>
* ipmi_si: Move the hotmod handling to another file.Corey Minyard2017-09-271-0/+2
| | | | Signed-off-by: Corey Minyard <cminyard@mvista.com>
* ipmi_si: Change ipmi_si_add_smi() to take just I/O infoCorey Minyard2017-09-271-3/+2
| | | | | | | | | | | | | | | | | | | 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>
* ipmi_si: Move irq setup handling into the io structCorey Minyard2017-09-271-0/+5
| | | | | | | | So the platform code can do it without having to access the smi info, getting ready for pulling the platform handling section to their own files. Signed-off-by: Corey Minyard <cminyard@mvista.com>
* ipmi_si: Rename function to add smi, make it globalCorey Minyard2017-09-271-0/+18
Getting ready for moving the platform-specific stuff into their own files. Signed-off-by: Corey Minyard <cminyard@mvista.com>