greybus: power_supply: convert to bundle driver
authorViresh Kumar <viresh.kumar@linaro.org>
Fri, 12 Feb 2016 10:38:33 +0000 (16:08 +0530)
committerGreg Kroah-Hartman <gregkh@google.com>
Mon, 15 Feb 2016 22:53:43 +0000 (14:53 -0800)
commit68b1309be689ec4e93d2b48e09ccaaa8abf5b0b6
tree06a84b48000cbd04422efb1eed00c59cef5f22dc
parent7e9fba8df7606bcace9d22394f59c2047dd55091
greybus: power_supply: convert to bundle driver

Convert the legacy power_supply protocol driver to a bundle driver.

This also fixes a potential crash should a (malicious) module have sent
an early request before the private data had been initialised.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/legacy.c
drivers/staging/greybus/power_supply.c