mei: me: use an index instead of a pointer for private data
authorTomas Winkler <tomas.winkler@intel.com>
Wed, 14 Jun 2017 07:03:15 +0000 (10:03 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Jul 2017 13:07:39 +0000 (15:07 +0200)
commitf5ac3c49ff0b36d9b6a804b4b86efcaf27ba044b
tree3cf91296eb1cb4e0deda12f75eea6b60894e1e51
parent67de6bf1e4f869a490656448f471fdc4a0a405ad
mei: me: use an index instead of a pointer for private data

Device 'new_id' interface is useful for testing of not yet published
hardware on older kernels and for internally used device ids on
simulation platforms.
However currently with the device configuration held in device_id driver
data as a pointer to mei_cfg structure it is hard, as one need to locate
the address of the correct structure.
A recommended way of doing that is to use and index instead of a
pointer.
This patch adds a new list of configuration mei_cfg_list[]
indexed via enum mei_cfg_idx.
In addition it cleanups ich platform naming, renames legacy
generation to ich and what was ich to ich10.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/mei/hw-me.c
drivers/misc/mei/hw-me.h
drivers/misc/mei/pci-me.c