msm: SSR: Make a registration/unregistration API

Add a struct subsys_device for the internal stuff we don't want
to expose. Propagate that struct throughout the code. Add a new
restart API, subsystem_restart_dev() that takes the subsys_device
pointer to restart the processor. This saves having to iterate
through the list of devices to find the subsystem (saving a
spinlock for callers in atomic context). Since we still have some
callers of the old string based API, leave subsystem_restart() in
place.

While we're here, remove code that isn't doing anything. We always
know to use the current subsystem if we only have one so the
single_restart_list is useless. Plus, if someone is passing a
NULL descriptor or not initializing the fields of the descriptor
when they register with SSR, they will soon realize that their
code doesn't work. Remove these checks as they'll impede future
patches that don't want to supply all possible ops.

Change-Id: Ia53ffd530982390d1871bd62bfe31e3a0a512fbe
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
11 files changed