firmware: arm_scmi: add per-protocol channels support using idr objects
authorSudeep Holla <sudeep.holla@arm.com>
Mon, 31 Jul 2017 14:43:27 +0000 (15:43 +0100)
committerSudeep Holla <sudeep.holla@arm.com>
Wed, 28 Feb 2018 16:37:57 +0000 (16:37 +0000)
commit907b6d14911db047e6e29979895d29daf2ec1e5f
tree26802fc7b0e8ed0453ac4b56dc0e59c7a3bd50ab
parentfbc4d81ad28545714a1e367963aaf2ffd9be5239
firmware: arm_scmi: add per-protocol channels support using idr objects

In order to maintain the channel information per protocol, we need
some sort of list or hashtable to hold all this information. IDR
provides sparse array mapping of small integer ID numbers onto arbitrary
pointers. In this case the arbitrary pointers can be pointers to the
channel information.

This patch adds support for per-protocol channels using those idr
objects.

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
drivers/firmware/arm_scmi/driver.c