summaryrefslogtreecommitdiffstats
path: root/drivers/misc/cros_ec_sandbox.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-03-05 12:25:20 -0700
committerSimon Glass <sjg@chromium.org>2015-04-16 19:27:42 -0600
commite564f054af002d9e6a1080ed9d4bc2c6052a4435 (patch)
tree7b945d568d32c7febf5a8b70c6bce26b5157663c /drivers/misc/cros_ec_sandbox.c
parent106cce9604306743c86addd4d27426cce498c9d1 (diff)
downloadblackbird-obmc-uboot-e564f054af002d9e6a1080ed9d4bc2c6052a4435.tar.gz
blackbird-obmc-uboot-e564f054af002d9e6a1080ed9d4bc2c6052a4435.zip
dm: core: Add dev_get_uclass_priv() to access uclass private data
Add a convenience function to access the private data that a uclass stores for each of its devices. Convert over most existing uses for consistency and to provide an example for others. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/misc/cros_ec_sandbox.c')
-rw-r--r--drivers/misc/cros_ec_sandbox.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/cros_ec_sandbox.c b/drivers/misc/cros_ec_sandbox.c
index 99cc5297cf..282d8d843f 100644
--- a/drivers/misc/cros_ec_sandbox.c
+++ b/drivers/misc/cros_ec_sandbox.c
@@ -470,7 +470,7 @@ static int process_cmd(struct ec_state *ec,
#ifdef CONFIG_DM_CROS_EC
int cros_ec_sandbox_packet(struct udevice *udev, int out_bytes, int in_bytes)
{
- struct cros_ec_dev *dev = udev->uclass_priv;
+ struct cros_ec_dev *dev = dev_get_uclass_priv(udev);
struct ec_state *ec = dev_get_priv(dev->dev);
#else
int cros_ec_sandbox_packet(struct cros_ec_dev *dev, int out_bytes,
OpenPOWER on IntegriCloud