linux/drivers/char/ipmi
Andrew Jeffery d709697007 ipmi: kcs_bmc: Turn the driver data-structures inside-out
Make the KCS device drivers responsible for allocating their own memory.

Until now the private data for the device driver was allocated internal
to the private data for the chardev interface. This coupling required
the slightly awkward API of passing through the struct size for the
driver private data to the chardev constructor, and then retrieving a
pointer to the driver private data from the allocated chardev memory.

In addition to being awkward, the arrangement prevents the
implementation of alternative userspace interfaces as the device driver
private data is not independent.

Peel a layer off the onion and turn the data-structures inside out by
exploiting container_of() and embedding `struct kcs_device` in the
driver private data.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Reviewed-by: Zev Weiss <zweiss@equinix.com>
Message-Id: <20210608104757.582199-6-andrew@aj.id.au>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
2021-06-21 19:50:13 -05:00
..
bt-bmc.c char: ipmi: convert comma to semicolon 2020-12-16 07:54:54 -06:00
ipmb_dev_int.c ipmi: remove open coded version of SMBus block write 2021-01-28 07:15:12 -06:00
ipmi_bt_sm.c ipmi: Clean up some printks 2020-09-15 09:57:45 -05:00
ipmi_devintf.c char: ipmi: remove unneeded break 2020-10-27 16:08:22 -05:00
ipmi_dmi.c ipmi_si: Rework some include files 2019-08-02 07:25:03 -05:00
ipmi_dmi.h ipmi_si: Rework some include files 2019-08-02 07:25:03 -05:00
ipmi_kcs_sm.c ipmi: Clean up some printks 2020-09-15 09:57:45 -05:00
ipmi_msghandler.c ipmi_si: Join string literals back 2021-04-02 12:53:42 -05:00
ipmi_plat_data.c ipmi: Handle device properties with software node API 2021-03-10 19:00:02 -06:00
ipmi_plat_data.h ipmi: Add the i2c-addr property for SSIF interfaces 2019-04-24 09:02:53 -05:00
ipmi_powernv.c ipmi:powernv: Convert ipmi_smi_t to struct ipmi_smi 2018-09-18 16:15:33 -05:00
ipmi_poweroff.c ipmi: Use more common logging styles 2018-09-18 16:15:33 -05:00
ipmi_si_hardcode.c ipmi_si: Join string literals back 2021-04-02 12:53:42 -05:00
ipmi_si_hotmod.c ipmi_si: Join string literals back 2021-04-02 12:53:42 -05:00
ipmi_si_intf.c ipmi_si: Join string literals back 2021-04-02 12:53:42 -05:00
ipmi_si_mem_io.c ipmi_si: Rework some include files 2019-08-02 07:25:03 -05:00
ipmi_si_parisc.c ipmi_si: Rename addr_type to addr_space to match what it does 2019-02-22 07:12:41 -06:00
ipmi_si_pci.c ipmi_si: Join string literals back 2021-04-02 12:53:42 -05:00
ipmi_si_platform.c ipmi_si: Join string literals back 2021-04-02 12:53:42 -05:00
ipmi_si_port_io.c ipmi_si: Rework some include files 2019-08-02 07:25:03 -05:00
ipmi_si_sm.h ipmi_si: Rework some include files 2019-08-02 07:25:03 -05:00
ipmi_si.h ipmi_si: Get rid of ->addr_source_cleanup() 2021-04-02 12:53:34 -05:00
ipmi_smic_sm.c ipmi: Clean up some printks 2020-09-15 09:57:45 -05:00
ipmi_ssif.c ipmi:ssif: make ssif_i2c_send() void 2021-03-10 19:00:02 -06:00
ipmi_watchdog.c ipmi/watchdog: Stop watchdog timer when the current action is 'none' 2021-05-13 11:20:40 -05:00
Kconfig docs: fix references for ipmi.rst file 2020-05-15 11:55:21 -06:00
kcs_bmc_aspeed.c ipmi: kcs_bmc: Turn the driver data-structures inside-out 2021-06-21 19:50:13 -05:00
kcs_bmc_cdev_ipmi.c ipmi: kcs_bmc: Turn the driver data-structures inside-out 2021-06-21 19:50:13 -05:00
kcs_bmc_npcm7xx.c ipmi: kcs_bmc: Turn the driver data-structures inside-out 2021-06-21 19:50:13 -05:00
kcs_bmc.c ipmi: kcs_bmc: Turn the driver data-structures inside-out 2021-06-21 19:50:13 -05:00
kcs_bmc.h ipmi: kcs_bmc: Turn the driver data-structures inside-out 2021-06-21 19:50:13 -05:00
Makefile ipmi: kcs_bmc: Split out kcs_bmc_cdev_ipmi 2021-06-21 19:50:13 -05:00