diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2018-05-30 19:04:13 +0300 |
---|---|---|
committer | Benson Leung <bleung@chromium.org> | 2018-05-30 21:53:40 +0300 |
commit | 79a3d60300fc28def9b58dc30d86274b47052422 (patch) | |
tree | d14080806a250711b650f1475d6263387d5c8622 /include/linux/mfd/cros_ec.h | |
parent | 683b647309fc8b4d9d176d2df994efc03f9f8073 (diff) | |
download | linux-79a3d60300fc28def9b58dc30d86274b47052422.tar.xz |
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/mfd/cros_ec.h')
-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 * |