summaryrefslogtreecommitdiff
path: root/include/linux/mfd
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2018-05-30 09:04:13 -0700
committerBenson Leung <bleung@chromium.org>2018-05-30 11:53:40 -0700
commit79a3d60300fc28def9b58dc30d86274b47052422 (patch)
treed14080806a250711b650f1475d6263387d5c8622 /include/linux/mfd
parent683b647309fc8b4d9d176d2df994efc03f9f8073 (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/mfd')
-rw-r--r--include/linux/mfd/cros_ec.h2
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
*