diff options
| author | 2018-05-30 09:04:13 -0700 | |
|---|---|---|
| committer | 2018-05-30 11:53:40 -0700 | |
| commit | 79a3d60300fc28def9b58dc30d86274b47052422 (patch) | |
| tree | d14080806a250711b650f1475d6263387d5c8622 /include/linux | |
| parent | platform/chrome: chromeos_laptop: fix touchpad button mapping on Celes (diff) | |
platform/chrome: Use to_cros_ec_dev more broadly
Move to_cros_ec_dev macro to cros_ec.h and use it when the private ec
object is needed from device object.
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Signed-off-by: Benson Leung <bleung@chromium.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mfd/cros_ec.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/mfd/cros_ec.h b/include/linux/mfd/cros_ec.h index 2d4e23c9ea0a..f09e9cf2e4ab 100644 --- a/include/linux/mfd/cros_ec.h +++ b/include/linux/mfd/cros_ec.h @@ -197,6 +197,8 @@ struct cros_ec_dev { u32 features[2]; }; +#define to_cros_ec_dev(dev) container_of(dev, struct cros_ec_dev, class_dev) + /** * cros_ec_suspend - Handle a suspend operation for the ChromeOS EC device * |
